pub enum TokenKind {
Number,
Variable,
Operator,
Open,
Close,
Separator,
End,
Error,
Null,
}
Expand description
Classifies the kind of token produced during lexical analysis.
These token types are used by the lexer to categorize different elements in the expression string during the parsing phase.
Variants§
Number
A numerical literal.
Variable
A variable identifier.
Operator
An operator such as +, -, *, /, ^, etc.
Open
An opening delimiter like ‘(’ or ‘[’.
Close
A closing delimiter like ‘)’ or ‘]’.
Separator
A separator between items, typically a comma.
End
End of the expression.
Error
An error token representing invalid input.
Null
A null or placeholder token.
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnwindSafe for TokenKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.