procc_ll::token

Trait Token

Source
pub trait Token {
    // Required methods
    fn exec(&self, input: &str, program: &mut ProgramBlock) -> Option<Values>;
    fn is_token(&self, c: &str) -> bool;
}
Expand description

trait that is used to define a structure, contains one method to run the token and another to verify that the token is compatible

Required Methods§

Source

fn exec(&self, input: &str, program: &mut ProgramBlock) -> Option<Values>

Execute the token, requires the string token and the program block

Source

fn is_token(&self, c: &str) -> bool

Verify it is a token

Implementors§