macros.$ can now turn a nnkSym into a string.
This commit is contained in:
parent
f73938218e
commit
acc80aaedc
1 changed files with 2 additions and 0 deletions
|
|
@ -649,6 +649,8 @@ proc `$`*(node: PNimrodNode): string {.compileTime.} =
|
||||||
result = $node.basename.ident & "*"
|
result = $node.basename.ident & "*"
|
||||||
of nnkStrLit..nnkTripleStrLit:
|
of nnkStrLit..nnkTripleStrLit:
|
||||||
result = node.strVal
|
result = node.strVal
|
||||||
|
of nnkSym:
|
||||||
|
result = $node.symbol
|
||||||
else:
|
else:
|
||||||
badNodeKind node.kind, "$"
|
badNodeKind node.kind, "$"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue