mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
new parser: diallow more things
This commit is contained in:
@@ -1705,6 +1705,7 @@ proc parseStmt(p: var TParser): PNode =
|
||||
parMessage(p, errComplexStmtRequiresInd)
|
||||
result = ast.emptyNode
|
||||
else:
|
||||
if p.tok.indent >= 0: parMessage(p, errInvalidIndentation)
|
||||
result = simpleStmt(p)
|
||||
if result.kind == nkEmpty: parMessage(p, errExprExpected, p.tok)
|
||||
while p.tok.tokType == tkSemicolon: getTok(p)
|
||||
|
||||
Reference in New Issue
Block a user