Skip to main content

nom_pass

Function nom_pass 

Source
pub fn nom_pass<C, F>(f: F) -> NomPass<F>
where F: for<'a> Fn(Located<'a>) -> IResult<Located<'a>, NomChildren<C>>,
Expand description

Creates a pass from a nom parser producing NomChildren.

Examples found in repository?
examples/mini_lang_nom.rs (line 156)
152    fn parse(&self, source: &str, span: Span, ctx: &LangCtx) -> Outcome<LangCtx> {
153        if !matches!(ctx, LangCtx::File) {
154            return Outcome::Failed;
155        }
156        nom_pass(functions_pass_fn).parse(source, span, ctx)
157    }