This repository was archived by the owner on Oct 31, 2024. It is now read-only.
File tree 2 files changed +27
-1
lines changed
main/antlr4/io/burt/jmespath/parser
test/java/io/burt/jmespath/parser 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ expression
7
7
| expression bracketSpecifier # bracketedExpression
8
8
| bracketSpecifier # bracketExpression
9
9
| expression COMPARATOR expression # comparisonExpression
10
+ | ' !' expression # notExpression
10
11
| expression ' &&' expression # andExpression
11
12
| expression ' ||' expression # orExpression
12
13
| identifier # identifierExpression
13
- | ' !' expression # notExpression
14
14
| ' (' expression ' )' # parenExpression
15
15
| wildcard # wildcardExpression
16
16
| multiSelectList # multiSelectListExpression
Original file line number Diff line number Diff line change @@ -805,6 +805,32 @@ public void bareNegatedExpression() {
805
805
assertThat (actual , is (expected ));
806
806
}
807
807
808
+ @ Test
809
+ public void negatedBooleansTripleConjunctionExpression () {
810
+ Expression <Object > expected = And (
811
+ And (
812
+ Negate (Property ("foo" )),
813
+ Negate (Property ("bar" ))
814
+ ),
815
+ Negate (Property ("buzz" ))
816
+ );
817
+ Expression <Object > actual = compile ("!foo && !bar && !buzz" );
818
+ assertThat (actual , is (expected ));
819
+ }
820
+
821
+ @ Test
822
+ public void negatedBooleansTripleDisjunctionExpression () {
823
+ Expression <Object > expected = Or (
824
+ Or (
825
+ Negate (Property ("foo" )),
826
+ Negate (Property ("bar" ))
827
+ ),
828
+ Negate (Property ("buzz" ))
829
+ );
830
+ Expression <Object > actual = compile ("!foo || !bar || !buzz" );
831
+ assertThat (actual , is (expected ));
832
+ }
833
+
808
834
@ Test
809
835
public void negatedSelectionExpression () {
810
836
Expression <Object > expected = Sequence (
You can’t perform that action at this time.
0 commit comments