pub enum ParseErrorKind {
Show 39 variants
UnexpectedToken {
expected: TokenType,
found: TokenType,
},
ExpectedContentWord {
found: TokenType,
},
ExpectedCopula,
UnknownQuantifier {
found: TokenType,
},
UnknownModal {
found: TokenType,
},
ExpectedVerb {
found: TokenType,
},
ExpectedTemporalAdverb,
ExpectedPresuppositionTrigger,
ExpectedFocusParticle,
ExpectedScopalAdverb,
ExpectedSuperlativeAdjective,
ExpectedComparativeAdjective,
ExpectedThan,
ExpectedNumber,
EmptyRestriction,
GappingResolutionFailed,
StativeProgressiveConflict,
UndefinedVariable {
name: String,
},
UseAfterMove {
name: String,
},
IsValueEquality {
variable: String,
value: String,
},
ZeroIndex,
ExpectedStatement,
ExpectedKeyword {
keyword: String,
},
ExpectedExpression,
ExpectedIdentifier,
RespectivelyLengthMismatch {
subject_count: usize,
object_count: usize,
},
TypeMismatch {
expected: String,
found: String,
},
TypeMismatchDetailed {
expected: String,
found: String,
context: String,
},
InfiniteType {
var_description: String,
type_description: String,
},
ArityMismatch {
function: String,
expected: usize,
found: usize,
},
FieldNotFound {
type_name: String,
field_name: String,
available: Vec<String>,
},
NotAFunction {
found_type: String,
},
InvalidRefinementPredicate,
GrammarError(String),
ScopeViolation(String),
UnresolvedPronoun {
gender: Gender,
number: Number,
},
TrailingTokens {
found: TokenType,
},
AstTooDeep {
depth: usize,
max_depth: usize,
},
Custom(String),
}Variants§
UnexpectedToken
ExpectedContentWord
ExpectedCopula
UnknownQuantifier
UnknownModal
ExpectedVerb
ExpectedTemporalAdverb
ExpectedPresuppositionTrigger
ExpectedFocusParticle
ExpectedScopalAdverb
ExpectedSuperlativeAdjective
ExpectedComparativeAdjective
ExpectedThan
ExpectedNumber
EmptyRestriction
GappingResolutionFailed
StativeProgressiveConflict
UndefinedVariable
UseAfterMove
IsValueEquality
ZeroIndex
ExpectedStatement
ExpectedKeyword
ExpectedExpression
ExpectedIdentifier
RespectivelyLengthMismatch
Subject and object lists have different lengths in a “respectively” construction.
TypeMismatch
Type mismatch during static type checking.
TypeMismatchDetailed
Type mismatch with context (e.g., “in argument 2 of ‘compute’”).
InfiniteType
A type variable would occur in its own definition (e.g., T = List<T>).
ArityMismatch
Wrong number of arguments in a function call.
FieldNotFound
A field name does not exist on the struct type.
NotAFunction
Tried to call something that is not a function.
InvalidRefinementPredicate
Invalid refinement predicate in a dependent type.
GrammarError(String)
Grammar error (e.g., “its” vs “it’s”).
ScopeViolation(String)
DRS scope violation (pronoun trapped in negation, disjunction, etc.).
UnresolvedPronoun
Unresolved pronoun in discourse mode - no accessible antecedent found.
TrailingTokens
The parser finished a sentence with input left over — accepting it would silently drop the remainder’s meaning.
AstTooDeep
The program’s AST nests deeper than every downstream walker (optimizer, codegen, interpreter, VM compiler) can safely recurse — the depth gate rejects it here so no surface ever stack-overflows.
Fields
max_depth: usizeThe enforced limit (crate::ast_depth::max_ast_depth).
Custom(String)
Custom error message (used for escape analysis, zone errors, etc.).
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more