fix: 修正 ASTJsonSerializer 中 CallExpressionNode 模式匹配参数数量导致的编译错误
This commit is contained in:
parent
ff488ae595
commit
d940e26a0c
@ -182,7 +182,7 @@ public class ASTJsonSerializer {
|
||||
case IdentifierNode(String name) -> exprMap("Identifier", "name", name);
|
||||
case NumberLiteralNode(String value) -> exprMap("NumberLiteral", "value", value);
|
||||
case StringLiteralNode(String value) -> exprMap("StringLiteral", "value", value);
|
||||
case CallExpressionNode(ExpressionNode callee, List<ExpressionNode> arguments) -> {
|
||||
case CallExpressionNode(ExpressionNode callee, List<ExpressionNode> arguments, int line, int column, String file) -> {
|
||||
List<Object> args = new ArrayList<>(arguments.size());
|
||||
for (ExpressionNode arg : arguments) args.add(exprToMap(arg));
|
||||
yield exprMap("CallExpression", "callee", exprToMap(callee), "arguments", args);
|
||||
@ -195,4 +195,4 @@ public class ASTJsonSerializer {
|
||||
default -> Map.of("type", expr.getClass().getSimpleName());
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user