diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/astalgo.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim index 06611313c..700092e67 100644 --- a/compiler/astalgo.nim +++ b/compiler/astalgo.nim @@ -31,6 +31,15 @@ when declared(echo): proc debug*(n: PType; conf: ConfigRef = nil) {.exportc: "debugType", deprecated.} proc debug*(n: PNode; conf: ConfigRef = nil) {.exportc: "debugNode", deprecated.} + proc typekinds*(t: PType) {.deprecated.} = + var t = t + var s = "" + while t != nil and t.len > 0: + s.add $t.kind + s.add " " + t = t.lastSon + echo s + template debug*(x: PSym|PType|PNode) {.deprecated.} = when compiles(c.config): debug(c.config, x) |