mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 09:28:03 +00:00
Parser bugfix
This commit is contained in:
parent
fb8bfb719a
commit
c3a9dd1f1d
@ -90,6 +90,11 @@ public class ExpressionGenerator extends DecafBaseVisitor<Expression> {
|
||||
throw new RuntimeException("No operator found!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression visitStatementExpressionexpr(DecafParser.StatementExpressionexprContext ctx) {
|
||||
return ctx.stmtexpr().accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression visitMethodCall(DecafParser.MethodCallContext ctx) {
|
||||
boolean isField = ctx.methCall().THIS() != null;
|
||||
|
@ -20,6 +20,7 @@ import de.maishai.ast.records.While;
|
||||
import de.maishai.typedast.Type;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class StatementGenerator extends DecafBaseVisitor<List<Statement>> {
|
||||
@ -100,6 +101,11 @@ public class StatementGenerator extends DecafBaseVisitor<List<Statement>> {
|
||||
null), fieldIdContext.id().IDENTIFIER().getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Statement> visitStatementExpressionstmt(DecafParser.StatementExpressionstmtContext ctx) {
|
||||
return ctx.stmtexpr().accept(this);
|
||||
}
|
||||
|
||||
//StatementExpression
|
||||
@Override
|
||||
public List<Statement> visitMethodCall(DecafParser.MethodCallContext ctx) {
|
||||
|
Loading…
Reference in New Issue
Block a user