quasi_macros 0.1.7

A quasi-quoting macro system
1
2
3
4
5
6
7
8
9
10
11
b0VIM 7.4��
U�IuC�ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust-quasi/quasi_macros/src/lib.rs
3210#"! Utpf��������og��������c���������g9��������c�!ad�f��]Z��R.-�
�
�
�
�
�
�
�
c
L
/



����g$�����rV6�
�
�
�
~
]
.
�	�	�	�	�	T	,	��mJHG���D!���T�����j0�����e/����O'��zH%#"���                                   sp: Span,pub fn expand_quote_impl_item<'cx>(cx: &mut ExtCtxt,}    base::MacEager::expr(expanded)                                    vec!(), tts);    let expanded = expand_parse_call(cx, sp, "parse_item",                              -> Box<base::MacResult+'cx> {                              tts: &[ast::TokenTree])                              sp: Span,pub fn expand_quote_item<'cx>(cx: &mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_block", Vec::new(), tts);                              -> Box<base::MacResult+'cx> {                              tts: &[ast::TokenTree])                              sp: Span,pub fn expand_quote_block<'cx>(cx: &'cx mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_arm", vec!(), tts);                        -> Box<base::MacResult+'static> {                        tts: &[ast::TokenTree])                        sp: Span,pub fn expand_quote_arm(cx: &mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_pat", vec!(), tts);                             -> Box<base::MacResult+'cx> {                             tts: &[ast::TokenTree])                             sp: Span,pub fn expand_quote_pat<'cx>(cx: &'cx mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_stmt", vec!(), tts);                         -> Box<base::MacResult+'static> {                         tts: &[ast::TokenTree])                         sp: Span,pub fn expand_quote_stmt(cx: &mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_expr", Vec::new(), tts);                              -> Box<base::MacResult+'cx> {                              tts: &[ast::TokenTree])                              sp: Span,pub fn expand_quote_expr<'cx>(cx: &'cx mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_parse_call(cx, sp, "parse_ty", vec!(), tts);                       -> Box<base::MacResult+'static> {                       tts: &[ast::TokenTree])                       sp: Span,pub fn expand_quote_ty(cx: &mut ExtCtxt,}    base::MacEager::expr(expanded)    let expanded = expand_wrapper(sp, cx_expr, expr);    let (cx_expr, expr) = expand_tts(cx, sp, tts);) -> Box<base::MacResult+'cx> {    tts: &[ast::TokenTree],    sp: Span,    cx: &'cx mut ExtCtxt,pub fn expand_quote_tokens<'cx>(///  as antiquotes (splices).///  construction of the same token tree, with token::SubstNt interpreted///  that lifts its argument token-tree to an AST representing the///  This is registered as a set of expression syntax extension called quote!//////  Quasiquoting works via token trees.use rustc::plugin::Registry;use syntax::ptr::P;use syntax::parse::token;use syntax::parse::token::*;use syntax::ext::base;use syntax::ext::base::ExtCtxt;use syntax::codemap::Span;use syntax::ast;extern crate aster;extern crate rustc;extern crate syntax;#![feature(plugin_registrar, unboxed_closures, rustc_private)]// except according to those terms.// option. This file may not be copied, modified, or distributed// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or//// http://rust-lang.org/COPYRIGHT.// file at the top-level directory of this distribution and at// Copyright 2012 The Rust Project Developers. See the COPYRIGHTad�
z!����dA����{]KJ$"!
�
�
�
^
%
��~C
�|zy}    //reg.register_macro("quote_where_clause", expand_quote_where_clause);    reg.register_macro("quote_impl_item", expand_quote_impl_item);    reg.register_macro("quote_item", expand_quote_item);    reg.register_macro("quote_block", expand_quote_block);    reg.register_macro("quote_arm", expand_quote_arm);    reg.register_macro("quote_pat", expand_quote_pat);    reg.register_macro("quote_stmt", expand_quote_stmt);    reg.register_macro("quote_expr", expand_quote_expr);    reg.register_macro("quote_ty", expand_quote_ty);    reg.register_macro("quote_tokens", expand_quote_tokens);pub fn plugin_registrar(reg: &mut Registry) {#[doc(hidden)]#[plugin_registrar]}    expand_wrapper(sp, cx_expr, expr)        .build();        .with_args(arg_exprs)        .build(new_parser_call)    let expr = builder.expr().method_call(parse_method)        .build();        .with_arg(tts_expr)        .with_arg(cfg_call)        .with_arg(parse_sess_call)        .id("new_parser_from_tts")    let new_parser_call = builder.expr().call()        .build();        .id("ext_cx")    let parse_sess_call = builder.expr().method_call("parse_sess")