Enum xxcalc::Token
[−]
[src]
pub enum Token { BracketOpening, BracketClosing, Separator, Number(f64), Operator(char), Identifier(usize), Unknown(char), Skip, }
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 Debug for Token
[src]
impl PartialEq for Token
[src]
fn eq(&self, __arg_0: &Token) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Token) -> bool
This method tests for !=
.
impl Clone for Token
[src]
fn clone(&self) -> Token
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more