Trait xxcalc::TokensProcessor [] [src]

pub trait TokensProcessor {
    fn process(&mut self, tokens: &Tokens) -> Result<&Tokens, ParsingError>;
}

Transforms list of tokens into another list of tokens.

A TokensProcessor can be implemented for a parser which takes a list of tokens in some order and transform them into list of tokens in the other form (like infix to RPN notation). Furthermore a TokensProcessor can be used to extend tokenizer with knowledge of new tokens, as it can transform unknown tokens to known ones.

Required Methods

Implementors