[][src]Trait char_lex::TokenTrait

pub trait TokenTrait where
    Self: Sized + PartialEq
{ fn match_char(c: char) -> Option<Self>; }

The main trait for Tokens, it is the automatically implemented by the token attribute macro.

Required methods

fn match_char(c: char) -> Option<Self>

Returns the enum element that matches the given char.

Loading content...

Implementors

Loading content...