tgetimpl.nim 251 B

123456789101112131415161718192021
  1. discard """
  2. msg: '''"muhaha"
  3. proc poo(x, y: int) =
  4. echo ["poo"]'''
  5. """
  6. import macros
  7. const
  8. foo = "muhaha"
  9. proc poo(x, y: int) =
  10. echo "poo"
  11. macro m(x: typed): untyped =
  12. echo repr x.symbol.getImpl
  13. result = x
  14. discard m foo
  15. discard m poo