Type Alias kodept_parse::TokenizationError
source · pub type TokenizationError<'t> = ErrorTree<&'t str>;
Aliased Type§
enum TokenizationError<'t> {
Base {
location: &'t str,
kind: BaseErrorKind<&'static str, Box<dyn Error + Send + Sync>>,
},
Stack {
base: Box<GenericErrorTree<&'t str, &'static str, &'static str, Box<dyn Error + Send + Sync>>>,
contexts: Vec<(&'t str, StackContext<&'static str>)>,
},
Alt(Vec<GenericErrorTree<&'t str, &'static str, &'static str, Box<dyn Error + Send + Sync>>>),
}
Variants§
Base
A specific error event at a specific location. Often this will indicate that something like a tag or character was expected at that location.
Fields
Stack
A stack indicates a chain of error contexts was provided. The stack
should be read “backwards”; that is, errors earlier in the Vec
occurred “sooner” (deeper in the call stack).
Fields
§
base: Box<GenericErrorTree<&'t str, &'static str, &'static str, Box<dyn Error + Send + Sync>>>
The original error
§
contexts: Vec<(&'t str, StackContext<&'static str>)>
The stack of contexts attached to that error
Alt(Vec<GenericErrorTree<&'t str, &'static str, &'static str, Box<dyn Error + Send + Sync>>>)
A series of parsers were tried at the same location (for instance, via
the alt
combinator) and all of them failed. All
of the errors in this set are “siblings”.