new parser: diallow more things
This commit is contained in:
parent
61e9bd0c48
commit
f182cefc08
1 changed files with 1 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue