On 13-02-22 01:47 PM, John Clements wrote:
> I've added scope to macros on my personal branch, and it immediately
> heightens the need for splicing item macros. Paul, I know you've thought
> about this a couple of times. I see two obvious solutions.
>
> 1) enrich "fold" to make it possible to return multiple items in some
> contexts.
> 2) add a "group" form--much like a block--that's silently flattened by the
> expander.
>
> I think I'm leaning toward #2, because it immediately works for pattern-based
> macros, rather than requiring a special "this is multiple forms" annotation.
>
> Thoughts?
- I don't really understand #1. It's just the same idea but in fold,
not expand?
- #2 will vanish into thin air when/if results are token trees, yes?
- the folder might, itself, also vanish someday, since expander
is the main user and it might wind up expanding TTs, not ASTs, yes?
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev