only 1 argument allowed for command expressions
This commit is contained in:
parent
bd9f6505c1
commit
70eff919cd
1 changed files with 10 additions and 6 deletions
|
|
@ -672,12 +672,14 @@ proc primarySuffix(p: var TParser, r: PNode): PNode =
|
||||||
let a = result
|
let a = result
|
||||||
result = newNodeP(nkCommand, p)
|
result = newNodeP(nkCommand, p)
|
||||||
addSon(result, a)
|
addSon(result, a)
|
||||||
while p.tok.tokType != tkEof:
|
addSon result, parseExpr(p)
|
||||||
let a = parseExpr(p)
|
when false:
|
||||||
addSon(result, a)
|
while p.tok.tokType != tkEof:
|
||||||
if p.tok.tokType != tkComma: break
|
let a = parseExpr(p)
|
||||||
getTok(p)
|
addSon(result, a)
|
||||||
optInd(p, a)
|
if p.tok.tokType != tkComma: break
|
||||||
|
getTok(p)
|
||||||
|
optInd(p, a)
|
||||||
if p.tok.tokType == tkDo:
|
if p.tok.tokType == tkDo:
|
||||||
parseDoBlocks(p, result)
|
parseDoBlocks(p, result)
|
||||||
else:
|
else:
|
||||||
|
|
@ -1103,7 +1105,9 @@ proc parseExprStmt(p: var TParser): PNode =
|
||||||
#| doBlocks
|
#| doBlocks
|
||||||
#| / macroColon
|
#| / macroColon
|
||||||
#| ))?
|
#| ))?
|
||||||
|
inc p.inPragma
|
||||||
var a = simpleExpr(p)
|
var a = simpleExpr(p)
|
||||||
|
dec p.inPragma
|
||||||
if p.tok.tokType == tkEquals:
|
if p.tok.tokType == tkEquals:
|
||||||
getTok(p)
|
getTok(p)
|
||||||
optInd(p, result)
|
optInd(p, result)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue