pub fn new_raw<'b>(span_diagnostic: &'b SpanHandler,
                       filemap: Rc<codemap::FileMap>) -> StringReader<'b> {
        if filemap.src.is_none() {
            span_diagnostic.handler.bug(&format!("Cannot lex filemap without source: {}",
                                                 filemap.name)[..]);
        }

        let source_text = (*filemap.src.as_ref().unwrap()).clone();

        let mut sr = StringReader {
            span_diagnostic: span_diagnostic,
            pos: filemap.start_pos,
            last_pos: filemap.start_pos,
            col: CharPos(0),
            curr: Some('\n'),
            filemap: filemap,
            /* dummy values; not read */
            peek_tok: token::Eof,
            peek_span: codemap::DUMMY_SP,
            source_text: source_text
        };
        sr.bump();
        sr
    }
/// For comments.rs, which hackily pokes into pos and curr
For comments.rs, which hackily pokes into pos and curr
For comments . rs which hackily pokes into pos and curr
pub fn new_raw<'b>(span_diagnostic: &'b SpanHandler,
                       filemap: Rc<codemap::FileMap>) -> StringReader<'b> {
        if filemap.src.is_none() {
            span_diagnostic.handler.bug(&format!("Cannot lex filemap without source: {}",
                                                 filemap.name)[..]);
        }
        let source_text = (*filemap.src.as_ref().unwrap()).clone();
        let mut sr = StringReader {
            span_diagnostic: span_diagnostic,
            pos: filemap.start_pos,
            last_pos: filemap.start_pos,
            col: CharPos(0),
            curr: Some('\n'),
            filemap: filemap,
            /* dummy values; not read */
            peek_tok: token::Eof,
            peek_span: codemap::DUMMY_SP,
            source_text: source_text
        };
        sr.bump();
        sr
    }
pub fn new_raw < ' b > ( span_diagnostic : & ' b SpanHandler , filemap : Rc < codemap :: FileMap > ) -> StringReader < ' b > { if filemap . src . is_none ( ) { span_diagnostic . handler . bug ( & format ! ( " " filemap name ) [ .. ] ) ; } let source_text = ( * filemap . src . as_ref ( ) . unwrap ( ) ) . clone ( ) ; let mut sr = StringReader { span_diagnostic : span_diagnostic , pos : filemap . start_pos , last_pos : filemap . start_pos , col : CharPos ( 0 ) , curr : Some ( '\n' ) , filemap : filemap , /* dummy values; not read */ peek_tok : token :: Eof , peek_span : codemap :: DUMMY_SP , source_text : source_text } ; sr . bump ( ) ; sr }
For comments.rs, which hackily pokes into pos and curr
For comments . rs which hackily pokes into pos and curr
span_diagnostic
&'b SpanHandler
filemap
Rc<codemap::FileMap>