Skip to content

Commit

Permalink
lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Nov 14, 2024
1 parent 27d0dd1 commit 7cedcf0
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,16 @@ public QueryBuilder visitFieldQuery(KqlBaseParser.FieldQueryContext ctx) {

private static boolean isAndQuery(ParserRuleContext ctx) {
return switch (ctx) {
case KqlBaseParser.BooleanQueryContext booleanQueryContext -> booleanQueryContext.operator.getType() == KqlBaseParser.AND;
case KqlBaseParser.BooleanNestedQueryContext booleanNestedQueryContext -> booleanNestedQueryContext.operator
.getType() == KqlBaseParser.AND;
case KqlBaseParser.BooleanQueryContext booleanQueryCtx -> booleanQueryCtx.operator.getType() == KqlBaseParser.AND;
case KqlBaseParser.BooleanNestedQueryContext booleanNestedCtx -> booleanNestedCtx.operator.getType() == KqlBaseParser.AND;
default -> false;
};
}

private static boolean isOrQuery(ParserRuleContext ctx) {
return switch (ctx) {
case KqlBaseParser.BooleanQueryContext booleanQueryContext -> booleanQueryContext.operator.getType() == KqlBaseParser.OR;
case KqlBaseParser.BooleanNestedQueryContext booleanNestedQueryContext -> booleanNestedQueryContext.operator
.getType() == KqlBaseParser.OR;
case KqlBaseParser.BooleanQueryContext booleanQueryCtx -> booleanQueryCtx.operator.getType() == KqlBaseParser.OR;
case KqlBaseParser.BooleanNestedQueryContext booleanNestedCtx -> booleanNestedCtx.operator.getType() == KqlBaseParser.OR;
default -> false;
};
}
Expand Down

0 comments on commit 7cedcf0

Please sign in to comment.