mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2025-01-30 00:48:13 +00:00
Parser return bugfix
This commit is contained in:
parent
3a267180ba
commit
ca9f6cc06a
@ -20,7 +20,7 @@ public class BlockGenerator extends DecafBaseVisitor<Block> {
|
||||
}
|
||||
}
|
||||
if (ctx.return_() != null){
|
||||
statements.add(ctx.return_().isEmpty() ? new Return(null) : new Return(new ExpressionGenerator().visit(ctx.return_())));
|
||||
statements.add(ctx.return_().expr().isEmpty() ? new Return(null) : new Return(new ExpressionGenerator().visit(ctx.return_().expr())));
|
||||
}
|
||||
return new Block(statements);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user