procc_ll/token.rs
1use crate::Program;
2use crate::Values;
3///trait that is used to define a structure, contains one method to run the token and another to verify that the token is compatible
4pub trait Token {
5 /// Execute the token, requires the string token and the program block
6 fn exec(&self, input: &str, program: &mut Program) -> Option<Values>;
7 /// Verify it is a token
8 fn is_token(&self, c: &str) -> bool;
9}
10