Function lip::located

source ·
pub fn located<'a, P, A, S: Clone + 'a>(
    parser: P
) -> impl Parser<'a, Output = Located<A>, State = S>where
    P: Parser<'a, Output = A, State = S> + 'a,
Expand description

Record the beginning and ending location of the thing being parsed.

You can surround any parser with located and remember the location of the parsed output for later error messaging or text processing.