Lines Matching refs:nom
20 pub mod nom {
21 //! nom's result types, re-exported.
22 pub use nom::{error::ErrorKind, error::Error, Err, IResult, Needed};
46 /// An error occurred in an underlying nom parser.
47 Parser(nom::ErrorKind),
50 impl From<nom::ErrorKind> for ErrorKind {
51 fn from(k: nom::ErrorKind) -> Self {
64 /// This is a superset of `(I, nom::ErrorKind)` that includes the additional errors specified by
74 impl<I> From<(I, nom::ErrorKind)> for Error<I> {
75 fn from(e: (I, nom::ErrorKind)) -> Self {
89 impl<I> From<::nom::error::Error<I>> for Error<I> {
90 fn from(e: ::nom::error::Error<I>) -> Self {
98 impl<I> ::nom::error::ParseError<I> for Error<I> {
99 fn from_error_kind(input: I, kind: nom::ErrorKind) -> Self {
106 fn append(_: I, _: nom::ErrorKind, other: Self) -> Self {
111 // in lieu of https://github.com/Geal/nom/issues/1010
113 fn to_cexpr_result(self) -> nom::IResult<I, O, Error<I>>;
115 impl<I, O, E> ToCexprResult<I, O> for nom::IResult<I, O, E>
119 fn to_cexpr_result(self) -> nom::IResult<I, O, Error<I>> {
122 Err(nom::Err::Incomplete(n)) => Err(nom::Err::Incomplete(n)),
123 Err(nom::Err::Error(e)) => Err(nom::Err::Error(e.into())),
124 Err(nom::Err::Failure(e)) => Err(nom::Err::Failure(e.into())),
132 result: nom::IResult<&'i [I], O, E>,
133 ) -> nom::IResult<&'i [I], O, Error<&'i [I]>>
142 Err(nom::Err::Error((rem, ErrorKind::Partial).into()))
145 Err(nom::Err::Incomplete(n)) => Err(nom::Err::Incomplete(n)),
146 Err(nom::Err::Failure(e)) => Err(nom::Err::Failure(e)),
147 Err(nom::Err::Error(e)) => Err(nom::Err::Error(e)),