Stream: general

Topic: eager expansion


Alexander Regueiro (Sep 25 2018 at 14:48, on Zulip):

@Vadim Petrochenkov Hey, a few macro-related questions if you don't mind...

Alexander Regueiro (Sep 25 2018 at 14:48, on Zulip):

the macro "collection" code is a bit cryptic to me
this is where it gathers tokens into invocations right?
an unfortunate lack of comments
any clarification would be appreciated

Vadim Petrochenkov (Sep 25 2018 at 22:40, on Zulip):

Do you mean InvocationCollector in expand.rs?

Vadim Petrochenkov (Sep 25 2018 at 22:41, on Zulip):

Yes, it visits an AST fragment and collects all macro invocations, of any form - m!()/#[a]/#[derive(D)]

Vadim Petrochenkov (Sep 25 2018 at 22:46, on Zulip):

It's a folder rather than visitor because it leaves stubs (placeholders) in place of macro invocations and also performs cfg expansion.

Alexander Regueiro (Sep 26 2018 at 22:04, on Zulip):

Okay, thanks. I'll have a closer look shortly.

Last update: Dec 12 2019 at 01:50UTC