pub enum TokenKind {
Show 140 variants
EOI,
Whitespace,
Comment,
Ident,
LiteralString,
LiteralHexBinaryString,
LiteralInteger,
LiteralHexInteger,
LiteralFloat,
Eq,
NotEq,
Lt,
Gt,
Lte,
Gte,
Plus,
Minus,
Multiply,
Divide,
Modulo,
Concat,
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Comma,
Dot,
Colon,
DoubleColon,
SemiColon,
Dollar,
Arrow,
ADD,
AGGREGATE,
ALL,
ALTER,
ANALYZE,
AND,
ANY,
ARRAY,
AS,
ASC,
BEGIN,
BETWEEN,
BOOLEAN,
BY,
CASE,
CAST,
CLUSTER,
COLUMN,
COMMENT,
CREATE,
DATABASES,
DATABASE,
DELETE,
DESC,
DESCRIBE,
DISTINCT,
DROP,
ELSE,
END,
EXCLUDE,
EXEC,
EXISTS,
EXPLAIN,
FALSE,
FIRST,
FLOAT,
FROM,
FULL,
GROUP,
IF,
IN,
INDEX,
INNER,
INSERT,
INT,
INTERVAL,
INTO,
IS,
JOB,
JOBS,
JOIN,
KEY,
LAST,
LEFT,
LIMIT,
MATERIALIZED,
NODEGROUP,
NOT,
NULL,
NULLS,
OBJECT,
OFFSET,
ON,
OPTIMIZE,
OR,
ORDER,
OUTER,
PARTITION,
PERCENT,
PLAN,
POINT,
RANGE,
RENAME,
REPLACE,
RESUME,
RIGHT,
SAMPLE,
SCHEDULE,
SCHEMAS,
SCHEMA,
SEARCH,
SELECT,
SET,
SHOW,
STATEMENTS,
STRING,
SUSPEND,
TABLE,
TABLES,
THEN,
TIMESTAMP,
TO,
TRUE,
UINT,
UNION,
UPDATE,
VACUUM,
VALUES,
VIEW,
VIEWS,
WHEN,
WHERE,
WINDOW,
WITH,
WITHIN,
XOR,
}Variants§
EOI
A special token representing the end of input.
Whitespace
Whitespace characters.
Comment
Single-line or multi-line comments.
Ident
Unquoted identifiers.
The identifier will be normalized to lowercase, and thus only ASCII letters are allowed. Otherwise, the normalization may subtly change the intent of the identifier.
LiteralString
LiteralHexBinaryString
LiteralInteger
LiteralHexInteger
Hexadecimal integer literals with ‘0x’ prefix.
LiteralFloat
Floating point literals.
Eq
NotEq
Lt
Gt
Lte
Gte
Plus
Minus
Multiply
Divide
Modulo
Concat
LParen
RParen
LBracket
RBracket
LBrace
RBrace
Comma
Dot
Colon
DoubleColon
SemiColon
Dollar
Arrow
ADD
AGGREGATE
ALL
ALTER
ANALYZE
AND
ANY
ARRAY
AS
ASC
BEGIN
BETWEEN
BOOLEAN
BY
CASE
CAST
CLUSTER
COLUMN
COMMENT
CREATE
DATABASES
DATABASE
DELETE
DESC
DESCRIBE
DISTINCT
DROP
ELSE
END
EXCLUDE
EXEC
EXISTS
EXPLAIN
FALSE
FIRST
FLOAT
FROM
FULL
GROUP
IF
IN
INDEX
INNER
INSERT
INT
INTERVAL
INTO
IS
JOB
JOBS
JOIN
KEY
LAST
LEFT
LIMIT
MATERIALIZED
NODEGROUP
NOT
NULL
NULLS
OBJECT
OFFSET
ON
OPTIMIZE
OR
ORDER
OUTER
PARTITION
PERCENT
PLAN
POINT
RANGE
RENAME
REPLACE
RESUME
RIGHT
SAMPLE
SCHEDULE
SCHEMAS
SCHEMA
SEARCH
SELECT
SET
SHOW
STATEMENTS
STRING
SUSPEND
TABLE
TABLES
THEN
TIMESTAMP
TO
TRUE
UINT
UNION
UPDATE
VACUUM
VALUES
VIEW
VIEWS
WHEN
WHERE
WINDOW
WITH
WITHIN
XOR
Implementations§
Source§impl TokenKind
impl TokenKind
pub fn is_literal(&self) -> bool
pub fn is_symbol(&self) -> bool
pub fn is_keyword(&self) -> bool
pub fn is_reserved_keyword(&self) -> bool
Trait Implementations§
Source§impl<'s> Logos<'s> for TokenKind
impl<'s> Logos<'s> for TokenKind
Source§type Error = ()
type Error = ()
Error type returned by the lexer. This can be set using
#[logos(error = MyError)]. Defaults to () if not set.Source§type Extras = ()
type Extras = ()
Associated type
Extras for the particular lexer. This can be set using
#[logos(extras = MyExtras)] and accessed inside callbacks.Source§type Source = str
type Source = str
Source type this token can be lexed from. This will default to
str,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8].Source§fn lex(
lex: &mut Lexer<'s, Self>,
) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
fn lex( lex: &mut Lexer<'s, Self>, ) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
The heart of Logos. Called by the
Lexer. The implementation for this function
is generated by the logos-derive crate.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 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