renderer.nim: support for outputting symbol magics for debugging

This commit is contained in:
Araq 2017-11-30 12:09:19 +01:00
commit 34f07d10f2

View file

@ -826,6 +826,9 @@ proc gident(g: var TSrcGen, n: PNode) =
t = tkOpr t = tkOpr
put(g, t, s) put(g, t, s)
if n.kind == nkSym and (renderIds in g.flags or sfGenSym in n.sym.flags): if n.kind == nkSym and (renderIds in g.flags or sfGenSym in n.sym.flags):
when defined(debugMagics):
put(g, tkIntLit, $n.sym.id & $n.sym.magic)
else:
put(g, tkIntLit, $n.sym.id) put(g, tkIntLit, $n.sym.id)
proc doParamsAux(g: var TSrcGen, params: PNode) = proc doParamsAux(g: var TSrcGen, params: PNode) =