eval context for macros lives as long as the current module is compiled

This commit is contained in:
Araq 2011-10-28 01:38:41 +02:00
commit a0a8934a4f
6 changed files with 68 additions and 25 deletions

View file

@ -257,6 +257,9 @@ proc semVar(c: PContext, n: PNode): PNode =
for j in countup(0, length-3):
var v = semIdentDef(c, a.sons[j], skVar)
addInterfaceDecl(c, v)
if def != nil and def.kind != nkEmpty:
# this is only needed for the evaluation pass:
v.ast = def
if a.kind != nkVarTuple:
v.typ = typ
b = newNodeI(nkIdentDefs, a.info)