4 ms·
In a language with macros that might be ambiguous, since there will usually be a phase called "macro expansion".
by kibwen 11y ago
In a language with macros that might be ambiguous, since there will usually be a phase called "macro expansion".
- kazinator 11y agoThat is correct. Expansion isn't necessarily macro expansion. But it's the same kind of thing and may even be be done in the same code walking pass (and possibly have to). (Since the constructs being expanded could be generated by macros, then if the expansions also use macros in their syntax, the two have to be interleaved.) The difference is minor: it's basically "does the code walker specially recognize this construct and invoke some code to expand it" versus "does the code walker recognize a macro call and invoke it to expand it".