syntex_syntax 0.3.0

Export of libsyntax for code generation
b0VIM 7.4.1U�D�-ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust/src/libsyntax/parse/lexer/mod.rsutf-8
3210#"! UtpV%S1v6�Y�$`7T�_�`X	X�
Lg\]�
` S�b�g5l�V+^ad�V�{XU��M)(�
�
�
�
�
f
e
O
@
2
#

�������pR$���[/�
�
�
d
9
&

�	�	�	�	�	�	�	�	�	r	p	o	Q	'	��tY(����w^]��zy,������~lUF8)H$������\E��������P+��    }        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    source_iter: ite    source_it    source_i    source_it    source_iter: iter    s    sourc    source_ite    source_iter: iter::Peekable<str::CharIndices<'a>>,    source_text: &'a str,    // retrieve it via `self.filemap.src.as_ref().unwrap()` all the time.    // cache a direct reference to the source text, so that we don't have to    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, Debug)]}    }        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::str;use std::rc::Rc;use std::mem::replace;use std::iter;use std::fmt;use std::char;use std::borrow::Cow;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 COPYRIGHTadx@	+�te[Z9���|R.�
u
6
��P��f`_:�
�
�
�
�
q
/

�	�	�	I	C	B	@	?	}    }        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"));        assert!(is_doc_comment("///"));    #[test] fn line_doc_comments() {    }                                  Some(token::intern("suffix"))));                   token::Literal(token::BinaryRaw(token::intern("raw"), 3),        assert_eq!(setup(&mk_sh(), "br###\"raw\"###suffix".to_string()).next_token().tok,                                  Some(token::intern("suffix"))));                   token::Literal(token::StrRaw(token::intern("raw"), 3),        assert_eq!(setup(&mk_sh(), "r###\"raw\"###suffix".to_string()).next_token().tok,                                  Some(token::intern("us"))));                   token::Literal(token::Integer(token::intern("2")),        assert_eq!(setup(&mk_sh(), "2us".to_string()).next_token().tok,        test!("1.0e10", Float, "1.0e10");        test!("1.0", Float, "1.0");        test!("0xABC", Integer, "0xABC");        test!("0b101", Integer, "0b101");        test!("1234", Integer, "1234");        test!("b\"a\"", Binary, "a");        test!("\"a\"", Str_, "a");        test!("b'a'", Byte, "a");        test!("'a'", Char, "a");        }            }}                                          None));                           token::Literal(token::$tok_type(token::intern($tok_contents)),ad�7���0����u<! �
�
�
W
@
?

��{m776540����^�
�
�
              while i < s.len() {            let mut j = 0;            }                }                   while i < s.len() {            le            while i < s.len() {                    while i < s.len() {                  while i < s.len() {            let mut j = 0;                                           if j < s.len() { buf.push_str(&s[j..]); }            }                }                    rdr.err_span_(pos, end_pos, errmsg);                    let end_pos = start + BytePos(next as u32);                    let pos = start + BytePos(i as u32);                    };                        None => s.len(),                        Some(&(next, _)) => next,                        Some(&(_, '\n')) => { continue; }                    let next = match chars.peek() {                    j = i;                    if j < i { buf.push_str(&s[j..i]); }                if ch == '\r' {            for (i, ch) in chars {            let mut j = 0;            buf.push_str(&s[..i]);            let mut buf = String::with_capacity(s.len());                           mut chars: iter::Peekable<str::CharIndices>) -> String {                           s: &str, errmsg: &str, i: usize,        fn translate_crlf_(rdr: &StringReader, start: BytePos,ad�JY��)��n:43�
�
�
r
S
&
�����h1��mZLB<;�
�
�
�
9

�	�	�	t	n	m	'	��~3���~=����7����>
���oS#���\7$#��|ndcJ/�K            while i < s.len() {            let mut j = 0;            let mut buf = String::with_capacity(s.len        s.into()        }             return s.into();         return s.into();        }            }                self.err_span_(pos, end_pos, errmsg);                let end_pos = start + BytePos(next as u32);                let pos = start + BytePos(i as u32);                };                    None => s.len(),                    Some(&(next, _)) => next,                    }                        return translate_crlf_(self, start, s, errmsg, i, chars).into();                    Some(&(_, '\n')) => {                let next = match chars.peek() {            if ch == '\r' {        for (i, ch) in chars {        let mut chars = s.char_indices().peekable();                          s: &'b str, errmsg: &'b str) -> Cow<'b, str> {    fn translate_crlf<'b>(&self, start: BytePos,    /// Converts CRLF to LF in the given string, raising an error on bare CR.    }                            self.byte_offset(end).to_usize()])        f(&self.source_text[self.byte_offset(start).to_usize()..    {        F: FnOnce(&str) -> T,    fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where    /// up to but excluding `end`.    /// Calls `f` with a string slice of the source text spanning from `start`    }        self.with_str_from_to(start, end, token::intern)        debug!("taking an ident from {:?} to {:?}", start, end);    pub fn name_from_to(&self, start: BytePos, end: BytePos) -> ast::Name {    /// As name_from, with an explicit endpoint.    }        self.with_str_from(start, token::intern)        debug!("taking an ident from {:?} to {:?}", start, self.last_pos);    pub fn name_from(&self, start: BytePos) -> ast::Name {    /// single-byte delimiter).    /// adjusted 1 towards each other (assumes that on either side there is a    /// Create a Name from a given offset to the current offset, each    }        self.with_str_from_to(start, self.last_pos, f)    {        F: FnOnce(&str) -> T,    pub fn with_str_from<T, F>(&self, start: BytePos, f: F) -> T where    /// the character `self.curr`.    /// up to but excluding `self.last_pos`, meaning the slice does not include    /// Calls `f` with a string slice of the source text spanning from `start`    }        (pos - self.filemap.start_pos)    fn byte_offset(&self, pos: BytePos) -> BytePos {    }        }            }                };                                                    self.last_pos);                    self.peek_span = codemap::mk_sp(start_bytepos,                    self.peek_tok = self.next_token_inner();                    let start_bytepos = self.last_pos;                } else {                    self.peek_tok = token::Eof;                if self.is_eof() {            None => {            },                self.peek_tok = comment.tok;                self.peek_span = comment.sp;            Some(comment) => {        match self.scan_whitespace_or_comment() {    fn advance_token(&mut self) {    /// possibly update the interner.    /// Advance peek_tok and peek_span to refer to the next token, and    }        self.fatal_span_(from_pos, to_pos, &m[..]);        m.push_str(&self.source_text[from..to]);        let to = self.byte_offset(to_pos).to_usize();        let from = self.byte_offset(from_pos).to_usize();        m.push_str(": ");    fn fatal_span_verbose(&self, from_pos: BytePos, to_pos: BytePos, mut m: String) -> ! {    /// offending string to the error message    /// Report a lexical error spanning [`from_pos`, `to_pos`), appending thead#�T��k+���V,�
�
�
c

��mE'���S�
�
t
U
T

�	�	�	j	M		��O����tF4����fE32���I��_0��l+�������dO���            // # to handle shebang at start of file -- this is the entry point        match self.curr.unwrap_or('\0') {    fn scan_whitespace_or_comment(&mut self) -> Option<TokenAndSpan> {    /// return None.    /// If there is whitespace, shebang, or a comment, scan it. Otherwise,    }        }            None        } else {            None            }                }                    });                        sp: codemap::mk_sp(start, self.last_pos)                        tok: token::Shebang(self.name_from(start)),                    return Some(TokenAndSpan {                    while !self.curr_is('\n') && !self.is_eof() { self.bump(); }                    let start = self.last_pos;                    // FIXME: Add shebang "token", return it                if loc.line == 1 && loc.col == CharPos(0) {                debug!("Skipping a shebang");                let loc = cmap.lookup_char_pos_adj(self.last_pos);                cmap.files.borrow_mut().push(self.filemap.clone());                let cmap = CodeMap::new();                // we're at the beginning of the file...                // I guess this is the only way to figure out if                }                    return None;                if self.nextnextch_is('[') {                // Parse an inner attribute.            if self.nextch_is('!') {        } else if self.curr_is('#') {            }                _ => None                }                    self.scan_block_comment()                    self.bump(); self.bump();                Some('*') => {                }                    }                        });                            sp: codemap::mk_sp(start_bpos, self.last_pos)                            tok: token::Comment,                        return Some(TokenAndSpan {                        while !self.curr_is('\n') && !self.is_eof() { self.bump(); }                        let start_bpos = self.last_pos - BytePos(2);                    } else {                        });                            });                                sp: codemap::mk_sp(start_bpos, self.last_pos)                                tok: tok,                            return Some(TokenAndSpan{                            };                                token::Comment                            } else {                                token::DocComment(token::intern(string))                            let tok = if is_doc_comment(string) {                            // but comments with only more "/"s are not                        return self.with_str_from(start_bpos, |string| {                        }                            self.bump();                            }                                _ => ()                                }                                    }                                                       "bare CR not allowed in doc-comment");                                        self.err_span_(self.last_pos, self.pos,                                    } else {                                        break                                        // CRLF                                    if self.nextch_is('\n') {                                '\r' => {                                '\n' => break,                            match self.curr.unwrap() {                        while !self.is_eof() {                        let start_bpos = self.pos - BytePos(3);                    if self.curr_is('/') || self.curr_is('!') {                    // line comments starting with "///" or "//!" are doc-comments                    self.bump();                    self.bump();ad�_���VD5��l@�
�
�
�
�
{
q
k
j
B

�vA@����bI�
�
�
b
L

�	�	�	�	y	X	F	,			������{7���F�����{a#	�u/���~:���i#���n/���                                                c: char,        fn bump_expecting_char<'a,D:fmt::Debug>(r: &mut StringReader<'a>,    fn scan_embedded_hygienic_ident(&mut self) -> ast::Ident {    #[inline(never)]    /// `\x00` marker.    /// integer (the ctxt), separate by a comma and delimited by a    /// (the name) and `CCCCCCC` is a string of characters forming an    /// whence: `NNNNNN` is a string of characters forming an integer    /// Scan through input of form \x00name_NNNNNN,ctxt_CCCCCCC\x00    // favors rustc debugging effectiveness over runtime efficiency.    // programs, pnkfelix deliberately chose to write it in a way that    // and the functionality it provides is not exposed to end user    // Since this function is only used for certain internal macros,    //    // Issues #15750 and #15962.)    // -> token-trees.  (The function is currently used to resolve    // impls to go directly to token-trees instead of thing -> string    // should go away after we revise the syntax::ext::quote::ToToken    // FIXME (Issue #16472): The scan_embedded_hygienic_ident function    }        })            })                sp: codemap::mk_sp(start_bpos, self.last_pos)                tok: tok,            Some(TokenAndSpan{            };                token::Comment            } else {                token::DocComment(token::intern(&string[..]))                } else { string.into() };                                        "bare CR not allowed in block doc-comment")                    self.translate_crlf(start_bpos, string,                let string = if has_cr {            let tok = if is_block_doc_comment(string) {            // but comments with only "*"s between two "/"s are not        self.with_str_from(start_bpos, |string| {        }            self.bump();            }                _ => ()                }                    has_cr = true;                '\r' => {                }                    self.bump();                    level -= 1;                '*' if self.nextch_is('/') => {                }                    self.bump();                    level += 1;                '/' if self.nextch_is('*') => {            match n {            let n = self.curr.unwrap();            }                self.fatal_span_(start_bpos, last_bpos, msg);                let last_bpos = self.last_pos;                };                    "unterminated block comment"                } else {                    "unterminated block doc-comment"                let msg = if is_doc_comment {            if self.is_eof() {        while level > 0 {        let mut has_cr = false;        let mut level: isize = 1;        let start_bpos = self.last_pos - BytePos(2);        let is_doc_comment = self.curr_is('*') || self.curr_is('!');        // block comments starting with "/**" or "/*!" are doc-comments    fn scan_block_comment(&mut self) -> Option<TokenAndSpan> {    /// Might return a sugared-doc-attr    }        }            _ => None            },                c                debug!("scanning whitespace: {:?}", c);                });                    sp: codemap::mk_sp(start_bpos, self.last_pos)                    tok: token::Whitespace,                let c = Some(TokenAndSpan {                while is_whitespace(self.curr) { self.bump(); }                let start_bpos = self.last_pos;            c if is_whitespace(Some(c)) => {            },                c                debug!("scanning a comment {:?}", c);                let c = self.scan_comment();            '/' | '#' => {            // for skipping over all "junk"ad.�`��e2�|ndc$#�
�
�
�
w
B
8
7

����Y��rfeH�
�
�
�
�
X
0


�	y	!				���qF@?����@���sT��s.��x!����|\NC=<���}|gfP"��                'b' => { self.bump(); base = 2; num_digits = self.scan_digits(2, 10); }            match self.curr.unwrap_or('\0') {        if c == '0' {        self.bump();        let start_bpos = self.last_pos;        let mut base = 10;        let mut num_digits;    fn scan_number(&mut self, c: char) -> token::Lit {    /// Lex a LIT_INTEGER or a LIT_FLOAT    }        };            }                _ => return len                }                    self.bump();                    len += 1;                    }                                                real_radix));                                       &format!("invalid digit for a base {} literal",                        self.err_span_(self.last_pos, self.pos,                    if c.unwrap().to_digit(real_radix).is_none() {                    // in range for the true radix                    // check that the hypothetical digit is actually                    debug!("{:?} in scan_digits", c);                Some(_) => {            match c.and_then(|cc| cc.to_digit(scan_radix)) {            if c == Some('_') { debug!("skipping a _"); self.bump(); continue; }            let c = self.curr;        loop {        let mut len = 0;        assert!(real_radix <= scan_radix);    fn scan_digits(&mut self, real_radix: u32, scan_radix: u32) -> usize {    /// between `real_radix` and `scan_radix`.    /// interested in, and errors will be emitted for any digits    /// `real_radix` represents the true radix of the number we're    ///    /// and return how many digits there were.    /// Scan through any digits (base `scan_radix`) or underscores,    }                     ctxt: encoded_ctxt, }        ast::Ident { name: ast::Name(encoded_name),        bump_expecting_char(self, '\x00', "nul-byte", whence);        // skip over the `\x00`        });            })                panic!("expected digits representing a ctxt, got {:?}, {}", s, whence);            u32::from_str_radix(s, 10).unwrap_or_else(|_| {        let encoded_ctxt : ast::SyntaxContext = self.with_str_from(start_bpos, |s| {        self.scan_digits(base, base);        let start_bpos = self.last_pos;        // find the integer representing the ctxt        }            bump_expecting_char(self, c, c, whence);        for c in "ctxt_".chars() {        // skip over the "ctxt_"        bump_expecting_char(self, ',', "comma", whence);        // skip over the `,`        });            })                      s, whence, start_bpos, self.last_pos);                panic!("expected digits representing a name, got {:?}, {}, range [{:?},{:?}]",            u32::from_str_radix(s, 10).unwrap_or_else(|_| {        let encoded_name : u32 = self.with_str_from(start_bpos, |s| {        self.scan_digits(base, base);        // find the integer representing the name        let base = 10;        let start_bpos = self.last_pos;        }            bump_expecting_char(self, c, c, whence);        for c in "name_".chars() {        // skip over the "name_"        bump_expecting_char(self, '\x00', "nul-byte", whence);        // skip over the leading `\x00`        let whence = "while scanning embedded hygienic ident";        }            }                None      => panic!("expected {:?}, hit EOF, {}", described_c, whence),                Some(r_c) => panic!("expected {:?}, hit {:?}, {}", described_c, r_c, whence),                Some(r_c) if r_c == c => r.bump(),            match r.curr {                                                whence: &str) {                                                described_c: D,adF�X�N#����TB4�
�
�
�
�
�
*
����R/��:�
�
v
h
>
�	�	�	x	@		��bT#�����K)���L$���y	��U6���K��������`9��                           "this form of character escape may only be used \                           self.last_pos,            self.err_span_(start_bpos,        if below_0x7f_only && accum_int >= 0x80 {        }            self.bump();            });                0                valid = false;                              "illegal character in numeric character escape", c);                self.err_span_char(self.last_pos, self.pos,            accum_int += c.to_digit(16).unwrap_or_else(|| {            accum_int *= 16;            let c = self.curr.unwrap_or('\x00');            }                break;                valid = false;                self.err_span_(start_bpos, last_bpos, "numeric character escape is too short");                let last_bpos = self.last_pos;            if self.curr_is(delim) {            }                self.fatal_span_(start_bpos, last_bpos, "unterminated numeric character escape");                let last_bpos = self.last_pos;            if self.is_eof() {        for _ in 0..n_digits {        let mut valid = true;        let mut accum_int = 0;        let start_bpos = self.last_pos;        debug!("scanning {} digits until {:?}", n_digits, delim);                       -> bool {                       below_0x7f_only: bool)                       delim: char,                       n_digits: usize,    fn scan_hex_digits(&mut self,    /// error if too many or too few digits are encountered.    /// Scan over `n_digits` hex digits, stopping at `delim`, reporting an    }        }            return token::Integer(self.name_from(start_bpos));            // but we certainly have an integer!            }                return token::Float(self.name_from(start_bpos));                self.check_float_base(start_bpos, last_pos, base);                let last_pos = self.last_pos;                self.scan_float_exponent();            if self.curr_is('e') || self.curr_is('E') {            // it might be a float if it has an exponent        } else {            return token::Float(self.name_from(start_bpos));            self.check_float_base(start_bpos, last_pos, base);            let last_pos = self.last_pos;            }                self.scan_float_exponent();                self.scan_digits(10, 10);            if self.curr.unwrap_or('\0').is_digit(10) {            self.bump();            // with a number            // might have stuff after the ., and if it does, it needs to start                                                             .is_xid_start() {        if self.curr_is('.') && !self.nextch_is('.') && !self.nextch().unwrap_or('\0')        // (`0..2` and `12.foo()`)        // integer literal followed by field/method access or a range pattern        // might be a float, but don't be greedy if this is actually an        }            return token::Integer(token::intern("0"));            self.err_span_(start_bpos, self.last_pos, "no valid digits found for number");        if num_digits == 0 {        }            num_digits = 0;        } else {            num_digits = self.scan_digits(10, 10) + 1;        } else if c.is_digit(10) {            }                }                    return token::Integer(self.name_from(start_bpos));                    // just a 0                _ => {                }                    num_digits = self.scan_digits(10, 10) + 1;                '0'...'9' | '_' | '.' => {                'x' => { self.bump(); base = 16; num_digits = self.scan_digits(16, 16); }                'o' => { self.bump(); base = 8; num_digits = self.scan_digits(8, 10); }adLL����fH2���zts9�
�
�
K
����C���W6
�
p
6
�	�	�	W	$	��oI$����R-��bD!��t(��g8��f��a5��rL                                false                                }                                        curly braces are escaped with `{{` and `}}`")                                        "if used in a formatting string, \                                        sp,                                    self.span_diagnostic.span_help(                                if (e == '{' || e == '}') && !ascii_only {                                }                                         your editor and version control settings")                                        "this is an isolated carriage return; consider checking \                                        sp,                                    self.span_diagnostic.span_help(                                if e == '\r' {                                let sp = codemap::mk_sp(escaped_pos, last_pos);                                    c);                                    else { "unknown character escape" },                                    if ascii_only { "unknown byte escape" }                                    escaped_pos, last_pos,                                self.err_span_char(                                let last_pos = self.last_pos;                            c => {                            }                                true                                self.consume_whitespace();                            '\r' if delim == '"' && self.curr_is('\n') => {                            },                                true                                self.consume_whitespace();                            '\n' if delim == '"' => {                            }                            }                               valid                            } else {                                false                                );                                    a byte string"                                    "unicode escape sequences cannot be used as a byte or in \                                    self.last_pos,                                    escaped_pos,                                self.err_span_(                            if valid && ascii_only {                            let valid = self.scan_unicode_escape(delim);                            'u' if self.curr_is('{') => {                            'x' => self.scan_byte_escape(delim, !ascii_only),                            'n' | 'r' | 't' | '\\' | '\'' | '"' | '0' => true,                        return match e {                    Some(e) => {                    None => {},  // EOF here is an error that will be checked later.                match escaped {                self.bump();                let escaped_pos = self.last_pos;                let escaped = self.curr;                // '\X' for some X must be a character constant:            '\\' => {        match first_source_char {                         ascii_only: bool, delim: char) -> bool {    fn scan_char_or_byte(&mut self, start: BytePos, first_source_char: char,    /// Returns true if there was a valid char/byte, false otherwise.    ///    /// `start` is the position of `first_source_char`, which is already consumed.    /// in a byte, (non-raw) byte string, char, or (non-raw) string literal.    /// Scan for a single (possibly escaped) byte or char    }        }            }                false                self.err_span_(start_bpos, last_bpos, "illegal numeric character escape");                let last_bpos = self.last_pos;            None => {            Some(_) => valid,        match char::from_u32(accum_int) {        }            valid = false;                            with characters in the range [\\x00-\\x7f]");ad<�g�����V(��V.�
�
�
�
i
0
����Y+��[=/%�
�
�
>

�	�	�	|	^	]	,		���=+���e��jX9'������8���B(���n6�yka[Z��    /// error if it isn't.    /// Check that a base is valid for a floating literal, emitting a nice    }        }            }                self.err_span_(self.last_pos, self.pos, "expected at least one digit in exponent")            if self.scan_digits(10, 10) == 0 {            }                self.bump();            if self.curr_is('-') || self.curr_is('+') {            self.bump();        if self.curr_is('e') || self.curr_is('E') {    fn scan_float_exponent(&mut self) {    /// Scan over a float exponent.    }        valid        }            valid= false;            self.err_span_(start_bpos, self.last_pos, "illegal unicode character escape");        if valid && (char::from_u32(accum_int).is_none() || count == 0) {        self.bump(); // past the ending }        }            valid = false;                          "overlong unicode escape (can have at most 6 hex digits)");            self.err_span_(start_bpos, self.last_pos,        if count > 6 {        }            count += 1;            self.bump();            });                0                valid = false;                }                                   "illegal character in unicode escape", c);                    self.err_span_char(self.last_pos, self.pos,                } else {                                     "unterminated unicode escape (needed a `}`)");                    self.fatal_span_(self.last_pos, self.pos,                if c == delim {            accum_int += c.to_digit(16).unwrap_or_else(|| {            accum_int *= 16;            };                }                                     "unterminated unicode escape (found EOF)");                    self.fatal_span_(start_bpos, self.last_pos,                None => {                Some(c) => c,            let c = match self.curr {        while !self.curr_is('}') && count <= 6 {        let mut valid = true;        let mut accum_int = 0;        let mut count = 0;        let start_bpos = self.last_pos;        self.bump(); // past the {    fn scan_unicode_escape(&mut self, delim: char) -> bool {    /// will read at least one digit, and up to 6, and pass over the }.    /// At this point, we have already seen the \ and the u, the { is the current character. We    ///    /// Scan over a \u{...} escape    }        true        }            }                return false;                     Use a \\xHH escape for a non-ASCII byte", first_source_char);                    "byte constant must be ASCII. \                    start, last_pos,                self.err_span_char(                let last_pos = self.last_pos;            _ => if ascii_only && first_source_char > '\x7F' {            }                }                    return false;                                   "bare CR not allowed in string, use \\r instead");                    self.err_span_(start, self.last_pos,                } else {                    return true;                    self.bump();                if self.curr_is('\n') {            '\r' => {            }                return false;                    first_source_char);                    else { "character constant must be escaped" },                    if ascii_only { "byte constant must be escaped" }                    start, last_pos,                self.err_span_char(                let last_pos = self.last_pos;            '\t' | '\n' | '\r' | '\'' if delim == '\'' => {            }                }                    }                        }                            }ad�]��4�C-#�
�
�
�
g
V
1
'
!
 
��w\��D
�
�
q
e
>

�	�	�	�	�	c	J	��pS
������v>�����K��E(�������U7���pQ(����tWF:���          ')' => { self.bump(); return token::CloseDelim(token::Paren); }          '(' => { self.bump(); return token::OpenDelim(token::Paren); }          }              };                  token::Dot              } else {                  }                      token::DotDot                  } else {                      token::DotDotDot                      self.bump();                  if self.curr_is('.') {                  self.bump();              return if self.curr_is('.') {              self.bump();          '.' => {          ',' => { self.bump(); return token::Comma; }          ';' => { self.bump(); return token::Semi; }          // One-byte tokens.        match c.expect("next_token_inner called at EOF") {        }            }                _ => {}                }                    };                        token::Ident(ast_ident, token::Plain)                    } else {                        token::Ident(ast_ident, token::ModName)                    return if self.curr_is(':') && self.nextch_is(':') {                    let ast_ident = self.scan_embedded_hygienic_ident();                ('\x00', Some('n'), Some('a')) => {            match (c.unwrap(), self.nextch(), self.nextnextch()) {        if self.read_embedded_ident {        }            return token::Literal(num, suffix)            debug!("next_token_inner: scanned number {:?}, {:?}", num, suffix);            let suffix = self.scan_optional_raw_name();            let num = self.scan_number(c.unwrap());        if is_dec_digit(c) {        }            });                }                    }                        token::Ident(str_to_ident(string), token::Plain)                    } else {                        token::Ident(str_to_ident(string), token::ModName)                    if self.curr_is(':') && self.nextch_is(':') {                    // FIXME: perform NFKC normalization here. (Issue #2253)                } else {                    token::Underscore                if string == "_" {            return self.with_str_from(start, |string| {            }                self.bump();            while ident_continue(self.curr) {            let start = self.last_pos;        } {           _ => true           ('b', Some('r'), Some('"')) | ('b', Some('r'), Some('#')) => false,           ('b', Some('"'), _) | ('b', Some('\''), _) |           ('r', Some('"'), _) | ('r', Some('#'), _) |            // They are not identifiers, and are handled further down.            // b as in b' is part of a byte literal.            // Note: r as in r" or r#" is part of a raw string literal,        if ident_start(c) && match (c.unwrap(), self.nextch(), self.nextnextch()) {        let c = self.curr;    fn next_token_inner(&mut self) -> token::Token {    /// token, and updates the interner    /// Return the next token from the string, advances the input past that    }        }            return token::BinOp(op);        } else {            return token::BinOpEq(op);            self.bump();        if self.curr_is('=') {        self.bump();    fn binop(&mut self, op: token::BinOpToken) -> token::Token {    }        }            _   => ()            2 => self.err_span_(start_bpos, last_bpos, "binary float literal is not supported"),            8 => self.err_span_(start_bpos, last_bpos, "octal float literal is not supported"),                                   supported"),            16 => self.err_span_(start_bpos, last_bpos, "hexadecimal float literal is not \        match base {    fn check_float_base(&mut self, start_bpos: BytePos, last_bpos: BytePos, base: usize) {ad�`�m"��k4�
�
�
�
�
h
S
.
 


�����kN*����vjW>�
�
�
�
�
z
J

�	�	�	r	A	/		������H����rY21����N���wv)��m,��h(���f7���                    self.err_span_(start,                if keyword_checking_token.is_keyword(token::keywords::SelfValue) {                let last_bpos = self.last_pos;                    &token::Ident(keyword_checking_ident, token::Plain);                let keyword_checking_token =                    });                        str_to_ident(lifetime_name)                    self.with_str_from(start, |lifetime_name| {                let keyword_checking_ident =                // the lifetime name is not a keyword.                // Conjure up a "keyword checking ident" to make sure that                });                    str_to_ident(&format!("'{}", lifetime_name))                let ident = self.with_str_from(start, |lifetime_name| {                // this is necessary.                // expansion purposes. See #12512 for the gory details of why                // Include the leading `'` in the real identifier, for macro                }                    self.bump();                while ident_continue(self.curr) {            if ident_start(Some(c2)) && !self.curr_is('\'') {            // quote, then this is a lifetime name:            // If the character is an ident start not followed by another single            self.bump();            let c2 = self.curr.unwrap_or('\x00');            // the eof will be picked up by the final `'` check below            let start = self.last_pos;            self.bump();            // Either a character constant 'a' OR a lifetime name 'abc          '\'' => {          }            }              _ => { return token::Gt; }              '>' => { return self.binop(token::Shr); }              '=' => { self.bump(); return token::Ge; }            match self.curr.unwrap_or('\x00') {            self.bump();          '>' => {          }            }              _ => { return token::Lt; }              }                }                  _ => { return token::LArrow; }                match self.curr.unwrap_or('\x00') {                self.bump();              '-' => {              '<' => { return self.binop(token::Shl); }              '=' => { self.bump(); return token::Le; }            match self.curr.unwrap_or('\x00') {            self.bump();          '<' => {          }            } else { return token::Not; }                return token::Ne;                self.bump();            if self.curr_is('=') {            self.bump();          '!' => {          }            }                return token::Eq;            } else {                return token::FatArrow;                self.bump();            } else if self.curr_is('>') {                return token::EqEq;                self.bump();            if self.curr_is('=') {            self.bump();          '=' => {          // Multi-byte tokens.          '$' => { self.bump(); return token::Dollar; }          }            }                return token::Colon;            } else {                return token::ModSep;                self.bump();            if self.curr_is(':') {            self.bump();          ':' => {          '?' => { self.bump(); return token::Question; }          '~' => { self.bump(); return token::Tilde; }          '#' => { self.bump(); return token::Pound; }          '@' => { self.bump(); return token::At; }          ']' => { self.bump(); return token::CloseDelim(token::Bracket); }          '[' => { self.bump(); return token::OpenDelim(token::Bracket); }          '}' => { self.bump(); return token::CloseDelim(token::Brace); }          '{' => { self.bump(); return token::OpenDelim(token::Brace); }ad�S��H��wI�
�
�
�
�
,

��`��C5�
�
t
8
,


�	�	r	8	���rfS'���o�����%��X?����gC�����.��d�����            self.bump();            }                                curr_char);                                 found illegal character",                                "only `#` is allowed in raw string delimitation; \                self.fatal_span_char(start_bpos, last_bpos,                let curr_char = self.curr.unwrap();                let last_bpos = self.last_pos;            } else if !self.curr_is('"') {                self.fatal_span_(start_bpos, last_bpos, "unterminated raw string");                let last_bpos = self.last_pos;            if self.is_eof() {            }                hash_count += 1;                self.bump();            while self.curr_is('#') {            let mut hash_count = 0;            self.bump();            let start_bpos = self.last_pos;          'r' => {          }            return token::Literal(token::Str_(id), suffix);            let suffix = self.scan_optional_raw_name();            self.bump();                     else { token::intern("??") };            let id = if valid { self.name_from(start_bpos + BytePos(1)) }            // adjust for the ASCII " at the start of the literal            }                valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only = */ false, '"');                self.bump();                let ch = self.curr.unwrap();                let ch_start = self.last_pos;                }                    self.fatal_span_(start_bpos, last_bpos, "unterminated double quote string");                    let last_bpos = self.last_pos;                if self.is_eof() {            while !self.curr_is('"') {            self.bump();            let mut valid = true;            let start_bpos = self.last_pos;          '"' => {          }            return token::Literal(lit, suffix);            let suffix = self.scan_optional_raw_name();            };                _ => unreachable!()  // Should have been a token::Ident above.                Some('r') => self.scan_raw_byte_string(),                Some('"') => self.scan_byte_string(),                Some('\'') => self.scan_byte(),            let lit = match self.curr {            self.bump();          'b' => {          }            return token::Literal(token::Char(id), suffix);            let suffix = self.scan_optional_raw_name();            self.bump(); // advance curr past token            let id = if valid { self.name_from(start) } else { token::intern("0") };            }                                   "unterminated character constant".to_string());                                   start - BytePos(1), last_bpos,                                   // ascii single quote.                                   // character before position `start` is an                                   // Byte offsetting here is okay because the                self.fatal_span_verbose(                let last_bpos = self.last_pos;            if !self.curr_is('\'') {            let valid = self.scan_char_or_byte(start, c2, /* ascii_only = */ false, '\'');            // Otherwise it is a character constant:            }                return token::Lifetime(ident);                }                                   "invalid lifetime name");                                   last_bpos,                    self.err_span_(start,                {                    !keyword_checking_token.is_keyword(token::keywords::Static)                } else if keyword_checking_token.is_any_keyword() &&                                    is no longer a special lifetime");                                   "invalid lifetime name: 'self \                                   last_bpos,ad�b���iF���H�
�
�
e
K
.
���f5����v;�
�
j
P
:


�	�	�	�	`	K	'		���wR5����vY<����R��c-����B6,&%�����^(�������^8��             || (val.as_bytes()[0] == b'#' && val.as_bytes()[1] == b'!'));        assert!((val.as_bytes()[0] == b'/' && val.as_bytes()[1] == b'/')        let val = self.read_to_eol();    fn read_one_line_comment(&mut self) -> String {    }        return val        if self.curr_is('\n') { self.bump(); }        }            self.bump();            val.push(self.curr.unwrap());        while !self.curr_is('\n') && !self.is_eof() {        let mut val = String::new();    fn read_to_eol(&mut self) -> String {    }        while is_whitespace(self.curr) && !self.is_eof() { self.bump(); }    fn consume_whitespace(&mut self) {    }        }          }              self.fatal_span_char(last_bpos, bpos, "unknown start of token", c);              let bpos = self.pos;              let last_bpos = self.last_pos;          c => {          '%' => { return self.binop(token::Percent); }          '^' => { return self.binop(token::Caret); }          '/' => { return self.binop(token::Slash); }          '*' => { return self.binop(token::Star); }          '+' => { return self.binop(token::Plus); }          }            }              _ => { return self.binop(token::Or); }              Some('|') => { self.bump(); self.bump(); return token::OrOr; }            match self.nextch() {          '|' => {          }            } else { return self.binop(token::And); }                return token::AndAnd;                self.bump();                self.bump();            if self.nextch_is('&') {          '&' => {          }            } else { return self.binop(token::Minus); }                return token::RArrow;                self.bump();                self.bump();            if self.nextch_is('>') {          '-' => {          }            return token::Literal(token::StrRaw(id, hash_count), suffix);            let suffix = self.scan_optional_raw_name();            };                token::intern("??")            } else {                self.name_from_to(content_start_bpos, content_end_bpos)            let id = if valid {            self.bump();            }                self.bump();                }                    _ => ()                    }                        }                            valid = false;                                           string, use \\r instead");                            self.err_span_(start_bpos, last_bpos, "bare CR not allowed in raw \                            let last_bpos = self.last_pos;                        if !self.nextch_is('\n') {                    '\r' => {                    },                        break;                        }                            }                                continue 'outer;                            if !self.curr_is('#') {                            self.bump();                        for _ in 0..hash_count {                        content_end_bpos = self.last_pos;                    '"' => {                match c {                let c = self.curr.unwrap();                            //continue 'outer;                        //if !self.curr_is('#') {                        //self.bump();                    //for _ in 0..hash_count {                    //content_end_bpos = self.last_pos;                //if self.curr_is('"') {                }                    self.fatal_span_(start_bpos, last_bpos, "unterminated raw string");                    let last_bpos = self.last_pos;                if self.is_eof() {            'outer: loop {            let mut valid = true;            let mut content_end_bpos;            let content_start_bpos = self.last_pos;ad�g����dKA;:��l�
�
�
�
o
A
,
+
��|D���[QP�
�
�
�
�
W



�	�	�	�	�	k	L		����g>%��p[932����|cF<; ���V-��pOE0����]���rM����                    }                        }                            continue 'outer;                        if !self.curr_is('#') {                        self.bump();                    for _ in 0..hash_count {                    content_end_bpos = self.last_pos;                Some('"') => {                },                    self.fatal_span_(start_bpos, last_pos, "unterminated raw string")                    let last_pos = self.last_pos;                None => {            match self.curr {        'outer: loop {        let mut content_end_bpos;        let content_start_bpos = self.last_pos;        self.bump();        }                            ch);                             found illegal character",                            "only `#` is allowed in raw string delimitation; \            self.fatal_span_char(start_bpos, last_pos,            let ch = self.curr.unwrap();            let last_pos = self.last_pos;        } else if !self.curr_is('"') {            self.fatal_span_(start_bpos, last_pos, "unterminated raw string");            let last_pos = self.last_pos;        if self.is_eof() {        }            hash_count += 1;            self.bump();        while self.curr_is('#') {        let mut hash_count = 0;        self.bump();        let start_bpos = self.last_pos;    fn scan_raw_byte_string(&mut self) -> token::Lit {    }        return token::Binary(id);        self.bump();        let id = if valid { self.name_from(start) } else { token::intern("??") };        }            valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only = */ true, '"');            self.bump();            let ch = self.curr.unwrap();            let ch_start = self.last_pos;            }                                  "unterminated double quote byte string");                self.fatal_span_(start, last_pos,                let last_pos = self.last_pos;            if self.is_eof() {        while !self.curr_is('"') {        let mut valid = true;        let start = self.last_pos;        self.bump();    fn scan_byte_string(&mut self) -> token::Lit {    }        self.scan_hex_digits(2, delim, below_0x7f_only)    fn scan_byte_escape(&mut self, delim: char, below_0x7f_only: bool) -> bool {    }        return token::Byte(id);        self.bump(); // advance curr past token        let id = if valid { self.name_from(start) } else { token::intern("?") };        }                "unterminated byte constant".to_string());                start - BytePos(2), last_pos,            self.fatal_span_verbose(            let last_pos = self.last_pos;            // ascii single quote and ascii 'b'.            // character before position `start` are an            // Byte offsetting here is okay because the        if !self.curr_is('\'') {        let valid = self.scan_char_or_byte(start, c2, /* ascii_only = */ true, '\'');        self.bump();        let c2 = self.curr.unwrap_or('\x00');        // the eof will be picked up by the final `'` check below        let start = self.last_pos;        self.bump();    fn scan_byte(&mut self) -> token::Lit {    }     || (self.curr_is('#') && self.nextch_is('!') && !self.nextnextch_is('['))     // consider shebangs comments, but not inner attributes     || (self.curr_is('/') && self.nextch_is('*'))        (self.curr_is('/') && self.nextch_is('/'))    fn peeking_at_comment(&self) -> bool {    }        }            self.bump();        while is_whitespace(self.curr) && !self.curr_is('\n') && !self.is_eof() {    fn consume_non_eol_whitespace(&mut self) {    }        return val;ad�l���uM������^�
�
�
�
�
`
6
#



�������CB��kca`1�
�
�
{
y
x
N


�	�	�	�	�	�	d	(	'		������ujXW
�����@��jdc2��oC=<%��gB���g7���[��        let tok3 = string_reader.next_token();        // read another token:        assert_eq!(string_reader.last_pos.clone(), BytePos(28));        // the 'main' id is already read:        assert_eq!(string_reader.next_token().tok, token::Whitespace);        assert_eq!(tok1,tok2);            sp:Span {lo:BytePos(21),hi:BytePos(23),expn_id: NO_EXPANSION}};            tok:token::Ident(id, token::Plain),        let tok2 = TokenAndSpan{        let tok1 = string_reader.next_token();        assert_eq!(string_reader.next_token().tok, token::Whitespace);        assert_eq!(string_reader.next_token().tok, token::Comment);        let id = str_to_ident("fn");             fn main() { println!(\"zebra\"); }\n".to_string());            "/* my source file */ \        let mut string_reader = setup(&span_handler,        let span_handler = mk_sh();    #[test] fn t1 () {    }        StringReader::new(span_handler, fm)        let fm = span_handler.cm.new_filemap("zebra.rs".to_string(), teststr);                 teststr: String) -> StringReader<'a> {    fn setup<'a>(span_handler: &'a diagnostic::SpanHandler,    // open a string reader for the given string    }        diagnostic::mk_span_handler(handler, CodeMap::new())        let handler = diagnostic::mk_handler(true, Box::new(emitter));        let emitter = diagnostic::EmitterWriter::new(Box::new(io::sink()), None);        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.    fn mk_sh() -> diagnostic::SpanHandler {    use std::io;    use parse::token::{str_to_ident};    use parse::token;    use diagnostic;    use codemap::{BytePos, CodeMap, Span, NO_EXPANSION};    use super::*;mod test {#[cfg(test)]}        || (c > '\x7f' && c.is_xid_continue())        || c == '_'        || (c >= '0' && c <= '9')        || (c >= 'A' && c <= 'Z')    (c >= 'a' && c <= 'z')    let c = match c { Some(c) => c, None => return false };fn ident_continue(c: Option<char>) -> bool {}        || (c > '\x7f' && c.is_xid_start())        || c == '_'        || (c >= 'A' && c <= 'Z')    (c >= 'a' && c <= 'z')    let c = match c { Some(c) => c, None => return false };fn ident_start(c: Option<char>) -> bool {}    res    debug!("is {:?} a doc comment? {}", s, res);              || s.starts_with("/*!");    let res = (s.starts_with("/**") && *s.as_bytes().get(3).unwrap_or(&b' ') != b'*')pub fn is_block_doc_comment(s: &str) -> bool {}    res    debug!("is {:?} a doc comment? {}", s, res);              || s.starts_with("//!");    let res = (s.starts_with("///") && *s.as_bytes().get(3).unwrap_or(&b' ') != b'/')pub fn is_doc_comment(s: &str) -> bool {fn is_dec_digit(c: Option<char>) -> bool { return in_range(c, '0', '9'); }}    }        _ => false        Some(c) => lo <= c && c <= hi,    match c {fn in_range(c: Option<char>, lo: char, hi: char) -> bool {}    }        _ => false        ' ' | '\n' | '\t' | '\r' => true,    match c.unwrap_or('\x00') { // None can be null for now... it's not whitespacepub fn is_whitespace(c: Option<char>) -> bool {}    }                                hash_count);                                                  content_end_bpos),        return token::BinaryRaw(self.name_from_to(content_start_bpos,        self.bump();        }            self.bump();            }                }                        last_pos, last_pos, "raw byte string must be ASCII", c);                    self.err_span_char(                    let last_pos = self.last_pos;                Some(c) => if c > '\x7F' {                },                    break;ad>�V��Q2����B�
�
w
m
g
f
"
�����A����k+�
�

y
x
X

�	�	x	9	3	2		��d1�����932�|vuP����H���o(�����<��=
��                assert_eq!(setup(&mk_sh(), format!("{} suffix", $input)).next_token().tok,                // with a whitespace separator:                                          Some(token::intern("suffix"))));                           token::Literal(token::$tok_type(token::intern($tok_contents)),                assert_eq!(setup(&mk_sh(), format!("{}suffix", $input)).next_token().tok,            ($input: expr, $tok_type: ident, $tok_contents: expr) => {{        macro_rules! test {    #[test] fn literal_suffixes() {    }                   token::Literal(token::StrRaw(token::intern("\"#a\\b\x00c\""), 3), None));                                                                 .tok,                         "r###\"\"#a\\b\x00c\"\"###".to_string()).next_token()        assert_eq!(setup(&mk_sh(),    #[test] fn raw_string() {    }                   token::Lifetime(token::str_to_ident("'abc")));        assert_eq!(setup(&mk_sh(), "'abc".to_string()).next_token().tok,    #[test] fn lifetime_name() {    }                   token::Literal(token::Char(token::intern("\\n")), None));        assert_eq!(setup(&mk_sh(), "'\\n'".to_string()).next_token().tok,    #[test] fn character_escaped() {    }                   token::Literal(token::Char(token::intern(" ")), None));        assert_eq!(setup(&mk_sh(), "' '".to_string()).next_token().tok,    #[test] fn character_space() {    }                   token::Literal(token::Char(token::intern("a")), None));        assert_eq!(setup(&mk_sh(), "'a'".to_string()).next_token().tok,    #[test] fn character_a() {    }                                mk_ident("b", token::Plain)]);                                token::Whitespace,                                token::ModSep,                           vec![mk_ident("a",token::ModName),        check_tokenization(setup(&mk_sh(), "a:: b".to_string()),    #[test] fn dcparsing_4 () {    }                                mk_ident("b", token::Plain)]);                                token::ModSep,                                token::Whitespace,                           vec![mk_ident("a", token::Plain),        check_tokenization(setup(&mk_sh(), "a ::b".to_string()),    #[test] fn dcparsing_3 () {    }                                mk_ident("b", token::Plain)]);                                token::ModSep,                           vec![mk_ident("a",token::ModName),        check_tokenization(setup(&mk_sh(), "a::b".to_string()),    #[test] fn dcparsing_2 () {    }                                mk_ident("b", token::Plain)]);                                token::Whitespace,                           vec![mk_ident("a", token::Plain),        check_tokenization(setup(&mk_sh(), "a b".to_string()),    #[test] fn doublecolonparsing () {    }        token::Ident(str_to_ident(id), style)    fn mk_ident(id: &str, style: token::IdentStyle) -> token::Token {    // make the identifier by looking up the string in the interner    }        }            assert_eq!(&string_reader.next_token().tok, expected_tok);        for expected_tok in &expected {    fn check_tokenization (mut string_reader: StringReader, expected: Vec<token::Token> ) {    // of tokens (stop checking after exhausting the expected vec)    // check that the given reader produces the desired stream    }        assert_eq!(string_reader.last_pos.clone(), BytePos(29))        // the lparen is already read:        assert_eq!(tok3,tok4);            sp:Span {lo:BytePos(24),hi:BytePos(28),expn_id: NO_EXPANSION}};            tok:token::Ident(str_to_ident("main"), token::Plain),        let tok4 = TokenAndSpan{ad
�1���~MG"������v:�
�
_

������}D��{6,+�
�
�
�
p
G
*

�	�	�	y	Q	*	�������R��������U����~QKJ��{z:����d5���k710��`=#����    }        self.err_span_(from_pos, to_pos, &m[..]);        for c in c.escape_default() { m.push(c) }        m.push_str(": ");        let mut m = m.to_string();    fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) {    /// escaped character to the error message    /// Report a lexical error spanning [`from_pos`, `to_pos`), appending an    }        self.fatal_span_(from_pos, to_pos, &m[..]);        for c in c.escape_default() { m.push(c) }        m.push_str(": ");        let mut m = m.to_string();    fn fatal_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) -> ! {    /// escaped character to the error message    /// Report a lexical error spanning [`from_pos`, `to_pos`), appending an    }        self.err_span(codemap::mk_sp(from_pos, to_pos), m)    fn err_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) {    /// Report a lexical error spanning [`from_pos`, `to_pos`).    }        self.fatal_span(codemap::mk_sp(from_pos, to_pos), m)    fn fatal_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) -> ! {    /// Report a fatal error spanning [`from_pos`, `to_pos`).    }        self.span_diagnostic.span_err(sp, m)    pub fn err_span(&self, sp: Span, m: &str) {    /// Report a lexical error with a given span.    }        panic!(self.span_diagnostic.span_fatal(sp, m))    pub fn fatal_span(&self, sp: Span, m: &str) -> ! {    /// Report a fatal lexical error with a given span.    }        self.curr == Some(c)    pub fn curr_is(&self, c: char) -> bool {    }        sr        sr.advance_token();        let mut sr = StringReader::new_raw(span_diagnostic, filemap);                   filemap: Rc<codemap::FileMap>) -> StringReader<'b> {    pub fn new<'b>(span_diagnostic: &'b SpanHandler,             source_iter:             source_iter: source_text.char_indices().peekable(),            source_text: &source_text,            read_embedded_ident: false,            peek_span: codemap::DUMMY_SP,            peek_tok: token::Eof,            /* dummy values; not read */            filemap: filemap,            curr: Some('\n'),            col: CharPos(0),            last_pos: filemap.start_pos,            pos: filemap.start_pos,            span_diagnostic: span_diagnostic,        let mut sr = StringReader {        let source_text = (*filemap.src.as_ref().unwrap()).clone();        }                                                 filemap.name)[..]);            span_diagnostic.handler.bug(&format!("Cannot lex filemap without source: {}",        if filemap.src.is_none() {                       filemap: Rc<codemap::FileMap>) -> StringReader<'b> {    pub fn new_raw<'b>(span_diagnostic: &'b SpanHandler,    /// For comments.rs, which hackily pokes into pos and currimpl<'a> StringReader<'a> {}    sr    sr.advance_token();    sr.read_embedded_ident = true;    let mut sr = StringReader::new_raw(span_diagnostic, filemap);                                            -> StringReader<'b> {                                            filemap: Rc<codemap::FileMap>)pub fn make_reader_with_embedded_idents<'b>(span_diagnostic: &'b SpanHandler,// ToToken impls are revised to go directly to token-trees.// FIXME (Issue #16472): This function should go away after}    }        }            sp: self.cur_span,            tok: self.cur_tok.clone(),        TokenAndSpan {    fn peek(&self) -> TokenAndSpan {    }        self.sp_diag.span_err(self.cur_span, m);    fn err(&self, m: &str) {    }        panic!(self.sp_diag.span_fatal(self.cur_span, m));    fn fatal(&self, m: &str) -> ! {ad�3`������S6��g7�
�
x
3

���bTS-�������_#�
�
�
�
�
�
�
a
@
:
9


�	�	z	@	$		������wqp:�����fMCB��������N,����9������tR3�����p,���T4��                Some('/') => {                        Some('/') => {            mat                Some('/') => {                 Some('/') => {            match self.nex                Some('/') => {                Some('/') => {            match self.nextch() {                   Some('/') => {            match self.nextch(                Some('/') => {            match self.nextch() {                   Some('/') => {            match self.nextch(                Some('                So                Some('/')                               Some('/') => {            match self.                Some('/') => {            match self.nextch() {        if self.curr_is('/') {        }            None => { }            },                }                                    "called consume_any_line_comment, but there was whitespace");                    self.span_diagnostic.span_err(codemap::mk_sp(self.last_pos, self.last_pos),                if c.is_whitespace() {            Some(c) => {        match self.curr {    fn scan_comment(&mut self) -> Option<TokenAndSpan> {    /// Eats any kind of comment.    /// PRECONDITION: self.curr is not whitespace    }        })            }                Some(token::intern(string))            } else {                None            if string == "_" {        self.with_str_from(start, |string| {        }            self.bump();        while ident_continue(self.curr) {        let start = self.last_pos;        }            return None        if !ident_start(self.curr) {    fn scan_optional_raw_name(&mut self) -> Option<ast::Name> {    /// Eats <XID_start><XID_continue>*, if possible.    }        self.nextnextch() == Some(c)    pub fn nextnextch_is(&self, c: char) -> bool {    }        }            None        } else {            Some(s.char_at(next))        if next < s.len() {        let next = offset + s.char_at(offset).len_utf8();        if offset >= s.len() { return None }        let s = &self.source_text[..];        let offset = self.byte_offset(self.pos).to_usize();    pub fn nextnextch(&self) -> Option<char> {    }        self.nextch() == Some(c)    pub fn nextch_is(&self, c: char) -> bool {    }        }            None        } else {            Some(self.source_text.char_at(offset))        if offset < self.source_text.len() {        let offset = self.byte_offset(self.pos).to_usize();    pub fn nextch(&self) -> Option<char> {    }        }            self.curr = None;        } else {            }                self.filemap.record_multibyte_char(self.last_pos, byte_offset_diff);            if byte_offset_diff > 1 {            }                self.col = CharPos(0);                self.filemap.next_line(self.last_pos);            if last_char == '\n' {            self.col = self.col + CharPos(1);            self.curr = Some(ch);            self.pos = self.pos + Pos::from_usize(byte_offset_diff);            let byte_offset_diff = next - current_byte_offset;            let next = current_byte_offset + ch.len_utf8();            let ch = self.source_text.char_at(current_byte_offset);            let last_char = self.curr.unwrap();            assert!(self.curr.is_some());        if current_byte_offset < self.source_text.len() {        let current_byte_offset = self.byte_offset(self.pos).to_usize();        self.last_pos = self.pos;    pub fn bump(&mut self) {    /// discovered, add it to the FileMap's list of line start offsets.    /// Advance the StringReader by one character. If a newline is    }        }            bufadf%����^/
����pjF�
�
�
�
~
g
?






����rM&    }        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> {}ad��6������S
��������V�
�
�
�

R
L
K


��|{;����e6�
�
�
l
8
2
1
�	�	a	>	$	����    }        self.err_span_(from_pos, to_pos, &m[..]);        for c in c.escape_default() { m.push(c) }        m.push_str(": ");        let mut m = m.to_string();    fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) {    /// escaped character to the error message    /// Report a lexical error spanning [`from_pos`, `to_pos`), appending an    }        self.fatal_span_(from_pos, to_pos, &m[..]);        for c in c.escape_default() { m.push(c) }        m.push_str(": ");        let mut m = m.to_string();    fn fatal_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) -> ! {    /// escaped character to the error message    /// Report a lexical error spanning [`from_pos`, `to_pos`), appending an    }        self.err_span(codemap::mk_sp(from_pos, to_pos), m)    fn err_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) {    /// Report a lexical error spanning [`from_pos`, `to_pos`).    }        self.fatal_span(codemap::mk_sp(from_pos, to_pos), m)    fn fatal_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) -> ! {    /// Report a fatal error spanning [`from_pos`, `to_pos`).    }        self.span_diagnostic.span_err(sp, m)    pub fn err_span(&self, sp: Span, m: &str) {    /// Report a lexical error with a given span.    }        panic!(self.span_diagnostic.span_fatal(sp, m))    pub fn fatal_span(&self, sp: Span, m: &str) -> ! {    /// Report a fatal lexical error with a given span.    }        self.curr == Some(c)    pub fn curr_is(&self, c: char) -> bool {    }        sr        sr.advance_token();        let mut sr = StringReader::new_raw(span_diagnostic, filemap);                   filemap: Rc<codemap::FileMap>) -> StringReader<'b> {    pub fn new<'b>(span_diagnostic: &'b SpanHandler,    }        sr        sr.bump();        };