Fix for some comments during if statements
added test files
This commit is contained in:
parent
58855c2fc7
commit
5f905865be
3 changed files with 25 additions and 1 deletions
|
|
@ -1473,12 +1473,12 @@ proc parseIf(p: var TParser): PNode =
|
|||
while true:
|
||||
getTok(p) # skip ``if``
|
||||
var branch = newNodeP(nkElifBranch, p)
|
||||
skipCom(p, branch)
|
||||
eat(p, pxParLe, branch)
|
||||
addSon(branch, expression(p))
|
||||
eat(p, pxParRi, branch)
|
||||
addSon(branch, nestedStatement(p))
|
||||
addSon(result, branch)
|
||||
skipCom(p, branch)
|
||||
if p.tok.s == "else":
|
||||
getTok(p, result)
|
||||
if p.tok.s != "if":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue