Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Macros #4

Open
ehuss opened this issue Oct 11, 2018 · 1 comment
Open

Macros #4

ehuss opened this issue Oct 11, 2018 · 1 comment

Comments

@ehuss
Copy link
Contributor

ehuss commented Oct 11, 2018

How exactly will macros be handled?

Will the macro part of the grammar simply indicate token trees, or should there be more to it? What needs to be addressed here?

Will the grammar's rules exactly match what the different fragment specifier types (expr, stmt, etc.) accept in rustc?

@CAD97
Copy link
Contributor

CAD97 commented Oct 12, 2018

I think macros shouldn't be handled any special.

i.e. the grammar for macro invocation should just be $ident ! ( $tt* ).

Any more information in the grammar would require back-information for what the macro definition is.

I do think that we should try to match productions to what the macro matchers accept, though this I think would be a soft rather than hard requirement. (macros 2.0 has some room to change what are matched.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants