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 moreAuto Trait Implementations§
impl Freeze for ParseErrorKind
impl RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl UnsafeUnpin for ParseErrorKind
impl UnwindSafe for ParseErrorKind
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.