pub fn oct_digit<Input>() -> impl Parser<Input, Output = u8, PartialState = ()> where
Input: Stream<Token = u8>,
Input::Error: ParseError<Input::Token, Input::Range, Input::Position>,
Expand description
Parses an octal digit.
use combine::Parser;
use combine::parser::byte::oct_digit;
assert_eq!(oct_digit().parse(&b"7"[..]), Ok((b'7', &b""[..])));
assert!(oct_digit().parse(&b"8"[..]).is_err());