mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 08:18:03 +00:00
fix main method null check
This commit is contained in:
parent
0b720eedcd
commit
ec5cb4b490
@ -28,7 +28,7 @@ public class ASTGenerator {
|
||||
constructors.add(new Constructor(ctx.id().IDENTIFIER().getText(), List.of(), new Block(List.of())));
|
||||
}
|
||||
Block mainmeth = null;
|
||||
if (ctx.mainmeth().isEmpty()) {
|
||||
if (!ctx.mainmeth().isEmpty()) {
|
||||
if (ctx.mainmeth().size() > 1) {
|
||||
throw new RuntimeException("Only one main method allowed!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user