more fixes for new integer promotion rules; fixes #152; fixes #157; fixes #156; fixes #155

This commit is contained in:
Araq 2012-07-09 21:11:11 +02:00
commit 4966212141
8 changed files with 27 additions and 20 deletions

View file

@ -391,6 +391,7 @@ proc symToYaml(n: PSym, indent: int = 0, maxRecDepth: int = - 1): PRope =
var marker = InitIntSet()
result = symToYamlAux(n, marker, indent, maxRecDepth)
proc debugTree(n: PNode, indent: int, maxRecDepth: int): PRope
proc debugType(n: PType): PRope =
if n == nil:
result = toRope("null")
@ -407,6 +408,9 @@ proc debugType(n: PType): PRope =
app(result, "null")
else:
app(result, debugType(n.sons[i]))
if n.kind == tyObject and n.n != nil:
app(result, ", node: ")
app(result, debugTree(n.n, 2, 100))
app(result, ")")
proc debugTree(n: PNode, indent: int, maxRecDepth: int): PRope =