debug output: show line info earlier
This commit is contained in:
parent
e359dfd1bf
commit
6d10b365fe
1 changed files with 1 additions and 1 deletions
|
|
@ -386,6 +386,7 @@ proc debugTree(n: PNode, indent: int, maxRecDepth: int;
|
||||||
var istr = rspaces(indent + 2)
|
var istr = rspaces(indent + 2)
|
||||||
result = "{$N$1\"kind\": $2" %
|
result = "{$N$1\"kind\": $2" %
|
||||||
[istr, makeYamlString($n.kind)]
|
[istr, makeYamlString($n.kind)]
|
||||||
|
addf(result, ",$N$1\"info\": $2", [istr, lineInfoToStr(n.info)])
|
||||||
if maxRecDepth != 0:
|
if maxRecDepth != 0:
|
||||||
case n.kind
|
case n.kind
|
||||||
of nkCharLit..nkUInt64Lit:
|
of nkCharLit..nkUInt64Lit:
|
||||||
|
|
@ -418,7 +419,6 @@ proc debugTree(n: PNode, indent: int, maxRecDepth: int;
|
||||||
addf(result, "$N$1$2", [rspaces(indent + 4), debugTree(n.sons[i],
|
addf(result, "$N$1$2", [rspaces(indent + 4), debugTree(n.sons[i],
|
||||||
indent + 4, maxRecDepth - 1, renderType)])
|
indent + 4, maxRecDepth - 1, renderType)])
|
||||||
addf(result, "$N$1]", [istr])
|
addf(result, "$N$1]", [istr])
|
||||||
addf(result, ",$N$1\"info\": $2", [istr, lineInfoToStr(n.info)])
|
|
||||||
addf(result, "$N$1}", [rspaces(indent)])
|
addf(result, "$N$1}", [rspaces(indent)])
|
||||||
|
|
||||||
proc debug(n: PSym) =
|
proc debug(n: PSym) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue