fixes critical 'do' parsing bug

This commit is contained in:
Andreas Rumpf 2016-05-28 02:17:06 +02:00
commit 0134a51a7c
2 changed files with 82 additions and 2 deletions

View file

@ -964,8 +964,9 @@ proc parseDoBlock(p: var TParser): PNode =
proc parseDoBlocks(p: var TParser, call: PNode) =
#| doBlocks = doBlock ^* IND{=}
if p.tok.tokType == tkDo:
addSon(call, parseDoBlock(p))
while sameInd(p) and p.tok.tokType == tkDo:
#withInd(p):
# addSon(call, parseDoBlock(p))
while sameOrNoInd(p) and p.tok.tokType == tkDo:
addSon(call, parseDoBlock(p))
proc parseProcExpr(p: var TParser, isExpr: bool): PNode =