From 556b564c7d5f0a980c189af5c2c1b8c9b234f386 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 10 Mar 2017 00:18:24 +0100 Subject: [PATCH] nimsuggest: make tests green again --- compiler/ast.nim | 4 ++-- compiler/parser.nim | 4 ++-- nimsuggest/nimsuggest.nim | 2 +- 3 files changed, 5 insertions(+), 5 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 diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim index 9a1da0e51..8f2e4ff1e 100644 --- a/nimsuggest/nimsuggest.nim +++ b/nimsuggest/nimsuggest.nim @@ -424,7 +424,7 @@ proc execCmd(cmd: string; graph: ModuleGraph; cache: IdentCache; cachedMsgs: Cac else: if gIdeCmd == ideChk: for cm in cachedMsgs: errorHook(cm.info, cm.msg, cm.sev) - execute(gIdeCmd, orig, dirtyfile, line, col-1, graph, cache) + execute(gIdeCmd, orig, dirtyfile, line, col, graph, cache) sentinel() proc recompileFullProject(graph: ModuleGraph; cache: IdentCache) =