syntex_syntax 0.4.3

Export of libsyntax for code generation
1
2
3
4
5
6
b0VIM 7.4V*4UX�-ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust/src/libsyntax/ext/deriving/cmp/partial_eq.rsutf-8
3210#"! Utp^ad�^��]Z��R.-�
�
�
�
}
[
O
N

���LJ�n]=	�
�
9
&
%
�	�	�	�	^		����xD��ta`
���X:43��qY<	��oL��������tT!����}rLER}    trait_def.expand(cx, mitem, item, push)    };        associated_types: Vec::new(),        ),            md!("ne", cs_ne)            md!("eq", cs_eq),        methods: vec!(        generics: LifetimeBounds::empty(),        additional_bounds: Vec::new(),        path: path_std!(cx, core::cmp::PartialEq),        attributes: Vec::new(),        span: span,    let trait_def = TraitDef {    }        } }            }                }))                    $f(a, b, c)                combine_substructure: combine_substructure(Box::new(|a, b, c| {                attributes: attrs,                ret_ty: Literal(path_local!(bool)),                args: vec!(borrowed_self()),                explicit_self: borrowed_explicit_self(),                generics: LifetimeBounds::empty(),                name: $name,            MethodDef {            let attrs = vec!(cx.attribute(span, inline));            let inline = cx.meta_word(span, InternedString::new("inline"));        ($name:expr, $f:ident) => { {    macro_rules! md {    }            cx, span, substr)            Box::new(|cx, span, _, _| cx.expr_bool(span, true)),            cx.expr_bool(span, false),            },                cx.expr_binary(span, ast::BiOr, subexpr, eq)                let eq = cx.expr_binary(span, ast::BiNe, self_f, other_f.clone());                };                    _ => cx.span_bug(span, "not exactly 2 arguments in `derive(PartialEq)`")                    (1, Some(o_f)) => o_f,                let other_f = match (other_fs.len(), other_fs.get(0)) {            |cx, span, subexpr, self_f, other_fs| {            true,  // use foldl        cs_fold(    fn cs_ne(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {    }            cx, span, substr)            Box::new(|cx, span, _, _| cx.expr_bool(span, false)),            cx.expr_bool(span, true),            },                cx.expr_binary(span, ast::BiAnd, subexpr, eq)                let eq = cx.expr_binary(span, ast::BiEq, self_f, other_f.clone());                };                    _ => cx.span_bug(span, "not exactly 2 arguments in `derive(PartialEq)`")                    (1, Some(o_f)) => o_f,                let other_f = match (other_fs.len(), other_fs.get(0)) {            |cx, span, subexpr, self_f, other_fs| {            true,  // use foldl        cs_fold(    fn cs_eq(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {    // any fields are not equal or if the enum variants are different    // structures are equal if all fields are equal, and non equal, if{                                  push: &mut FnMut(P<Item>))                                  item: &Item,                                  mitem: &MetaItem,                                  span: Span,pub fn expand_deriving_partial_eq(cx: &mut ExtCtxt,use ptr::P;use parse::token::InternedString;use ext::deriving::generic::ty::*;use ext::deriving::generic::*;use ext::build::AstBuilder;use ext::base::ExtCtxt;use codemap::Span;use ast::{MetaItem, Item, Expr, self};// 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 2013 The Rust Project Developers. See the COPYRIGHT