diff --git a/filter-parser/src/error.rs b/filter-parser/src/error.rs index 05fc3a276..d5d36bd8e 100644 --- a/filter-parser/src/error.rs +++ b/filter-parser/src/error.rs @@ -140,7 +140,6 @@ impl<'a> Display for Error<'a> { ErrorKind::MissingClosingDelimiter(c) => { writeln!(f, "Expression `{}` is missing the following closing delimiter: `{}`.", escaped_input, c)? } - ErrorKind::InvalidPrimary if input.trim().is_empty() => { writeln!(f, "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` but instead got nothing.")? } diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index b8d3272c8..014b76bc5 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -43,6 +43,9 @@ mod condition; mod error; mod value; +use std::fmt::Debug; +use std::str::FromStr; + pub use condition::{parse_condition, parse_to, Condition}; use condition::{parse_exists, parse_not_exists}; use error::{cut_with_err, ExpectedValueKind, NomErrorExt}; @@ -56,8 +59,6 @@ use nom::number::complete::recognize_float; use nom::sequence::{delimited, preceded, terminated, tuple}; use nom::Finish; use nom_locate::LocatedSpan; -use std::fmt::Debug; -use std::str::FromStr; pub(crate) use value::parse_value; use value::word_exact; @@ -182,7 +183,7 @@ fn parse_value_list<'a>(input: Span<'a>) -> IResult>> { } } -/// "IN" "[" value_list "]" +/// "IN" WS* "[" value_list "]" fn parse_in_body(input: Span) -> IResult> { let (input, _) = ws(word_exact("IN"))(input)?;