Function escaped
fn escaped<I, Error, F, G>(normal: F, control_char: char, escapable: G) -> impl Parser<I, Output = I, Error = Error>
where
I: Input + Clone + crate::traits::Offset,
<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!;