mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 17:08:03 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
fdac5aa346
@ -106,9 +106,11 @@ public class ExpressionGenerator extends DecafBaseVisitor<Expression> {
|
|||||||
public Expression visitNew(DecafParser.NewContext ctx) {
|
public Expression visitNew(DecafParser.NewContext ctx) {
|
||||||
Type type = ASTGenerator.getType(ctx.type());
|
Type type = ASTGenerator.getType(ctx.type());
|
||||||
List<Expression> args = new ArrayList<>();
|
List<Expression> args = new ArrayList<>();
|
||||||
for (var expr : ctx.args().expr()) {
|
if (ctx.args() != null) {
|
||||||
Expression astExpr = expr.accept(this);
|
for (var expr : ctx.args().expr()) {
|
||||||
args.add(astExpr);
|
Expression astExpr = expr.accept(this);
|
||||||
|
args.add(astExpr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new New(type, args);
|
return new New(type, args);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user