handling merge

This commit is contained in:
Ahmad 2024-05-08 20:54:11 +02:00
commit dea4ba1808
3 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public class StatementGenerator extends DecafBaseVisitor<Statement> {
@Override @Override
public Statement visitReturnVoid(DecafParser.ReturnVoidContext ctx) { public Statement visitReturnVoid(DecafParser.ReturnVoidContext ctx) {
return new Return(null); return new ReturnVoid();
} }
@Override @Override

View File

@ -0,0 +1,5 @@
package de.maishai.ast.records;
public record ReturnVoid() implements Statement {
}

View File

@ -1,4 +1,4 @@
package de.maishai.ast.records; package de.maishai.ast.records;
public sealed interface Statement extends Node permits Assignment, Break, DoWhile, For, IfElse, MethodCall, New, Return, While { public sealed interface Statement extends Node permits Assignment, Break, DoWhile, For, IfElse, MethodCall, New, Return, ReturnVoid, While {
} }