There was this PR that might give you hints how to do it: [https://github.com/nim-lang/Nim/pull/12567](https://github.com/nim-lang/Nim/pull/12567)
- Macros - organizing code mantielero
- Re: Macros - organizing code b3liever
- Re: Macros - organizing code mratsim
- Re: Macros - organizing code mantielero