-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
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. |
r? @nrc |
cc @eddyb |
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. |
Seems ok to me. |
@bors: r+ |
📌 Commit 8c88308 has been approved by |
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.
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!
, andquote_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!
orquote_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.