LexerRule

Trait LexerRule 

Source
pub trait LexerRule: __LexerRule_Clone {
    // Required methods
    fn reset(&mut self);
    fn current_state(&self) -> MatchResult;
    fn try_match(&mut self, prev: Option<char>, next: char) -> MatchResult;
    fn get_token(&self) -> Result<Token, Box<dyn Error + 'static>>;
}

Required Methods§

Source

fn reset(&mut self)

Source

fn current_state(&self) -> MatchResult

Source

fn try_match(&mut self, prev: Option<char>, next: char) -> MatchResult

Source

fn get_token(&self) -> Result<Token, Box<dyn Error + 'static>>

Trait Implementations§

Source§

impl Clone for Box<dyn LexerRule>

Source§

fn clone(&self) -> Box<dyn LexerRule>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§