Too many syntax object types in macros
So it turns out we can't quite remove SyntaxOrTermWrapper like I thought. I'd forgotten about the inner method that returns a new MacroContext, which is necessary because it allows expand inside of delimiters.
So currently a macro can get:
- a
SyntaxOrTermWrapperviactx.next().value - a
SyntaxTermvia#``foo``.get(0)
Previously it was:
- a
SyntaxOrTermWrapperviactx.next().value - a
Syntaxvia#``foo``.get(0)
I'm not a fan of macro authors needing to know about two different representations of the syntax, but I'm not really sure what else to do about it. Maybe the distinction can be papered over by a higher-level API macro authors import in? Maybe we modify SyntaxOrTermWrapper to behave a bit more like a Term but with the inner method still being special?