Make filter parser more strict regarding spacing around operators

OR, AND, NOT, TO must now be followed by spaces
This commit is contained in:
Loïc Lecrenier 2022-06-16 09:12:37 +02:00
parent c17d616250
commit ea0642c32d
3 changed files with 32 additions and 26 deletions

View file

@ -48,7 +48,7 @@ fn quoted_by(quote: char, input: Span) -> IResult<Token> {
))
}
/// value = WS* ( word | singleQuoted | doubleQuoted) WS*
/// value = WS* ( word | singleQuoted | doubleQuoted) WS+
pub fn parse_value<'a>(input: Span<'a>) -> IResult<Token<'a>> {
// to get better diagnostic message we are going to strip the left whitespaces from the input right now
let (input, _) = take_while(char::is_whitespace)(input)?;