How to emit :macro_param in quote in macro?

QuoteNode(x) rather than esc(x) should do the trick.

This section on quoting Metaprogramming · The Julia Language covers it. The whole metaprogramming page is worth several reads if you’re wanting to implement macros.

2 Likes