Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import macros
- template bar() {.pragma.}
- dumpTree:
- proc foo() {.bar.} = echo "OK"
- proc foo() {.bar.} = echo "OK"
- macro check(procPtr: typed) =
- echo getImpl(procPtr).treeRepr
- assert(procPtr.hasCustomPragma(bar))
- if isMainModule:
- check(foo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement