Lines Matching refs:ErrorKind
7 use crate::error::ErrorKind;
73 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy()
98 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of()
123 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of()
151 let e: ErrorKind = ErrorKind::CrLf; in crlf()
194 let e: ErrorKind = ErrorKind::Tag; in not_line_ending()
232 CompareResult::Error => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending()
343 input.split_at_position1(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1()
385 input.split_at_position1(|item| !item.is_dec_digit(), ErrorKind::Digit) in digit1()
427 input.split_at_position1(|item| !item.is_hex_digit(), ErrorKind::HexDigit) in hex_digit1()
469 input.split_at_position1(|item| !item.is_oct_digit(), ErrorKind::OctDigit) in oct_digit1()
511 input.split_at_position1(|item| !item.is_alphanum(), ErrorKind::AlphaNumeric) in alphanumeric1()
560 ErrorKind::Space, in space1()
611 ErrorKind::MultiSpace, in multispace1()
657 … return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit)));
663 … None => return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit))),
673 … return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit)));
679 … None => return Err(Err::Error(E::from_error_kind(input, ErrorKind::Digit))),
717 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Digit)));
723 None => return Err(Err::Error(E::from_error_kind(i, ErrorKind::Digit))),
740 use crate::error::ErrorKind;
748 let res: $crate::IResult<_, _, (_, ErrorKind)> = $left;
756 assert_eq!(anychar::<_, (&str, ErrorKind)>("Ә"), Ok(("", 'Ә'))); in anychar_str()
769 assert_eq!(alpha1(b), Err(Err::Error((b, ErrorKind::Alpha)))); in character()
770 assert_eq!(alpha1::<_, (_, ErrorKind)>(c), Ok((&c[1..], &b"a"[..]))); in character()
772 alpha1::<_, (_, ErrorKind)>(d), in character()
775 assert_eq!(digit1(a), Err(Err::Error((a, ErrorKind::Digit)))); in character()
777 digit1::<_, (_, ErrorKind)>(b), in character()
780 assert_eq!(digit1(c), Err(Err::Error((c, ErrorKind::Digit)))); in character()
781 assert_eq!(digit1(d), Err(Err::Error((d, ErrorKind::Digit)))); in character()
783 hex_digit1::<_, (_, ErrorKind)>(a), in character()
787 hex_digit1::<_, (_, ErrorKind)>(b), in character()
791 hex_digit1::<_, (_, ErrorKind)>(c), in character()
795 hex_digit1::<_, (_, ErrorKind)>(d), in character()
798 assert_eq!(hex_digit1(e), Err(Err::Error((e, ErrorKind::HexDigit)))); in character()
799 assert_eq!(oct_digit1(a), Err(Err::Error((a, ErrorKind::OctDigit)))); in character()
801 oct_digit1::<_, (_, ErrorKind)>(b), in character()
804 assert_eq!(oct_digit1(c), Err(Err::Error((c, ErrorKind::OctDigit)))); in character()
805 assert_eq!(oct_digit1(d), Err(Err::Error((d, ErrorKind::OctDigit)))); in character()
807 alphanumeric1::<_, (_, ErrorKind)>(a), in character()
812 alphanumeric1::<_, (_, ErrorKind)>(c), in character()
816 alphanumeric1::<_, (_, ErrorKind)>(d), in character()
820 space1::<_, (_, ErrorKind)>(e), in character()
823 assert_eq!(space1::<_, (_, ErrorKind)>(f), Ok((&b";"[..], &b" "[..]))); in character()
835 alpha1::<_, (_, ErrorKind)>(a), in character_s()
838 assert_eq!(alpha1(b), Err(Err::Error((b, ErrorKind::Alpha)))); in character_s()
839 assert_eq!(alpha1::<_, (_, ErrorKind)>(c), Ok((&c[1..], &"a"[..]))); in character_s()
840 assert_eq!(alpha1::<_, (_, ErrorKind)>(d), Ok(("é12", &"az"[..]))); in character_s()
841 assert_eq!(digit1(a), Err(Err::Error((a, ErrorKind::Digit)))); in character_s()
843 digit1::<_, (_, ErrorKind)>(b), in character_s()
846 assert_eq!(digit1(c), Err(Err::Error((c, ErrorKind::Digit)))); in character_s()
847 assert_eq!(digit1(d), Err(Err::Error((d, ErrorKind::Digit)))); in character_s()
849 hex_digit1::<_, (_, ErrorKind)>(a), in character_s()
853 hex_digit1::<_, (_, ErrorKind)>(b), in character_s()
857 hex_digit1::<_, (_, ErrorKind)>(c), in character_s()
860 assert_eq!(hex_digit1::<_, (_, ErrorKind)>(d), Ok(("zé12", &"a"[..]))); in character_s()
861 assert_eq!(hex_digit1(e), Err(Err::Error((e, ErrorKind::HexDigit)))); in character_s()
862 assert_eq!(oct_digit1(a), Err(Err::Error((a, ErrorKind::OctDigit)))); in character_s()
864 oct_digit1::<_, (_, ErrorKind)>(b), in character_s()
867 assert_eq!(oct_digit1(c), Err(Err::Error((c, ErrorKind::OctDigit)))); in character_s()
868 assert_eq!(oct_digit1(d), Err(Err::Error((d, ErrorKind::OctDigit)))); in character_s()
870 alphanumeric1::<_, (_, ErrorKind)>(a), in character_s()
875 alphanumeric1::<_, (_, ErrorKind)>(c), in character_s()
878 assert_eq!(alphanumeric1::<_, (_, ErrorKind)>(d), Ok(("é12", "az"))); in character_s()
880 space1::<_, (_, ErrorKind)>(e), in character_s()
895 match alpha1::<_, (_, ErrorKind)>(a) { in offset()
901 match digit1::<_, (_, ErrorKind)>(b) { in offset()
907 match alphanumeric1::<_, (_, ErrorKind)>(c) { in offset()
913 match space1::<_, (_, ErrorKind)>(d) { in offset()
919 match multispace1::<_, (_, ErrorKind)>(e) { in offset()
925 match hex_digit1::<_, (_, ErrorKind)>(f) { in offset()
931 match oct_digit1::<_, (_, ErrorKind)>(f) { in offset()
943 not_line_ending::<_, (_, ErrorKind)>(a), in is_not_line_ending_bytes()
949 not_line_ending::<_, (_, ErrorKind)>(b), in is_not_line_ending_bytes()
955 not_line_ending::<_, (_, ErrorKind)>(c), in is_not_line_ending_bytes()
961 not_line_ending::<_, (_, ErrorKind)>(d), in is_not_line_ending_bytes()
986 assert_eq!(not_line_ending(f), Err(Err::Error((f, ErrorKind::Tag)))); in is_not_line_ending_str()
990 not_line_ending::<_, (_, ErrorKind)>(g2), in is_not_line_ending_str()
1003 Err(Err::Error(error_position!(i, ErrorKind::HexDigit))) in hex_digit_test()
1009 Err(Err::Error(error_position!(i, ErrorKind::HexDigit))) in hex_digit_test()
1034 Err(Err::Error(error_position!(i, ErrorKind::OctDigit))) in oct_digit_test()
1089 Err(Err::Error(error_position!(&b"\ra"[..], ErrorKind::CrLf))) in cr_lf()
1096 Err(Err::Error(error_position!("\ra", ErrorKind::CrLf))) in cr_lf()
1110 Err(Err::Error(error_position!(&b"\ra"[..], ErrorKind::CrLf))) in end_of_line()
1118 Err(Err::Error(error_position!("\ra", ErrorKind::CrLf))) in end_of_line()
1137 ErrorKind::Digit, in digit_to_i16()
1151 ErrorKind::Digit, in digit_to_i16()
1162 ErrorKind::Digit, in digit_to_u32()