Skip to content

Commit

Permalink
cps/spec: document hasLiftableChild (#97)
Browse files Browse the repository at this point in the history
This serves as a walkaround for nim-lang/Nim#17835
  • Loading branch information
alaviss authored May 15, 2021
1 parent 1f66d7b commit f31e43f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cps/spec.nim
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ proc isLiftable*(n: NimNode): bool =
result = n.kind in {nnkProcDef, nnkTypeSection} and n.hasPragma "cpsLift"

proc hasLiftableChild*(n: NimNode): bool =
## does this node contain liftable nodes?
result = anyIt(toSeq items(n), it.isLiftable or it.hasLiftableChild)

when cpsDebug:
Expand Down

0 comments on commit f31e43f

Please sign in to comment.