pub enum TokenType {
Symbol(String),
Identifier(String),
StringLiteral(String),
NumberLiteral(String, Number),
Keyword(String),
Comment(String),
Ignore,
NewLine,
Eof,
Unknown,
}Variants§
Symbol(String)
a symbol from the symbols list
Identifier(String)
an identifier
StringLiteral(String)
a string litteral. value is the string value, without the delimiting quotes
NumberLiteral(String, Number)
a number literal, with its string representation in the code and its parsed value
Keyword(String)
a keyword from the keywords list
Comment(String)
a single or multi-line comment. The value contains the delimiting characters.
Ignore
space, tabulations, …
NewLine
a newline character
Eof
Unknown
only if Scanner::run returns an error
Implementations§
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