made macros.$ a bit smarter; but really this one needs to die

This commit is contained in:
Araq
2015-07-03 01:56:40 +02:00
parent 841a179d28
commit 6b3abdba0f

View File

@@ -708,6 +708,8 @@ proc `$`*(node: NimNode): string {.compileTime.} =
result = node.strVal
of nnkSym:
result = $node.symbol
of nnkOpenSymChoice, nnkClosedSymChoice:
result = $node[0]
else:
badNodeKind node.kind, "$"