nimsuggest works in macros

This commit is contained in:
Andreas Rumpf 2017-02-07 10:43:33 +01:00
commit d7e312ee13
3 changed files with 225 additions and 2 deletions

View file

@ -1052,6 +1052,8 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
# work without now. template/tsymchoicefield doesn't like an early exit
# here at all!
#if isSymChoice(n.sons[1]): return
when defined(nimsuggest):
if gCmd == cmdIdeTools: suggestExpr(c, n)
var s = qualifiedLookUp(c, n, {checkAmbiguity, checkUndeclared, checkModule})
if s != nil: