pub enum TokenType {
Word,
Number(NumberType),
String,
Char,
Symbol,
Operator,
}Expand description
Represents all possible token types that can be parsed by the tokenizer
Variants§
Word
Any alphanumeric string
Number(NumberType)
A numeric token, where NumberType specifies the format
String
A sequence of characters surrounded by double quotes (“example”)
Char
A single character surrounded by single quotes (‘a’)
Symbol
A character recognized as a symbol
Operator
A character recognized as an operator
Trait Implementations§
impl Copy for TokenType
impl Eq for TokenType
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