better nimsuggest support
This commit is contained in:
parent
5c8342eef9
commit
ae60f4ae76
2 changed files with 5 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue