summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-03-10 00:18:24 +0100
committerAraq <rumpf_a@web.de>2017-03-10 00:18:24 +0100
commit556b564c7d5f0a980c189af5c2c1b8c9b234f386 (patch)
tree03da89f54ca089a8b480ac79633cde9d8c868d56 /compiler
parent57ea01309eb7ff1425fb3bc7907c67139fc50edf (diff)
downloadNim-556b564c7d5f0a980c189af5c2c1b8c9b234f386.tar.gz
nimsuggest: make tests green again
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim4
-rw-r--r--compiler/parser.nim4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 66fbe577c..177def594 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -736,7 +736,7 @@ type
 
   TLibKind* = enum
     libHeader, libDynamic
-    
+
   TLib* = object              # also misused for headers!
     kind*: TLibKind
     generated*: bool          # needed for the backends:
@@ -744,7 +744,7 @@ type
     name*: Rope
     path*: PNode              # can be a string literal!
 
-    
+
   CompilesId* = int ## id that is used for the caching logic within
                     ## ``system.compiles``. See the seminst module.
   TInstantiation* = object
diff --git a/compiler/parser.nim b/compiler/parser.nim
index d34a6d88a..0503b29eb 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -2002,12 +2002,12 @@ proc parseStmt(p: var TParser): PNode =
           break
         p.hasProgress = false
         var a = complexOrSimpleStmt(p)
-        if not p.hasProgress and p.tok.tokType == tkEof: break
-        if a.kind != nkEmpty and p.hasProgress:
+        if a.kind != nkEmpty:
           addSon(result, a)
         else:
           parMessage(p, errExprExpected, p.tok)
           getTok(p)
+        if not p.hasProgress and p.tok.tokType == tkEof: break
   else:
     # the case statement is only needed for better error messages:
     case p.tok.tokType