Type Alias arithmetic_parser::Spanned

source ·
pub type Spanned<'a, T = ()> = LocatedSpan<&'a str, T>;
Expand description

Value with an associated code span.

Aliased Type§

struct Spanned<'a, T = ()> {
    pub extra: T,
    /* private fields */
}

Fields§

§extra: T

Extra information that can be embedded by the user.

Implementations§

source§

impl<'a> Spanned<'a>

source

pub fn from_str<R>(code: &'a str, range: R) -> Self
where InputSpan<'a>: Slice<R>,

Creates a span from a range in the provided code. This is mostly useful for testing.