pub enum TokenKind {
Show 19 variants
Eof,
Identifier,
QuotedTable,
BracketName,
String,
DateTime,
Number,
QueryParameter,
Comment,
Operator,
OpenParen,
CloseParen,
OpenBrace,
CloseBrace,
Comma,
Semicolon,
Colon,
Dot,
Unknown,
}Expand description
What a Token is.
Variants§
Eof
End of input. Always the last token; text is empty.
Identifier
Sales, MyVar, NORM.DIST — internal dots are absorbed.
QuotedTable
'Sales Header' — a single-quoted table name, '' as the escape.
BracketName
[Net Price] — a bracketed column, measure, or hierarchy-level name.
The lexer cannot tell the three apart; resolution does.
String
"text" — a string literal, "" as the escape.
DateTime
dt"2024-01-01" — a date-time literal.
Number
1, 1.5, 1.5E+10.
QueryParameter
@Risk — a query parameter (DAX queries, not model expressions).
Comment
// …, -- …, or /* … */ — never produces a reference.
Operator
+ - * / ^ & = == <> < > <= >= && || ! => :=
OpenParen
(
CloseParen
)
OpenBrace
{
CloseBrace
}
Comma
,
Semicolon
;
Colon
:
Dot
.
Unknown
Any other character. Never fails the scan.
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.