pub enum Token {
BracketOpening,
BracketClosing,
Separator,
Number(f64),
Operator(char),
Identifier(usize),
Unknown(char),
Skip,
}Expand description
Token is a basic unit returned after tokenization using a StringProcessor.
Token can be than rearranged with a TokensProcessor and interpreted (evaluated) to a Polynomial using a TokensReducer.
Tokens are used to conveniently store expressions in partially parsed and computer readable form.
Variants§
BracketOpening
Opening bracket ( or beginning of subexpression
BracketClosing
Closing bracket ) or ending of subexpression
Separator
Argument separator
Number(f64)
Floating point number
Operator(char)
Single character operator
Identifier(usize)
Symbol identifier (represented by index in identifiers table)
Unknown(char)
Unidentified character (with no meaning to a StringProcessor)
Skip
Skip marker
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more