syntex_syntax 0.7.0

Export of libsyntax for code generation
1
2
3
4
5
6
7
8
9
10
11
12
13
b0VIM 7.4��tU9�B�ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust-syntex/syntex_syntax/src/print/pprust.rs	3210#"! Utp u��������iv��������I���������x(��������z��������k~�������c�}�������Y�|�������VA{�������Z�z�������[�y�������SLx�������_�w�������`�v�������c^u�������W�t�������ks�������Z�r�������U�q�������Y2p�������g�o�������n�n�������\`m�������]�l�������g	k�������s�	j�������\�	i�������jO
h�������`�
g�������af�������uz"�adu�{XU��M)(
�
�
�
�
�
Q
*

���nP�������mP1�
�
�
�
�
�
V


�	�	�	�	�	�	�		j	V	T	S	<	 		��uY@>=�����u4(����}dMB'
�����A���^5��|R���h4    if is_expanded && std_inject::use_std(krate) {                                      is_expanded);                                      ann,                                      out,                                      input,                                      filename,                                      span_diagnostic,    let mut s = State::new_from_input(cm,                       is_expanded: bool) -> io::Result<()> {                       ann: &'a PpAnn,                       out: Box<Write+'a>,                       input: &mut Read,                       filename: String,                       krate: &ast::Crate,                       span_diagnostic: &diagnostic::SpanHandler,pub fn print_crate<'a>(cm: &'a CodeMap,/// copy forward./// it can scan the input text for comments and literals to/// Requires you to pass an input filename and reader so thatpub const default_columns: usize = 78;#[allow(non_upper_case_globals)]pub const indent_unit: usize = 4;#[allow(non_upper_case_globals)]}    }        ann: ann,        boxes: Vec::new(),        },            cur_lit: 0            cur_cmnt: 0,        cur_cmnt_and_lit: CurrentCommentAndLiteral {        literals: None,        comments: None,        cm: None,        s: pp::mk_printer(writer, default_columns),    State {                                  ann: &'a PpAnn) -> State<'a> {pub fn rust_printer_annotated<'a>(writer: Box<Write+'a>,}    rust_printer_annotated(writer, &NO_ANN)    static NO_ANN: NoAnn = NoAnn;pub fn rust_printer<'a>(writer: Box<Write+'a>) -> State<'a> {}    ann: &'a (PpAnn+'a),    boxes: Vec<pp::Breaks>,    cur_cmnt_and_lit: CurrentCommentAndLiteral,    literals: Option<Vec<comments::Literal> >,    comments: Option<Vec<comments::Comment> >,    cm: Option<&'a CodeMap>,    pub s: pp::Printer<'a>,pub struct State<'a> {}    cur_lit: usize,    cur_cmnt: usize,pub struct CurrentCommentAndLiteral {#[derive(Copy, Clone)]impl PpAnn for NoAnn {}pub struct NoAnn;#[derive(Copy, Clone)]}    fn post(&self, _state: &mut State, _node: AnnNode) -> io::Result<()> { Ok(()) }    fn pre(&self, _state: &mut State, _node: AnnNode) -> io::Result<()> { Ok(()) }pub trait PpAnn {}    NodePat(&'a ast::Pat),    NodeExpr(&'a ast::Expr),    NodeSubItem(ast::NodeId),    NodeItem(&'a ast::Item),    NodeBlock(&'a ast::Block),    NodeName(&'a ast::Name),    NodeIdent(&'a ast::Ident),pub enum AnnNode<'a> {use std::iter;use std::io::{self, Write, Read};use std::ascii;use str::slice_shift_char;use std_inject;use ptr::P;use print::pp::Breaks::{Consistent, Inconsistent};use print::pp::{Breaks, eof};use print::pp::{self, break_offset, word, space, zerobreak, hardbreak};use parse;use parse::lexer::comments;use parse::token::{self, BinOpToken, Token, InternedString};use diagnostic;use codemap::{self, CodeMap, BytePos};use attr::{AttrMetaMethods, AttributeMethods};use owned_slice::OwnedSlice;use attr;use ast_util;use ast::{RegionTyParamBound, TraitTyParamBound, TraitBoundModifier};use ast;use abi;pub use self::AnnNode::*;// 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-2014 The Rust Project Developers. See the COPYRIGHTad�
8"��S&������_^�
�
�
m
P
2
&
%
������9��@:87}    }                   lit_to_string(&codemap::dummy_spanned(neg_int)));        assert_eq!(format!("-{}", lit_to_string(&codemap::dummy_spanned(pos_int))),        let neg_int = ast::LitInt((!42 + 1) as u64, ast::SignedIntLit(ast::TyI32, ast::Minus));        let pos_int = ast::LitInt(42, ast::SignedIntLit(ast::TyI32, ast::Plus));    fn test_signed_int_to_string() {    #[test]    }        assert_eq!(varstr, "pub principal_skinner");        let varstr = variant_to_string(&var);        });            vis: ast::Public,            disr_expr: None,            id: 0,            kind: ast::TupleVariantKind(Vec::new()),            // making this up as I go.... ?            attrs: Vec::new(),            name: ident,        let var = codemap::respan(codemap::DUMMY_SP, ast::Variant_ {        let ident = token::str_to_ident("principal_skinner");    fn test_variant_to_string() {    #[test]    }                   "fn abba()");                                 None, &generics),                                 abba_ident,                                 ast::Constness::NotConst,        assert_eq!(fun_to_string(&decl, ast::Unsafety::Normal,        let generics = ast_util::empty_generics();