renderer.nim: more obvious debug output

This commit is contained in:
Araq 2020-07-10 09:45:41 +02:00 • committed by Andreas Rumpf
commit 78513a9204

View file

@ -1016,11 +1016,21 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
put(g, tkRStrLit, '\"' & replace(n[1].strVal, "\"", "\"\"") & '\"') put(g, tkRStrLit, '\"' & replace(n[1].strVal, "\"", "\"\"") & '\"')
else: else:
gsub(g, n, 1) gsub(g, n, 1)
of nkHiddenStdConv, nkHiddenSubConv, nkHiddenCallConv: of nkHiddenStdConv, nkHiddenSubConv:
if n.len >= 2: if n.len >= 2:
gsub(g, n[1]) gsub(g, n[1])
else: else:
put(g, tkSymbol, "(wrong conv)") put(g, tkSymbol, "(wrong conv)")
of nkHiddenCallConv:
if renderIds in g.flags:
accentedName(g, n[0])
put(g, tkParLe, "(")
gcomma(g, n, 1)
put(g, tkParRi, ")")
elif n.len >= 2:
gsub(g, n[1])
else:
put(g, tkSymbol, "(wrong conv)")
of nkCast: of nkCast:
put(g, tkCast, "cast") put(g, tkCast, "cast")
put(g, tkBracketLe, "[") put(g, tkBracketLe, "[")