Trying to switch to unbound matchers.
This commit is contained in:
parent
05b3ac1725
commit
11cf24a500
@ -39,18 +39,15 @@ use nom::Parser;
|
||||
use tracing::instrument;
|
||||
use tracing::trace;
|
||||
|
||||
type UnboundMatcher<'r> =
|
||||
dyn for<'s> Fn(Context<'r>, &'s str) -> IResult<&'s str, &'s str, VerboseError<&'s str>>;
|
||||
type UnboundMatcher<'r, I, O, E> = dyn for<'s> Fn(Context<'r>, I) -> IResult<I, O, E>;
|
||||
|
||||
fn context_many_till<'r, I, O, E, F, M, T>(
|
||||
fn context_many_till<'r, I, O, E, F>(
|
||||
context: Context<'r>,
|
||||
mut many_matcher: M,
|
||||
mut till_matcher: T,
|
||||
mut many_matcher: UnboundMatcher<'r, I, O, E>,
|
||||
mut till_matcher: UnboundMatcher<'r, I, F, E>,
|
||||
) -> impl FnMut(I) -> IResult<I, (Vec<O>, F), E>
|
||||
where
|
||||
I: Clone + InputLength,
|
||||
M: Parser<I, O, E>,
|
||||
T: Parser<I, F, E>,
|
||||
E: ParseError<I>,
|
||||
{
|
||||
move |mut i: I| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user