nimsuggest: make tests green again

This commit is contained in:
Araq 2017-03-10 00:18:24 +01:00
commit 556b564c7d
3 changed files with 5 additions and 5 deletions

View file

@ -2002,12 +2002,12 @@ proc parseStmt(p: var TParser): PNode =
break break
p.hasProgress = false p.hasProgress = false
var a = complexOrSimpleStmt(p) var a = complexOrSimpleStmt(p)
if not p.hasProgress and p.tok.tokType == tkEof: break if a.kind != nkEmpty:
if a.kind != nkEmpty and p.hasProgress:
addSon(result, a) addSon(result, a)
else: else:
parMessage(p, errExprExpected, p.tok) parMessage(p, errExprExpected, p.tok)
getTok(p) getTok(p)
if not p.hasProgress and p.tok.tokType == tkEof: break
else: else:
# the case statement is only needed for better error messages: # the case statement is only needed for better error messages:
case p.tok.tokType case p.tok.tokType

View file

@ -424,7 +424,7 @@ proc execCmd(cmd: string; graph: ModuleGraph; cache: IdentCache; cachedMsgs: Cac
else: else:
if gIdeCmd == ideChk: if gIdeCmd == ideChk:
for cm in cachedMsgs: errorHook(cm.info, cm.msg, cm.sev) 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() sentinel()
proc recompileFullProject(graph: ModuleGraph; cache: IdentCache) = proc recompileFullProject(graph: ModuleGraph; cache: IdentCache) =