Advertisement
Guest User

Untitled

a guest
May 18th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.23 KB | None | 0 0
  1. import macros
  2.  
  3. macro bar(s: untyped): untyped = s
  4.  
  5. dumpTree:
  6.     proc foo() {.bar.} = echo "OK"
  7.  
  8. proc foo() {.bar.} = echo "OK"
  9.  
  10. macro check(procPtr: typed) =
  11.   echo getImpl(procPtr).treeRepr
  12.  
  13. if isMainModule:
  14.   check(foo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement