Trait syntax::parse::lexer::ReaderUnstable [-] [+] [src]

pub trait Reader {
    fn is_eof(&self) -> bool;
    fn next_token(&mut self) -> TokenAndSpan;
    fn fatal(&self, &str) -> !;
    fn err(&self, &str);
    fn peek(&self) -> TokenAndSpan;

    fn real_token(&mut self) -> TokenAndSpan { ... }
}

Required Methods

fn is_eof(&self) -> bool

fn next_token(&mut self) -> TokenAndSpan

fn fatal(&self, &str) -> !

Report a fatal error with the current span.

fn err(&self, &str)

Report a non-fatal error with the current span.

fn peek(&self) -> TokenAndSpan

Provided Methods

fn real_token(&mut self) -> TokenAndSpan

Get a token the parser cares about.

Implementors