Re-adding 'r allowed me to remove dependency but adding in return tokens broke the build again.

This commit is contained in:
Tom Alexander 2022-12-10 22:56:03 -05:00
parent 24a8247907
commit 43fddc6e58
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 11 additions and 4 deletions

View File

@ -43,17 +43,18 @@ use tracing::trace;
type UnboundMatcher<'r, I, O, E> = dyn Fn(Context<'r>, I) -> IResult<I, O, E>;
fn context_many_till<'r: 'x, 'x, I, O, E, F, M, T>(
fn context_many_till<'r, 'x, I, O, E, F, M, T>(
context: Context<'r>,
mut many_matcher: M,
mut till_matcher: T,
) -> impl FnMut(I) -> IResult<I, (Vec<Token<'x>>, F), E>
) -> impl FnMut(I) -> IResult<I, (Vec<Token<'x>>, F), E> + 'r
where
O: Into<Token<'x>>,
I: Clone + InputLength,
E: ParseError<I>,
M: for<'a> Fn(Context<'a>, I) -> IResult<I, O, E>,
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E>,
M: for<'a> Fn(Context<'a>, I) -> IResult<I, O, E> + 'r,
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E> + 'r,
F: 'x,
{
move |mut i: I| {
let mut current_context = context.clone();
@ -134,6 +135,12 @@ pub fn paragraph<'s, 'r>(
fail_matcher: ChainBehavior::AndParent(Some(&paragraph_end)),
}));
let ret = context_many_till(&paragraph_context, flat_text_element, context_paragraph_end)(i);
match ret {
Ok(_) => todo!(),
Err(e) => {
return Err(e);
}
};
// TODO: FIX THIS
// ret
todo!()