For example, I have two different member macros that can generate some new methods for a struct. When I need to use them simultaneously, I have to invoke them sequentially. I'm wondering if there is a way, similar to the '&' in protocols, to combine different macros.
@macroA
@macroB
struct Test {}
@macroA&B
struct Test {}
I tried using expression macros to invoke other macros, but I found that the code generated by macros is not subject to second-level expansion by the compiler, and this approach doesn't work.
#macroA&B
// @macroA ERROR: Expected macro expansion to produce an expression
// @macroB ERROR: Expected declaration
struct Test {}
Is there any other way to meet my requirements? I urgently need to combine some macros with small granularity of functionality.