Compare commits

...

2 Commits

Author SHA1 Message Date
9cf2ff6f37 Merge remote-tracking branch 'origin/master' 2024-06-25 17:09:26 +02:00
b402857713 fix methodCall 2024-06-25 17:09:16 +02:00

View File

@ -206,8 +206,12 @@ public class ASTGenerator extends DecafBaseVisitor<Node> {
for(DecafParser.ReceivingMethodContext receivingMethod: ctx.receivingMethod()) {
receivingMethods.add((ReceivingMethod) visit(receivingMethod));
}
Receiver receiver = (Receiver) visit(ctx.receiver());
return new MethodCallStatementExpression(methodName, receiver, receivingMethods, arguments);
if (ctx.receiver() != null) {
Receiver receiver = (Receiver) visit(ctx.receiver());
return new MethodCallStatementExpression(methodName, receiver, receivingMethods, arguments);
} else {
return new MethodCallStatementExpression(methodName, null, receivingMethods, arguments);
}
}
@Override