Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse 2.0 macro syntax #271

Closed
dtolnay opened this issue Dec 18, 2017 · 3 comments
Closed

Parse 2.0 macro syntax #271

dtolnay opened this issue Dec 18, 2017 · 3 comments
Labels

Comments

@dtolnay
Copy link
Owner

dtolnay commented Dec 18, 2017

The current syntax looks like this.

pub macro run_passes($tcx:ident, $mir:ident, $def_id:ident, $suite_index:expr; $($pass:expr,)*) {{
    /* same as usual */
}}
@dtolnay dtolnay added the syntax label Dec 18, 2017
@dtolnay
Copy link
Owner Author

dtolnay commented Dec 18, 2017

I implemented the bare minimum to pass tests in 500d832, will need to revisit what these look like in the AST.

@mystor
Copy link
Collaborator

mystor commented Dec 18, 2017

I think that your implementation is fine for now. We can come back to it & clean up the AST once the AST used by rustc stabilizes some more.

@dtolnay
Copy link
Owner Author

dtolnay commented Dec 27, 2017

I kept the AST but restricted the grammar in e082403 -- the arguments must be parenthesized and the body must be braced.

@dtolnay dtolnay closed this as completed Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants