diff options
author | Araq <rumpf_a@web.de> | 2016-12-18 20:21:03 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-12-18 20:21:03 +0100 |
commit | 6d10b365feaf6c5634a9698caa4e885f8a47daae (patch) | |
tree | 9735fc9579d4cccbea0592150d1dce1c427cc35d | |
parent | e359dfd1bfb56d49274f3a228523702c56e45bef (diff) | |
download | Nim-6d10b365feaf6c5634a9698caa4e885f8a47daae.tar.gz |
debug output: show line info earlier
-rw-r--r-- | compiler/astalgo.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim index 7c07b2995..affbdffd9 100644 --- a/compiler/astalgo.nim +++ b/compiler/astalgo.nim @@ -386,6 +386,7 @@ proc debugTree(n: PNode, indent: int, maxRecDepth: int; var istr = rspaces(indent + 2) result = "{$N$1\"kind\": $2" % [istr, makeYamlString($n.kind)] + addf(result, ",$N$1\"info\": $2", [istr, lineInfoToStr(n.info)]) if maxRecDepth != 0: case n.kind 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], indent + 4, maxRecDepth - 1, renderType)]) addf(result, "$N$1]", [istr]) - addf(result, ",$N$1\"info\": $2", [istr, lineInfoToStr(n.info)]) addf(result, "$N$1}", [rspaces(indent)]) proc debug(n: PSym) = |