Function escaped
fn escaped<'a, I, Error, F, G>(normal: F, control_char: char, escapable: G) -> impl FnMut(I) -> crate::internal::IResult<I, I, Error>
where
I: Clone + crate::traits::Offset + Input + 'a,
<I as Input>::Item: crate::traits::AsChar,
F: Parser<I, Error = Error>,
G: Parser<I, Error = Error>,
Error: ParseError<I>
Matches a byte string with escaped characters.
- The first argument matches the normal characters (it must not accept the control character)
- The second argument is the control character (like
\in most languages) - The third argument matches the escaped characters
Example
# use ;
# use digit1;
use escaped;
use one_of;
assert_eq!;
assert_eq!;