From 9af1ab5f4331b4857f6bcc57a8c7318faea36a7e Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 25 Jan 2014 14:22:05 +0100 Subject: [PATCH] fixes a minor parser bug --- compiler/parser.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/parser.nim b/compiler/parser.nim index 1084c3b4a3..3765557b9d 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: