Function chumsky::text::semantic_indentation
source · pub fn semantic_indentation<'a, C, Tok, T, F, E: Error<C> + 'a>(
token: T,
make_group: F
) -> impl Parser<C, Vec<Tok>, Error = E> + Clone + 'awhere
C: Character + 'a,
Tok: 'a,
T: Parser<C, Tok, Error = E> + Clone + 'a,
F: Fn(Vec<Tok>, E::Span) -> Tok + Clone + 'a,
Expand description
A parser that consumes text and generates tokens using semantic whitespace rules and the given token parser.
Also required is a function that collects a Vec
of tokens into a whitespace-indicated token tree.