Skip to content

Commit

Permalink
Don't proceed != as negate operator
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed May 3, 2023
1 parent 3baaad9 commit 877a020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/filter/parser.peg
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ ExistsExpr <- col:(Identifier !Operator !"(" / Identifier &EOF) {
/ Operator { // panics when the rule doesn't match
return nil, nil
}
Negate <- ("!" &Operator / "!" &")" / "!" &[&|] / "!" &EOF) {
Negate <- ("!" !"=" &Operator / "!" &")" / "!" &[&|] / "!" &EOF) {
panic(fmt.Sprintf("unexpected negate operator %q at pos %d", string(c.text), c.pos.col))
}
/ "!"+ {
/ "!"+ !"=" {
ops := string(c.text)
if len(ops) > 1 {
panic(fmt.Sprintf("unexpected negate operators %q at pos %d", string(c.text), c.pos.col))
Expand Down

0 comments on commit 877a020

Please sign in to comment.