fixed compilation errors

This commit is contained in:
laurenz 2024-05-08 11:05:27 +02:00
parent c3cd7a7015
commit 7d1b7bc5b0
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public class StatementGenerator extends DecafBaseVisitor<Statement> {
private Assignment generateAssign(DecafParser.AssignContext ctx) { private Assignment generateAssign(DecafParser.AssignContext ctx) {
Id id = new Id(ctx.id().getText()); Id id = new Id(ctx.id().getText());
Expression expr = resolveFancyAssign(ctx.assignSign(), id, new ExpressionGenerator().visit(ctx.expr());); Expression expr = resolveFancyAssign(ctx.assignSign(), id, new ExpressionGenerator().visit(ctx.expr()));
return new Assignment(id, expr); return new Assignment(id, expr);
} }

View File

@ -2,6 +2,7 @@ package de.maishai.typedast.typedclass;
import de.maishai.ast.AssignSign; import de.maishai.ast.AssignSign;
import de.maishai.ast.records.Assignment; import de.maishai.ast.records.Assignment;
import de.maishai.typedast.MethodContext;
import de.maishai.typedast.TypedExpression; import de.maishai.typedast.TypedExpression;
import de.maishai.typedast.TypedNode; import de.maishai.typedast.TypedNode;
import de.maishai.typedast.TypedStatement; import de.maishai.typedast.TypedStatement;
@ -41,7 +42,6 @@ public class TypedAssignment implements TypedStatement {
return typedAssignment; return typedAssignment;
} }
@Override @Override
public void codeGen(MethodVisitor mv, MethodContext ctx) { public void codeGen(MethodVisitor mv, MethodContext ctx) {