]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLPostLexer.java
Merged changes from SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / parser / SCLPostLexer.java
index 4a446e6e2f2027af55c80c9fbd06da7cd30f8200..866fb8c985c4126b6e368746b83c767953c66cda 100644 (file)
@@ -79,6 +79,10 @@ public class SCLPostLexer {
     }
     
     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;
@@ -117,8 +121,6 @@ public class SCLPostLexer {
         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);
@@ -149,6 +151,7 @@ public class SCLPostLexer {
         case SCLTerminals.LPAREN:
         case SCLTerminals.LBRACKET:
         case SCLTerminals.IF:
+        case SCLTerminals.LET:
             indentations.add(-1);
             push(symbol);
             return;