use crate::parser::input::Input;
use nom::error::{Error, ErrorKind};
#[derive(Clone, Debug, PartialEq)]
pub enum ParseError {
InvalidSyntax,
ExceededDepthLimit,
ExceededQuantifierLimit,
}
impl<'a> nom::error::ParseError<Input<'a>> for ParseError {
fn from_error_kind(input: Input<'a>, kind: ErrorKind) -> Self {
ParseError::from(Error::new(input, kind))
}
fn append(_input: Input<'a>, _kind: ErrorKind, other: Self) -> Self {
other
}
}
impl<'a> From<Error<Input<'a>>> for ParseError {
fn from(_value: Error<Input<'a>>) -> Self {
Self::InvalidSyntax
}
}