add: parser combinators.
This commit is contained in:
@@ -37,7 +37,7 @@ impl<TToken, T1, T2, TContext, P, P2, F> Parser<TToken, T2, TContext> for BindPa
|
||||
where
|
||||
TToken: Debug + Clone,
|
||||
P: Parser<TToken, T1, TContext>,
|
||||
F: Fn(&T1) -> P2,
|
||||
F: Fn(T1) -> P2,
|
||||
P2: Parser<TToken, T2, TContext>,
|
||||
{
|
||||
fn parse<'a>(
|
||||
@@ -47,7 +47,7 @@ where
|
||||
) -> ParserResult<'a, TToken, T2> {
|
||||
let (input, middle) = self.parser.parse(context.clone(), input)?;
|
||||
|
||||
(self.binder)(&middle).parse(context, input)
|
||||
(self.binder)(middle).parse(context, input)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user