rowan_nom

Function peek

Source
pub fn peek<'slice, 'src: 'slice, Lang: Language, E, IE>(
    parser: impl Parser<Input<'slice, 'src, Lang>, Children<Lang, E>, IE>,
) -> impl FnMut(Input<'slice, 'src, Lang>) -> IResult<'slice, 'src, Lang, E, IE>
where Lang::Kind: 'static,
Expand description

Makes a parser peek without consuming

Returns Ok((same_input, Children::empty())) or the error returned by the wrapped parser

Works the same as nom::combinator::peek