I have been testing some nested macro invocations, and they worked as expected (...as expected by me!) For instance, supposing a ficticious add macro and the following expression:
add(1, add(2, 3))
Firstly the inner add is expanded (2 + 3) and secondly the outter one does its part (1 + (2 + 3)). I have seen that the outter macro does not receive any noise from the internal invocation -in the input expression- so the inner expansion seems totally transparent to it. Does this fact always hold (even with more complex macros and types)? Is it safe to do so?
Innermost macros are always expanded first (even if they are provided as by-name arguments).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With