syntex_syntax 0.1.0

Export of libsyntax for code generation
1
2
3
4
5
6
7
8
b0VIM 7.4�خT���
ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust/src/libsyntax/parse/lexer/mod.rs
3210#"! Utpw��������ex��������Z���������n7��������V���������^���������dY��������Z���������L��������dc��������d���������U+��������W���������g���������k>��������c���������T`adw�{XU��M)(�
�
�
�
�
d
c
I
:
,


����vucbO1��w^:�
�
�
�
C


�	�	�	�	�	�	�	�		d	R	P	O	1		��T9����wW>=��yZXW0���d#�����uoR)#����yoigfC$����vpL    }        self.sp_diag.span_fatal(self.cur_span, m);    fn fatal(&self, m: &str) -> ! {    }        r        debug!("TtReader: r={:?}", r);        let r = tt_next_token(self);    fn next_token(&mut self) -> TokenAndSpan {    }        self.cur_tok == token::Eof    fn is_eof(&self) -> bool {impl<'a> Reader for TtReader<'a> {}    }        }            sp: self.peek_span,            tok: self.peek_tok.clone(),        TokenAndSpan {        // FIXME(pcwalton): Bad copy!    fn peek(&self) -> TokenAndSpan {    }        self.err_span(self.peek_span, m)    fn err(&self, m: &str) {    }        self.fatal_span(self.peek_span, m)    fn fatal(&self, m: &str) -> ! {    }        ret_val        self.advance_token();        };            sp: self.peek_span,            tok: replace(&mut self.peek_tok, token::Underscore),        let ret_val = TokenAndSpan {    fn next_token(&mut self) -> TokenAndSpan {    /// Return the next token. EFFECT: advances the string_reader.    fn is_eof(&self) -> bool { self.curr.is_none() }impl<'a> Reader for StringReader<'a> {}    read_embedded_ident: bool,    /// Is \x00<name>,<ctxt>\x00 is interpreted as encoded ast::Ident?    // are revised to go directly to token-trees.    // FIXME (Issue #16472): This field should go away after ToToken impls    pub peek_span: Span,    pub peek_tok: token::Token,    /* cached: */    pub filemap: Rc<codemap::FileMap>,    pub curr: Option<char>,    /// The last character to be read    pub col: CharPos,    /// The column of the next character to read    pub last_pos: BytePos,    /// The absolute offset within the codemap of the last character read(curr)    pub pos: BytePos,    /// The absolute offset within the codemap of the next character to read    pub span_diagnostic: &'a SpanHandler,pub struct StringReader<'a> {}    pub sp: Span,    pub tok: token::Token,pub struct TokenAndSpan {#[derive(Clone, PartialEq, Eq, Show)]}    }        t        }            }                _ => break                },                    t = self.next_token();                token::Whitespace | token::Comment | token::Shebang(_) => {            match t.tok {        loop {        let mut t = self.next_token();    fn real_token(&mut self) -> TokenAndSpan {    /// Get a token the parser cares about.    fn peek(&self) -> TokenAndSpan;    fn err(&self, &str);    /// Report a non-fatal error with the current span.    fn fatal(&self, &str) -> !;    /// Report a fatal error with the current span.    fn next_token(&mut self) -> TokenAndSpan;    fn is_eof(&self) -> bool;pub trait Reader {pub mod comments;pub use ext::tt::transcribe::{TtReader, new_tt_reader, new_tt_reader_with_doc_flag};use std::string::CowString;use std::str;use std::rc::Rc;use std::num;use std::mem::replace;use std::fmt;use std::char;use std::borrow::IntoCow;use parse::token::{str_to_ident};use parse::token;use ext::tt::transcribe::tt_next_token;use diagnostic::SpanHandler;use codemap;use codemap::{BytePos, CharPos, CodeMap, Pos, Span};use ast;// 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-2013 The Rust Project Developers. See the COPYRIGHTad�
.����y_����710.-}    }        assert_eq!(lexer.next_token().tok, token::Literal(token::Char(token::intern("a")), None));        }            _ => panic!("expected a comment!")            token::Comment => { },        match lexer.next_token().tok {        let mut lexer = setup(&sh, "/* /* */ */'a'".to_string());        let sh = mk_sh();    #[test] fn nested_block_comments() {    }        assert!(!is_doc_comment("////"));        assert!(is_doc_comment("/// blah"));