summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2021-04-30 17:17:29 +0200
committerGitHub <noreply@github.com>2021-04-30 17:17:29 +0200
commit76f93877cdb2a2baf28eed6edda5bcc96f4ef404 (patch)
tree46f4e6347f82f2fc1c10e844d5946882f9b50cfa /compiler
parent20248a68fd867ce64822698b316f1a8b6300d7ca (diff)
downloadNim-76f93877cdb2a2baf28eed6edda5bcc96f4ef404.tar.gz
Small parser loop fix (#17904)
* Fix loop on error with nim check in semiStmtList
* Add test
Diffstat (limited to 'compiler')
-rw-r--r--compiler/parser.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index fd9d06de5..9cddf8e4f 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -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