diff options
author | Araq <rumpf_a@web.de> | 2013-09-03 23:46:41 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-09-03 23:46:41 +0200 |
commit | 40b379859c1f0775718a873a0ba58d32510855aa (patch) | |
tree | 5e45f929dba481fb2413d2f28587a1dbc65b2bb5 /compiler/astalgo.nim | |
parent | 891f871ba71b0b6e136fea13e5be0bd3e0860fea (diff) | |
parent | 6fa72c5d9d9662e6657ddf5c670dc56dc2748ecc (diff) | |
download | Nim-40b379859c1f0775718a873a0ba58d32510855aa.tar.gz |
resolved the conflict
Diffstat (limited to 'compiler/astalgo.nim')
-rw-r--r-- | compiler/astalgo.nim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim index fd6774e7a..6c48dd00f 100644 --- a/compiler/astalgo.nim +++ b/compiler/astalgo.nim @@ -430,11 +430,14 @@ proc debugTree(n: PNode, indent: int, maxRecDepth: int): PRope = appf(result, ",$N$1\"info\": $2", [istr, lineInfoToStr(n.info)]) appf(result, "$N$1}", [spaces(indent)]) -proc debug(n: PSym) = - #writeln(stdout, ropeToStr(symToYaml(n, 0, 1))) - writeln(stdout, ropeToStr(ropef("$1_$2: $3, $4", [ - toRope(n.name.s), toRope(n.id), flagsToStr(n.flags), - flagsToStr(n.loc.flags)]))) +proc debug(n: PSym) = + if n == nil: + writeln(stdout, "null") + else: + #writeln(stdout, ropeToStr(symToYaml(n, 0, 1))) + writeln(stdout, ropeToStr(ropef("$1_$2: $3, $4", [ + toRope(n.name.s), toRope(n.id), flagsToStr(n.flags), + flagsToStr(n.loc.flags)]))) proc debug(n: PType) = writeln(stdout, ropeToStr(debugType(n))) |