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

This commit is contained in:
metagn 2022-07-22 10:04:07 +03:00 • committed by GitHub
commit 685bf944aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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, "$"