diff --git a/src/main/java/astGenerator/ASTGenerator.java b/src/main/java/astGenerator/ASTGenerator.java index 6c5cbc4..886f7b0 100644 --- a/src/main/java/astGenerator/ASTGenerator.java +++ b/src/main/java/astGenerator/ASTGenerator.java @@ -68,7 +68,7 @@ public class ASTGenerator extends DecafBaseVisitor { public Node visitConstuctorDecl(DecafParser.ConstuctorDeclContext ctx) { String name = ctx.Identifier().getText(); ParameterList parameterList = (ParameterList) visit(ctx.parameterList()); - return new MethodDecl("", "", name, parameterList, new BlockStatement(new ArrayList<>(), "void")); + return new MethodDecl("", null, name, parameterList, new BlockStatement(new ArrayList<>(), "void")); } @Override