Trait syntex_syntax::parse::lexer::Reader [] [src]

pub trait Reader {
    fn is_eof(&self) -> bool;
    fn next_token(&mut self) -> TokenAndSpan;
    fn fatal(&self, &str) -> FatalError;
    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) -> FatalError

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