fix #20067, fix #18976 [backport] (#20069)

This commit is contained in:
metagn
2022-07-22 10:04:07 +03:00
committed by GitHub
parent 1a9123eb90
commit 685bf944aa
2 changed files with 31 additions and 1 deletions

View File

@@ -1360,7 +1360,9 @@ proc `$`*(node: NimNode): string =
of nnkOpenSymChoice, nnkClosedSymChoice:
result = $node[0]
of nnkAccQuoted:
result = $node[0]
result = ""
for i in 0 ..< node.len:
result.add(repr(node[i]))
else:
badNodeKind node, "$"