}
private void push(Token symbol) {
+ /*System.out.println("TOKEN " + symbol.text + " (" + SCLParser.TERMINAL_NAMES[symbol.id] + ")" +
+ " ["
+ + Locations.beginOf(symbol.location) + ".."
+ + Locations.endOf(symbol.location) + "]");*/
if(queueSize == queue.length)
queue = Arrays.copyOf(queue, queueSize*2);
queue[queueSize++] = symbol;
int symbolEnd = Locations.endOf(symbol.location);
if(INDENTABLE.contains(prevTokenId) && symbolId != SCLTerminals.LBRACE) {
- if(prevTokenId == SCLTerminals.LET)
- indentations.add(-1);
push(new Token(SCLTerminals.LBRACE, symbolStart, symbolStart, "implicit {"));
int symbolIndentation = symbolStart-lineStart;
//System.out.println("symbolIndentation = " + symbolIndentation);
case SCLTerminals.LPAREN:
case SCLTerminals.LBRACKET:
case SCLTerminals.IF:
+ case SCLTerminals.LET:
indentations.add(-1);
push(symbol);
return;