summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-07-03 01:56:40 +0200
committerAraq <rumpf_a@web.de>2015-07-03 01:57:01 +0200
commit6b3abdba0f930bb714644a368a0d23b169c30a8c (patch)
tree05340c45790560503ee511fe7277fd766853c9b1
parent841a179d2880c032c99d372c798611aec244441c (diff)
downloadNim-6b3abdba0f930bb714644a368a0d23b169c30a8c.tar.gz
made macros.$ a bit smarter; but really this one needs to die
-rw-r--r--lib/core/macros.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 7e6e4ccc9..21eebfa6a 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -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, "$"