pub enum TokenType {
Show 109 variants
EOF,
Error,
Identifier,
Integer,
Float,
String,
InterpString,
ObfuscatedLiteral,
Parameter,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Colon,
DoubleColon,
Comma,
Dot,
Semicolon,
Pipe,
DoublePipe,
Dash,
ArrowRight,
ArrowLeft,
FatArrow,
Star,
Plus,
Slash,
Percent,
Caret,
DotDot,
Bang,
Ampersand,
Equals,
NotEquals,
LessThan,
GreaterThan,
LessEqual,
GreaterEqual,
RegexMatch,
MATCH,
OPTIONAL,
CREATE,
INSERT,
MERGE,
DELETE,
DETACH,
SET,
REMOVE,
RETURN,
WITH,
UNWIND,
WHERE,
ORDER,
BY,
ASC,
DESC,
LIMIT,
SKIP,
AS,
DISTINCT,
AND,
OR,
NOT,
XOR,
IN,
STARTS,
ENDS,
CONTAINS,
IS,
NULL,
TRUE,
FALSE,
CASE,
WHEN,
THEN,
ELSE,
END,
FOREACH,
CALL,
YIELD,
UNION,
ALL,
ON,
INDEX,
CONSTRAINT,
FOR,
REQUIRE,
UNIQUE,
EXISTS,
IF,
DROP,
VECTOR,
POINT,
OPTIONS,
NODE,
REL,
COUNT,
COLLECT,
LOAD,
FROM,
CSV,
REDUCE,
SPATIAL,
EXPLAIN,
PROFILE,
INFINITY,
NAN,
}Expand description
Token types for the Cypher lexer.
Variants§
EOF
Error
Identifier
Integer
Float
String
InterpString
CIP-261 interpolated string literal s'...' / s"...". Payload is
the body between the quotes with standard escapes resolved; \{ and
\} stay as two characters so the parser can tell an escaped literal
brace from an expression delimiter, and raw {/} are kept for the
parser to split into text/expression parts.
ObfuscatedLiteral
The Neo4j internal obfuscated literal ****** (exactly six stars),
lexed only under the obfuscated-literals preview gate: a dummy
false for semantic analysis, never meant to execute. Without the
gate the run lexes as ordinary * tokens and the query fails with
the parser’s own syntax error, Neo4j’s disabled-form behavior.
Parameter
LeftParen
RightParen
LeftBracket
RightBracket
LeftBrace
RightBrace
Colon
DoubleColon
Comma
Dot
Semicolon
Pipe
DoublePipe
Dash
ArrowRight
ArrowLeft
FatArrow
Star
Plus
Slash
Percent
Caret
DotDot
Bang
Ampersand
Equals
NotEquals
LessThan
GreaterThan
LessEqual
GreaterEqual
RegexMatch
MATCH
OPTIONAL
CREATE
INSERT
MERGE
DELETE
DETACH
SET
REMOVE
RETURN
WITH
UNWIND
WHERE
ORDER
BY
ASC
DESC
LIMIT
SKIP
AS
DISTINCT
AND
OR
NOT
XOR
IN
STARTS
ENDS
CONTAINS
IS
NULL
TRUE
FALSE
CASE
WHEN
THEN
ELSE
END
FOREACH
CALL
YIELD
UNION
ALL
ON
INDEX
CONSTRAINT
FOR
REQUIRE
UNIQUE
EXISTS
IF
DROP
VECTOR
POINT
OPTIONS
NODE
REL
COUNT
COLLECT
LOAD
FROM
CSV
REDUCE
SPATIAL
EXPLAIN
PROFILE
INFINITY
NAN
Implementations§
Source§impl TokenType
impl TokenType
Sourcepub fn is_keyword(self) -> bool
pub fn is_keyword(self) -> bool
Returns true if this token type is a keyword (MATCH..PROFILE range).
Sourcepub fn is_ident_like(self) -> bool
pub fn is_ident_like(self) -> bool
Returns true if the token can be used as an identifier (variable,
alias, map key, …): Identifier or any keyword except the
CLAUSE_KEYWORDS.
Sourcepub fn is_schema_name(self) -> bool
pub fn is_schema_name(self) -> bool
Returns true if the token is Identifier or any keyword: openCypher’s
SchemaName ::= SymbolicName | ReservedWord, for positions where the
grammar already requires a name, so no keyword there starts a clause
– property keys after ., the LET binding variable, and label and
relationship-type names. ADR-0169: a strict superset of
is_ident_like(), so (o:Order) and -[:ORDER]-> parse unquoted
with the name kept as written.
This token class is unrelated to, and deliberately wider than, the
narrower thing this crate also calls a schema name: the
index/constraint name ast::SchemaName that
parse_optional_schema_name / parse_required_schema_name read
(Identifier, INDEX, CONSTRAINT or a $param only).
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
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
key and return true if they are equal.