Trait syntax::parse::lexer::Reader [−] [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 { ... }
}
Unstable

Required Methods

fn is_eof(&self) -> bool

Unstable

fn next_token(&mut self) -> TokenAndSpan

Unstable

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

Unstable

Report a fatal error with the current span.

fn err(&self, &str)

Unstable

Report a non-fatal error with the current span.

fn peek(&self) -> TokenAndSpan

Unstable

Provided Methods

fn real_token(&mut self) -> TokenAndSpan

Unstable

Get a token the parser cares about.

Implementors