#[non_exhaustive]pub enum ErrorKind {
Show 17 variants
UnexpectedToken {
expected: Vec<Expected>,
found: String,
},
UnexpectedEof {
expected: Vec<Expected>,
},
UnterminatedString,
UnterminatedComment,
InvalidEscape {
sequence: String,
},
InvalidNumber {
raw: String,
reason: NumberReason,
},
EmptyInput,
MissingClause {
clause: &'static str,
after: &'static str,
},
DuplicateClause {
clause: &'static str,
},
InvalidAssignment {
reason: &'static str,
},
Unsupported {
production: Cow<'static, str>,
},
Internal {
message: String,
},
UnresolvedVariable {
name: String,
},
RedeclaredVariable {
name: String,
first_span: Span,
},
AggregationMix {
non_grouping: Vec<String>,
},
DistinctNotAllowed,
InvalidReference {
name: String,
reason: &'static str,
},
}Expand description
The structured kind of a parse/AST error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedToken
The parser encountered an unexpected token.
UnexpectedEof
The input ended before the parser expected it to.
UnterminatedString
A string literal was opened but never closed.
UnterminatedComment
A comment was opened but never closed.
InvalidEscape
An escape sequence inside a string was invalid.
InvalidNumber
A numeric literal was malformed.
EmptyInput
The input was empty.
MissingClause
A required clause was missing after another clause.
DuplicateClause
A clause appeared more than once where only one is allowed.
InvalidAssignment
An assignment was syntactically or semantically invalid.
Unsupported
A grammar production is not yet supported by the AST builder.
Internal
An internal error — last-resort fallback.
UnresolvedVariable
A variable was referenced but never bound in scope (semantic).
RedeclaredVariable
A variable was redeclared in the same scope (semantic).
AggregationMix
WITH/RETURN mixes aggregates and non-grouping expressions (semantic).
DistinctNotAllowed
DISTINCT used where it is not allowed (semantic).
InvalidReference
Invalid reference in ORDER BY / WHERE after WITH (semantic).