> In the adding-macros-to-the-AST problem that keeps coming up: Does the
> 'unrelated' code generally run pre-macroexpansion, or post-?
>
> If the answer is 'post-macroexpansion', there may be an argument to be
> made for splitting the AST types apart?
>
It is after macro expansion. However, the two AST types would be really
similar to each other; you'd want to generate one from the other using
macros. In fact, I attempted to do this the summer before last, but ran out
of time. (It wasn't a complete waste: it helped exercise and debug the
macro system.) It *might* be more practical to do it now that the macro
system has improved, but it's still no small project, and I wouldn't blame
anyone for vetoing making such a large change to the Rust AST out of a
generally precautionary attitude.

Paul



>
> Glenn
>
> On Mar 4, 2013, at 9:17 AM, Paul Stansifer wrote:
>
> > I'm afraid it's not primarily a parsing issue; it has to do with the
> Rust implementation, in particular that the same AST type holds
> pre-expanded code (potentially containing macro invocations) and
> post-expanded code (in which macro invocations must not be present).
> Changing the identifier type to be
> either-an-identifier-or-a-macro-invocation-producing-an-identifier would
> affect way too much unrelated code. There are a number of ways around the
> problem, but we need to decide which one to do.
> >
> > Paul
> > !DSPAM:5134d6db129152042218820!
> _______________________________________________
> > Rust-dev mailing list
> > Rust-dev@mozilla.org
> > https://mail.mozilla.org/listinfo/rust-dev
> >
> >
> > !DSPAM:5134d6db129152042218820!
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to