mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
convert the errors
This commit is contained in:
parent
d6ba84ea99
commit
efb2f8b325
4 changed files with 26 additions and 33 deletions
|
@ -8,3 +8,4 @@ edition = "2021"
|
|||
[dependencies]
|
||||
nom = "7.0.0"
|
||||
nom_locate = "4.0.0"
|
||||
nom-greedyerror = "0.4.0"
|
||||
|
|
|
@ -24,17 +24,19 @@ use nom::branch::alt;
|
|||
use nom::bytes::complete::tag;
|
||||
use nom::character::complete::{char, multispace0};
|
||||
use nom::combinator::map;
|
||||
use nom::error::{ContextError, Error, VerboseError};
|
||||
use nom::error::{ContextError, Error, ErrorKind, VerboseError};
|
||||
use nom::multi::{many0, separated_list1};
|
||||
use nom::number::complete::recognize_float;
|
||||
use nom::sequence::{delimited, preceded, tuple};
|
||||
use nom::{Finish, IResult};
|
||||
use nom_greedyerror::GreedyError;
|
||||
use nom_locate::LocatedSpan;
|
||||
pub(crate) use value::parse_value;
|
||||
|
||||
pub type Span<'a> = LocatedSpan<&'a str>;
|
||||
|
||||
pub trait FilterParserError<'a>: nom::error::ParseError<Span<'a>> + ContextError<Span<'a>> {}
|
||||
impl<'a> FilterParserError<'a> for GreedyError<Span<'a>, ErrorKind> {}
|
||||
impl<'a> FilterParserError<'a> for VerboseError<Span<'a>> {}
|
||||
impl<'a> FilterParserError<'a> for Error<Span<'a>> {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue