summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-02 00:00:56 +0100
committerAraq <rumpf_a@web.de>2014-02-02 00:00:56 +0100
commit70eff919cd6fa7a0f1443125ba29706328117046 (patch)
tree0dc9712c41acc277648111cf6f7404397d63dade /compiler
parentbd9f6505c18a3d90248be49e1146cddc297a66d2 (diff)
downloadNim-70eff919cd6fa7a0f1443125ba29706328117046.tar.gz
only 1 argument allowed for command expressions
Diffstat (limited to 'compiler')
-rw-r--r--compiler/parser.nim16
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 3765557b9..4497e360a 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -672,12 +672,14 @@ proc primarySuffix(p: var TParser, r: PNode): PNode =
         let a = result
         result = newNodeP(nkCommand, p)
         addSon(result, a)
-        while p.tok.tokType != tkEof:
-          let a = parseExpr(p)
-          addSon(result, a)
-          if p.tok.tokType != tkComma: break
-          getTok(p)
-          optInd(p, a)
+        addSon result, parseExpr(p)
+        when false:
+          while p.tok.tokType != tkEof:
+            let a = parseExpr(p)
+            addSon(result, a)
+            if p.tok.tokType != tkComma: break
+            getTok(p)
+            optInd(p, a)
         if p.tok.tokType == tkDo:
           parseDoBlocks(p, result)
         else:
@@ -1103,7 +1105,9 @@ proc parseExprStmt(p: var TParser): PNode =
   #|              doBlocks
   #|               / macroColon
   #|            ))?
+  inc p.inPragma
   var a = simpleExpr(p)
+  dec p.inPragma
   if p.tok.tokType == tkEquals: 
     getTok(p)
     optInd(p, result)