Struct syntax::parse::lexer::StringReader [−][src]
pub struct StringReader<'a> { pub sess: &'a ParseSess, pub next_pos: BytePos, pub pos: BytePos, pub ch: Option<char>, pub filemap: Lrc<FileMap>, // some fields omitted }
Fields
sess: &'a ParseSess
next_pos: BytePos
The absolute offset within the codemap of the next character to read
pos: BytePos
The absolute offset within the codemap of the current character
ch: Option<char>
The current character (which has been read from self.pos)
filemap: Lrc<FileMap>
Methods
impl<'a> StringReader<'a>
[src]
impl<'a> StringReader<'a>
pub fn real_token(&mut self) -> TokenAndSpan
[src]
pub fn real_token(&mut self) -> TokenAndSpan
pub fn try_next_token(&mut self) -> Result<TokenAndSpan, ()>
[src]
pub fn try_next_token(&mut self) -> Result<TokenAndSpan, ()>
Return the next token. EFFECT: advances the string_reader.
pub fn emit_fatal_errors(&mut self)
[src]
pub fn emit_fatal_errors(&mut self)
pub fn peek(&self) -> TokenAndSpan
[src]
pub fn peek(&self) -> TokenAndSpan
pub fn new(
sess: &'a ParseSess,
filemap: Lrc<FileMap>,
override_span: Option<Span>
) -> Self
[src]
pub fn new(
sess: &'a ParseSess,
filemap: Lrc<FileMap>,
override_span: Option<Span>
) -> Self
pub fn retokenize(sess: &'a ParseSess, span: Span) -> Self
[src]
pub fn retokenize(sess: &'a ParseSess, span: Span) -> Self
Auto Trait Implementations
impl<'a> !Send for StringReader<'a>
impl<'a> !Send for StringReader<'a>
impl<'a> !Sync for StringReader<'a>
impl<'a> !Sync for StringReader<'a>