Render bug: if expression with statement list expression as condition (#8375)

* Fixes #8348
This commit is contained in:
cooldome 2018-07-21 13:01:47 +02:00 • committed by Andreas Rumpf
commit ec02940185
3 changed files with 29 additions and 5 deletions

View file

@ -568,6 +568,7 @@ proc parsePar(p: var TParser): PNode =
result = newNodeP(nkPar, p)
getTok(p)
optInd(p, result)
flexComment(p, result)
if p.tok.tokType in {tkDiscard, tkInclude, tkIf, tkWhile, tkCase,
tkTry, tkDefer, tkFinally, tkExcept, tkFor, tkBlock,
tkConst, tkLet, tkWhen, tkVar,