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
commit 6b3abdba0f

View file

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