summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-10-02 07:57:30 +0200
committerAraq <rumpf_a@web.de>2013-10-02 07:57:30 +0200
commit422327c01005ae0c7c7238636a96e741923a77d8 (patch)
treee4aae9f942c8088a009de23740498a152e4db37a /compiler
parenta943905d6cb705d5e5ab18e96c880aa7b42128a1 (diff)
downloadNim-422327c01005ae0c7c7238636a96e741923a77d8.tar.gz
fixed another semicolon related parsing bug
Diffstat (limited to 'compiler')
-rw-r--r--compiler/parser.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 1411043e4..e8439466a 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -1798,10 +1798,9 @@ proc parseStmt(p: var TParser): PNode =
         if p.tok.indent == p.currInd:
           nil
         elif p.tok.tokType == tkSemicolon:
-          while p.tok.tokType == tkSemicolon:
-            getTok(p)
-            if p.tok.indent < 0 or p.tok.indent == p.currInd: discard
-            else: return
+          getTok(p)
+          if p.tok.indent < 0 or p.tok.indent == p.currInd: discard
+          else: break
         else:
           if p.tok.indent > p.currInd:
             parMessage(p, errInvalidIndentation)