summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-01-25 14:22:05 +0100
committerAraq <rumpf_a@web.de>2014-01-25 14:22:05 +0100
commit9af1ab5f4331b4857f6bcc57a8c7318faea36a7e (patch)
tree6738255d35a7b9819425819f83eaf749d9affb19 /compiler
parentc4cb795081db776fe7ea2b96840c22dafebc2214 (diff)
downloadNim-9af1ab5f4331b4857f6bcc57a8c7318faea36a7e.tar.gz
fixes a minor parser bug
Diffstat (limited to 'compiler')
-rw-r--r--compiler/parser.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 1084c3b4a..3765557b9 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -1209,8 +1209,7 @@ proc parseReturnOrRaise(p: var TParser, kind: TNodeKind): PNode =
   if p.tok.tokType == tkComment:
     skipComment(p, result)
     addSon(result, ast.emptyNode)
-  elif p.tok.indent >= 0 and p.tok.indent <= p.currInd or
-      p.tok.tokType == tkEof:
+  elif p.tok.indent >= 0 and p.tok.indent <= p.currInd or not isExprStart(p):
     # NL terminates:
     addSon(result, ast.emptyNode)
   else: