Type Definition arithmetic_parser::Error[][src]

type Error<'a> = SpannedError<&'a str>;
Expand description

Error with code span available as a string reference.

Trait Implementations

impl<'a> ContextError<LocatedSpan<&'a str, ()>> for Error<'a>[src]

fn add_context(input: InputSpan<'a>, ctx: &'static str, target: Self) -> Self[src]

Creates a new error from an input position, a static string and an existing error. This is used mainly in the context combinator, to add user friendly information to errors when backtracking through a parse tree Read more

impl<'a> FromExternalError<LocatedSpan<&'a str, ()>, ErrorKind> for Error<'a>[src]

fn from_external_error(
    input: InputSpan<'a>,
    _: NomErrorKind,
    err: ErrorKind
) -> Self
[src]

Creates a new error from an input position, an ErrorKind indicating the wrapping parser, and an external error Read more

impl<'a> ParseError<LocatedSpan<&'a str, ()>> for Error<'a>[src]

fn from_error_kind(input: InputSpan<'a>, kind: NomErrorKind) -> Self[src]

Creates an error from the input position and an ErrorKind

fn append(_: InputSpan<'a>, _: NomErrorKind, other: Self) -> Self[src]

Combines an existing error with a new one created from the input position and an ErrorKind. This is useful when backtracking through a parse tree, accumulating error context on the way Read more

fn from_char(input: I, char) -> Self[src]

Creates an error from an input position and an expected character

fn or(self, other: Self) -> Self[src]

Combines two existing errors. This function is used to compare errors generated in various branches of [alt] Read more

impl StripCode for Error<'_>[src]

type Stripped = SpannedError<usize>

Resulting type after code stripping.

fn strip_code(self) -> Self::Stripped[src]

Strips references to code fragments in this type.