From 6b3abdba0f930bb714644a368a0d23b169c30a8c Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 3 Jul 2015 01:56:40 +0200 Subject: made macros.$ a bit smarter; but really this one needs to die --- lib/core/macros.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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, "$" -- cgit 1.4.1-2-gfad0