pub enum TokenKind {
Show 15 variants
Whitespace,
Keyword,
Type,
Constant,
Function,
Name,
QuotedName,
String,
Number,
Comment,
Parameter,
Operator,
Punctuation,
Template,
Other,
}Expand description
What a token is.
Variants§
Whitespace
Spaces, tabs and line breaks.
Keyword
A reserved or dialect keyword (SELECT, QUALIFY, PRAGMA).
Type
A data type (VARCHAR, INT64, TIMESTAMPTZ).
Constant
TRUE, FALSE, NULL.
Function
A name followed by (: a function call.
Name
A name: a table, column, alias or schema.
QuotedName
A quoted name: "col", `col`, [col].
String
A string literal: 'it''s', E'\n', $$body$$, '''raw'''.
Number
A number: 42, 1.5e-3, .5, 0xFF.
Comment
A comment: -- … or /* … */ (nested).
Parameter
A bind parameter: :name, @name, @@var, $1, ?.
Operator
An operator: =, <>, ||, ::, ->>.
Punctuation
Punctuation: ( ) , ; . [ ] { }.
Template
A Jinja block: {{ ref('x') }}, {% if … %}, {# … #}.
Other
Anything else (a stray character).
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 UnsafeUnpin 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§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.