new parser: diallow more things

This commit is contained in:
Araq
2013-04-23 23:11:33 +02:00
parent 61e9bd0c48
commit f182cefc08

View File

@@ -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)