Specialize to strings

This commit is contained in:
greg 2020-03-14 01:54:35 -07:00
parent 7ffd6b2bd7
commit df99ff1e06

View File

@ -17,11 +17,9 @@ use crate::builtin::Builtin;
type ParseResult<'a, T> = IResult<&'a str, T, VerboseError<&'a str>>;
pub fn ws<I, O, E: ParseError<I>, F>(parser: F) -> impl Fn(I) -> IResult<I, O, E>
pub fn ws<'a, O, E: ParseError<&'a str>, F>(parser: F) -> impl Fn(&'a str) -> IResult<&'a str, O, E>
where
I: nom::InputTakeAtPosition,
<I as nom::InputTakeAtPosition>::Item: nom::AsChar + Clone,
F: Fn(I) -> IResult<I, O, E>,
F: Fn(&'a str) -> IResult<&'a str, O, E>,
{
delimited(space0, parser, space0)
}