pub enum TokenType {
Show 22 variants
Keyword,
Identifier,
QuotedIdentifier,
Integer,
Float,
String,
Boolean,
Null,
Operator,
LeftParen,
RightParen,
Comma,
Semicolon,
Dot,
Star,
Placeholder,
NamedPlaceholder,
NumberedPlaceholder,
LineComment,
BlockComment,
Whitespace,
Eof,
}Expand description
What a Token is.
PHP: Utopia\Query\Tokenizer\TokenType.
Variants§
Keyword
A reserved word (SELECT, FROM), upper-cased.
Identifier
A bare identifier, as written.
QuotedIdentifier
A quoted identifier, quotes included (`name`, "name").
Integer
An integer literal.
Float
A decimal or exponent literal (1.5, .5, 1e3).
String
A string literal, quotes and escapes included.
Boolean
TRUE or FALSE, upper-cased.
Null
NULL, upper-cased.
Operator
An operator, or any other character.
LeftParen
(.
RightParen
).
Comma
,.
Semicolon
;.
Dot
..
Star
*.
Placeholder
?.
NamedPlaceholder
:name.
NumberedPlaceholder
$1.
LineComment
-- comment (and MySQL’s # comment, rewritten to -- ).
BlockComment
/* comment */.
Whitespace
Spaces, tabs and line breaks.
Eof
The end of the input.
Implementations§
Trait Implementations§
impl Copy for TokenType
impl Eq for TokenType
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Forget for TokenType
impl Freeze for TokenType
impl Move 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
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§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.