pub enum TokenType {
Operator,
Operand,
Variable,
Bracket,
Function,
}
Expand description
Token types for the tokenization process.
Operator
: Represents mathematical operators such as+
,-
,*
,/
,^
,!
, and√
.- Trigonometric functions: “sin”, “cos”, “tan”, “arcsin”, “arccos”, “arctan”
- Square root: “sqrt”, “√”
- Logarithmic functions: “log” (base-10 logarithm), “ln” (natural logarithm)
- Special constants or functions: “ans”
Operand
: Represents numeric values, including integers and floating-point numbers.- Example values: “2”, “3.14”, “10”, “0”
Variable
: Represents alphanumeric symbols used as variables or identifiers.- Example values: “x”, “y”, “result”, “my_variable”
Bracket
: Represents parentheses used to group expressions.- Example values: “(”, “)”
Variants§
Trait Implementations§
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Freeze for TokenType
impl RefUnwindSafe for TokenType
impl Send for TokenType
impl Sync for TokenType
impl Unpin for TokenType
impl UnwindSafe for TokenType
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