summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-23 23:11:33 +0200
committerAraq <rumpf_a@web.de>2013-04-23 23:11:33 +0200
commitf182cefc08929334d4ca70c73b0f37cd3a288b8e (patch)
tree385d28f5fe518ab530dddddfdd1ab3c790e86ec4 /compiler
parent61e9bd0c485b8e5890749f6abbe464f3228c6d4e (diff)
downloadNim-f182cefc08929334d4ca70c73b0f37cd3a288b8e.tar.gz
new parser: diallow more things
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 45eb6de9f..517297a87 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -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)