Small parser loop fix (#17904)
* Fix loop on error with nim check in semiStmtList * Add test
This commit is contained in:
parent
20248a68fd
commit
76f93877cd
2 changed files with 5 additions and 1 deletions
|
|
@ -556,6 +556,7 @@ proc semiStmtList(p: var Parser, result: PNode) =
|
|||
let a = complexOrSimpleStmt(p)
|
||||
if a.kind == nkEmpty:
|
||||
parMessage(p, errExprExpected, p.tok)
|
||||
getTok(p)
|
||||
else:
|
||||
result.add a
|
||||
dec p.inSemiStmtList
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue