better nimsuggest support

This commit is contained in:
Araq
2015-11-03 14:52:23 +01:00
parent 5c8342eef9
commit ae60f4ae76
2 changed files with 5 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ proc evalTemplateArgs(n: PNode, s: PSym): PNode =
else: 0
var
# XXX: Since immediate templates are not subjected to the
# XXX: Since immediate templates are not subject to the
# standard sigmatching algorithm, they will have a number
# of deficiencies when it comes to generic params:
# Type dependencies between the parameters won't be honoured
@@ -126,9 +126,9 @@ proc evalTemplate*(n: PNode, tmpl, genSymOwner: PSym): PNode =
renderTree(result, {renderNoComments}))
else:
result = copyNode(body)
ctx.instLines = body.kind notin {nkStmtList, nkStmtListExpr,
nkBlockStmt, nkBlockExpr}
if ctx.instLines: result.info = n.info
#ctx.instLines = body.kind notin {nkStmtList, nkStmtListExpr,
# nkBlockStmt, nkBlockExpr}
#if ctx.instLines: result.info = n.info
for i in countup(0, safeLen(body) - 1):
evalTemplateAux(body.sons[i], args, ctx, result)

View File

@@ -163,6 +163,7 @@ proc myImportModule(c: PContext, n: PNode): PSym =
localError(n.info, errGenerated, "A module cannot import itself")
if sfDeprecated in result.flags:
message(n.info, warnDeprecated, result.name.s)
#suggestSym(n.info, result, false)
proc evalImport(c: PContext, n: PNode): PNode =
result = n