style: 代码格式调整
This commit is contained in:
parent
bd96f76240
commit
94c2a34fd6
@ -2,7 +2,7 @@ module: Math
|
||||
function: factorial
|
||||
parameter:
|
||||
declare n1: long
|
||||
declare n2: long
|
||||
declare n2: int
|
||||
return_type: long
|
||||
body:
|
||||
return n1+n2
|
||||
@ -48,7 +48,7 @@ public class LexerEngine {
|
||||
* 构造时立即进行全量扫描。
|
||||
*
|
||||
* @param source 源代码文本
|
||||
* @param sourceName 文件名或来源描述(如"main.snow")
|
||||
* @param sourceName 文件名或来源描述(如"Main.snow")
|
||||
*/
|
||||
public LexerEngine(String source, String sourceName) {
|
||||
this.context = new LexerContext(source);
|
||||
|
||||
@ -16,7 +16,7 @@ import org.jcnc.snow.compiler.parser.ast.base.Node;
|
||||
*
|
||||
* <p><b>示例输出:</b></p>
|
||||
* <pre>
|
||||
* D:\Devs\IdeaProjects\Snow\playground\main.snow: 行 7, 列 28: 参数类型不匹配 (位置 1): 期望 int, 实际 long
|
||||
* D:\Devs\IdeaProjects\Snow\playground\Main.snow: 行 7, 列 28: 参数类型不匹配 (位置 1): 期望 int, 实际 long
|
||||
* </pre>
|
||||
*
|
||||
* @param node 指向发生语义错误的 AST 节点,可用于获取详细的位置信息(文件名、行号、列号等)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user