cosmetics.
This commit is contained in:
		
							parent
							
								
									6e0b8f950d
								
							
						
					
					
						commit
						3235cbab7b
					
				
					 3 changed files with 1 additions and 8 deletions
				
			
		|  | @ -29,13 +29,6 @@ public enum TokenType { | ||||||
|     IF, |     IF, | ||||||
|     ELSE; |     ELSE; | ||||||
| 
 | 
 | ||||||
|     public boolean isBinaryOperator() { |  | ||||||
|         return switch (this) { |  | ||||||
|             case PLUS, MINUS, MULT, DIV, MOD, EXP -> true; |  | ||||||
|             default -> false; |  | ||||||
|         }; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     @NotNull |     @NotNull | ||||||
|     public Option<Integer> precedence() { |     public Option<Integer> precedence() { | ||||||
|         return Option.of(switch (this) { |         return Option.of(switch (this) { | ||||||
|  |  | ||||||
|  | @ -55,7 +55,6 @@ public class Generator { | ||||||
|         this.printer.rawLine("global _start"); |         this.printer.rawLine("global _start"); | ||||||
|         this.printer.blank(); |         this.printer.blank(); | ||||||
|         this.printer.label("_start"); |         this.printer.label("_start"); | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private void generateFooter() { |     private void generateFooter() { | ||||||
|  |  | ||||||
|  | @ -124,6 +124,7 @@ final class StmtVisitor { | ||||||
|         this.generator.printer.label(afterElseLabel); |         this.generator.printer.label(afterElseLabel); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     @NotNull | ||||||
|     private String createNextLabel() { |     private String createNextLabel() { | ||||||
|         return "label" + (this.labelCounter++); |         return "label" + (this.labelCounter++); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue