diff --git a/src/parser/text_element_parser.rs b/src/parser/text_element_parser.rs index 6daf261..3917baf 100644 --- a/src/parser/text_element_parser.rs +++ b/src/parser/text_element_parser.rs @@ -43,16 +43,17 @@ use tracing::trace; type UnboundMatcher<'r, I, O, E> = dyn Fn(Context<'r>, I) -> IResult; -fn context_many_till<'r, I, O, E, F, M, T>( +fn context_many_till<'r: 'x, 'x, I, O, E, F, M, T>( context: Context<'r>, mut many_matcher: M, mut till_matcher: T, -) -> impl FnMut(I) -> IResult, F), E> +) -> impl FnMut(I) -> IResult>, F), E> where I: Clone + InputLength, E: ParseError, M: for<'a> Fn(Context<'a>, I) -> IResult, T: for<'a> Fn(Context<'a>, I) -> IResult, + O: Into>, { move |mut i: I| { let mut current_context = context.clone(); @@ -73,7 +74,6 @@ where ret.push(token); } }; - } // TODO build a vec of the elements by popping off the newest elements of the context return Ok((remaining, (ret, finish)));