quote!() expanded
| { | |
| use syntax::ext::quote::rt::*; | |
| let ext_cx = &*cx; | |
| new_parser_from_tts(ext_cx.parse_sess(), | |
| ext_cx.cfg(), | |
| { | |
| let _sp = | |
| ext_cx.call_site(); | |
| let mut tt = | |
| ::std::vec::Vec::new(); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("syntax"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("ext"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("deriving"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("generic"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("ty"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("Ty"), | |
| ::syntax::parse::token::ModName))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::ModSep)); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::Ident(ext_cx.ident_of("Literal"), | |
| ::syntax::parse::token::Plain))); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::OpenDelim(::syntax::parse::token::Paren))); | |
| tt.extend(expr.to_tokens(ext_cx).into_iter()); | |
| tt.push(::syntax::ast::TtToken(_sp, | |
| ::syntax::parse::token::CloseDelim(::syntax::parse::token::Paren))); | |
| tt | |
| }).parse_expr() | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment