only 1 argument allowed for command expressions

This commit is contained in:
Araq
2014-02-02 00:00:56 +01:00
parent bd9f6505c1
commit 70eff919cd

View File

@@ -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)