next steps to hygienic templates

This commit is contained in:
Araq
2012-08-20 08:44:17 +02:00
parent 5e15dec175
commit da190876de
17 changed files with 97 additions and 76 deletions

View File

@@ -1470,7 +1470,8 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
of nkTypeOfExpr:
var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc})
typ = makeTypedesc(c, typ)
var sym = newSym(skType, getIdent"TypeOfExpr", typ.owner).linkTo(typ)
var sym = newSym(skType, getIdent"TypeOfExpr",
typ.owner, n.info).linkTo(typ)
sym.flags.incl(sfAnon)
result = newSymNode(sym, n.info)
of nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand, nkCallStrLit: