diff options
| author | bors <bors@rust-lang.org> | 2015-11-12 20:31:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-12 20:31:12 +0000 |
| commit | 5a872880bd42f5fc56a3ae35aa05a4e239f5bd35 (patch) | |
| tree | 9ba70793feeae9a817ffdad1b49a1b1ff260e0a5 /src/libsyntax/print | |
| parent | 15e7824f1ce2f622afc195e72469f3c01f88a1f3 (diff) | |
| parent | 8c88308c68691b795815a776d41b3aa11717c146 (diff) | |
| download | rust-5a872880bd42f5fc56a3ae35aa05a4e239f5bd35.tar.gz rust-5a872880bd42f5fc56a3ae35aa05a4e239f5bd35.zip | |
Auto merge of #29780 - KyleMayes:quote-ext, r=nrc
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.
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index fad0b7869f0..5b8f5c0aef6 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -305,6 +305,7 @@ pub fn token_to_string(tok: &Token) -> String { token::NtTraitItem(ref e) => trait_item_to_string(&**e), token::NtGenerics(ref e) => generics_to_string(&*e), token::NtWhereClause(ref e) => where_clause_to_string(&*e), + token::NtArg(ref e) => arg_to_string(&*e), } } } |
