diff --git a/src/main/java/ch/fritteli/gombaila/domain/common/TokenType.java b/src/main/java/ch/fritteli/gombaila/domain/common/TokenType.java index 1b68f23..c47f59e 100644 --- a/src/main/java/ch/fritteli/gombaila/domain/common/TokenType.java +++ b/src/main/java/ch/fritteli/gombaila/domain/common/TokenType.java @@ -29,13 +29,6 @@ public enum TokenType { IF, ELSE; - public boolean isBinaryOperator() { - return switch (this) { - case PLUS, MINUS, MULT, DIV, MOD, EXP -> true; - default -> false; - }; - } - @NotNull public Option precedence() { return Option.of(switch (this) { diff --git a/src/main/java/ch/fritteli/gombaila/domain/generator/Generator.java b/src/main/java/ch/fritteli/gombaila/domain/generator/Generator.java index b8af489..982aff7 100644 --- a/src/main/java/ch/fritteli/gombaila/domain/generator/Generator.java +++ b/src/main/java/ch/fritteli/gombaila/domain/generator/Generator.java @@ -55,7 +55,6 @@ public class Generator { this.printer.rawLine("global _start"); this.printer.blank(); this.printer.label("_start"); - } private void generateFooter() { diff --git a/src/main/java/ch/fritteli/gombaila/domain/generator/StmtVisitor.java b/src/main/java/ch/fritteli/gombaila/domain/generator/StmtVisitor.java index 3571200..a3f28d0 100644 --- a/src/main/java/ch/fritteli/gombaila/domain/generator/StmtVisitor.java +++ b/src/main/java/ch/fritteli/gombaila/domain/generator/StmtVisitor.java @@ -124,6 +124,7 @@ final class StmtVisitor { this.generator.printer.label(afterElseLabel); } + @NotNull private String createNextLabel() { return "label" + (this.labelCounter++); }