Skip to content

libsyntax: Add more quasiquoting macros #29780

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

Merged
merged 1 commit into from
Nov 12, 2015
Merged

libsyntax: Add more quasiquoting macros #29780

merged 1 commit into from
Nov 12, 2015

Conversation

KyleMayes
Copy link
Contributor

This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made.

I've added the quote_arg!, quote_block!, quote_path!, and quote_meta_item! quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., quote_struct_field! or quote_variant!) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit.

I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@brson
Copy link
Contributor

brson commented Nov 11, 2015

r? @nrc

@rust-highfive rust-highfive assigned nrc and unassigned brson Nov 11, 2015
@nrc
Copy link
Member

nrc commented Nov 11, 2015

cc @eddyb

@nrc
Copy link
Member

nrc commented Nov 11, 2015

lgtm, I don't have an issue with adding more quasi-quoting. i'll hold off on r+'ing though to give the rest of @rust-lang/compiler a chance to have a look.

@nikomatsakis
Copy link
Contributor

Seems ok to me.

@nrc
Copy link
Member

nrc commented Nov 12, 2015

@bors: r+

@bors
Copy link
Collaborator

bors commented Nov 12, 2015

📌 Commit 8c88308 has been approved by nrc

bors added a commit that referenced this pull request Nov 12, 2015
This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made.

I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit.

I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.
@bors
Copy link
Collaborator

bors commented Nov 12, 2015

⌛ Testing commit 8c88308 with merge 5a87288...

@bors bors merged commit 8c88308 into rust-lang:master Nov 12, 2015
@KyleMayes KyleMayes deleted the quote-ext branch November 14, 2015 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants