pub enum TokenType {
Error,
Eof,
Identifier,
Keyword,
String,
Integer,
Float,
Operator,
Punctuator,
Comment,
Parameter,
}Expand description
TokenType represents the type of a token
Variants§
Error
Error token
Eof
End of file
Identifier
Identifier (table name, column name, etc.)
Keyword
SQL keyword (SELECT, FROM, WHERE, etc.)
String
String literal (‘hello’)
Integer
Integer number (123)
Float
Floating point number (123.45)
Operator
Operator (=, <, >, +, -, etc.)
Punctuator
Punctuator (comma, semicolon, parentheses, etc.)
Comment
Comment (– or /* */)
Parameter
Parameter ($1, ?)
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 UnsafeUnpin 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