How do multiple "@"-style macros compose?

I've seen many macro examples. For "#"-style macros, multiple macros either are in series or are nested, so interaction is easy to figure out. The "@"-style macros can do far more extensive things (like multi-line new structures), making me wonder how do multiple ones compose. Is it simply expanding from the top-most macro call downward (i.e. in)? Can macros' final effect differ by changing the listed order?

1 Like

Macros only see the original code, so a macro can't process the expansion produced by another macro, and that means they don't really "compose" meaningfully in the sense of @MacroA @MacroB order.

Order would only matter if a macro inspected the other attributes/macros applied to the same declaration, and generated different code depending on that order.

4 Likes