Skip to content

Commit

Permalink
Merge pull request #88 from ringabout/patch-1
Browse files Browse the repository at this point in the history
casting to `nimcall` function types
  • Loading branch information
iffy authored Aug 16, 2024
2 parents b788622 + d51fd3e commit 139c19f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/argparse/macrohelp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type
parent*: NimNode
child*: NimNode

const ident* = (proc(s: string): NimNode)(ident)
const newIdentNode* = (proc(s: string): NimNode)(newIdentNode)
const ident* = (proc(s: string): NimNode {.nimcall.})(newIdentNode)
const newIdentNode* = (proc(s: string): NimNode {.nimcall.})(newIdentNode)

proc replaceNodes*(ast: NimNode): NimNode =
## Replace NimIdent and NimSym by a fresh ident node
Expand Down Expand Up @@ -265,4 +265,4 @@ proc nimRepr*(n:NimNode): string =
of nnkStrLit:
result = "[" & n.strVal & "]"
else:
result = &"<unknown {n.kind} {n.lispRepr}>"
result = &"<unknown {n.kind} {n.lispRepr}>"

0 comments on commit 139c19f

Please sign in to comment.