Specialize to strings
This commit is contained in:
parent
7ffd6b2bd7
commit
df99ff1e06
@ -17,11 +17,9 @@ use crate::builtin::Builtin;
|
|||||||
|
|
||||||
type ParseResult<'a, T> = IResult<&'a str, T, VerboseError<&'a str>>;
|
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
|
where
|
||||||
I: nom::InputTakeAtPosition,
|
F: Fn(&'a str) -> IResult<&'a str, O, E>,
|
||||||
<I as nom::InputTakeAtPosition>::Item: nom::AsChar + Clone,
|
|
||||||
F: Fn(I) -> IResult<I, O, E>,
|
|
||||||
{
|
{
|
||||||
delimited(space0, parser, space0)
|
delimited(space0, parser, space0)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user