Replaced mul with times in initializers
This commit is contained in:
		
							parent
							
								
									1b45d6a0f9
								
							
						
					
					
						commit
						d64e597414
					
				@ -69,6 +69,10 @@ public record Token(Report.Location location, Symbol symbol, String lexeme) impl
 | 
			
		||||
         * Kljucna beseda {@code in}.
 | 
			
		||||
         */
 | 
			
		||||
        IN,
 | 
			
		||||
        /**
 | 
			
		||||
         * Kljucna beseda {@code times}.
 | 
			
		||||
         */
 | 
			
		||||
        TIMES,
 | 
			
		||||
        /**
 | 
			
		||||
         * Kljucna beseda {@code end}.
 | 
			
		||||
         */
 | 
			
		||||
 | 
			
		||||
@ -319,6 +319,7 @@ public class LexAn implements AutoCloseable {
 | 
			
		||||
            case "let" -> Token.Symbol.LET;
 | 
			
		||||
            case "in" -> Token.Symbol.IN;
 | 
			
		||||
            case "end" -> Token.Symbol.END;
 | 
			
		||||
            case "times" -> Token.Symbol.TIMES;
 | 
			
		||||
            default -> null;
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -360,9 +360,9 @@ public class SynAn implements AutoCloseable {
 | 
			
		||||
 | 
			
		||||
    private AST.AtomExpr parseIntegerConstantMultiplier() {
 | 
			
		||||
        Token token = lexAn.peekToken();
 | 
			
		||||
        if (token.symbol() == Token.Symbol.MUL) {
 | 
			
		||||
            // intconstmult -> MUL const
 | 
			
		||||
            check(Token.Symbol.MUL);
 | 
			
		||||
        if (token.symbol() == Token.Symbol.TIMES) {
 | 
			
		||||
            // intconstmult -> TIMES const
 | 
			
		||||
            check(Token.Symbol.TIMES);
 | 
			
		||||
            return parseConstant();
 | 
			
		||||
        }
 | 
			
		||||
        // intconstmult -> ε
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user