Function glue::combinators::structures::right_delimited
source ยท pub fn right_delimited<'a, Par, ParRes, Rhs, RhsRes>(
parser: Par,
right: Rhs,
) -> impl Parser<'a, ParRes>Expand description
Match a structure with right hand delimiter.
let ctx = ParserContext::from("123%");
assert_eq!(
right_delimited(take(.., is(digit)), is('%')).parse(ctx.clone()),
Ok((ctx.select(3..4), "123"))
);