twrapiterator.nim 244 B

1234567891011121314151617181920
  1. import macros
  2. # bug #7093
  3. macro foobar(arg: untyped): untyped =
  4. let procDef = quote do:
  5. proc foo(): void =
  6. echo "bar"
  7. result = newStmtList(
  8. arg, procDef
  9. )
  10. echo result.repr
  11. iterator bar(): int {.foobar.} =
  12. discard