[][src]Trait logos::Extras

pub trait Extras: Sized + Default {
    fn on_advance(&mut self) { ... }
fn on_whitespace(&mut self) { ... } }

Helper trait that can be injected into the Lexer to handle things that aren't necessarily tokens, such as comments or Automatic Semicolon Insertion in JavaScript.

Provided methods

fn on_advance(&mut self)

Method called by the Lexer when a new token is about to be produced.

fn on_whitespace(&mut self)

Method called by the Lexer when a white space byte has been encountered.

Loading content...

Implementations on Foreign Types

impl Extras for ()[src]

Default Extras with no logic

Loading content...

Implementors

Loading content...