Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[incubator-kie-drools-5874] [new-parser] Adapt drlIdentifier to opera… #5951

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ void superSuffix() {
assertThat(exprConstraintDescr.getExpression()).isEqualTo("address.super.contains() == 10");
}

@Disabled("To be done by https://github.com/apache/incubator-kie-drools/issues/5874")
@Test
void operator_key() {
final String text =
Expand All @@ -292,7 +291,6 @@ void operator_key() {
assertThat(exprConstraintDescr.getExpression()).isEqualTo("age provides 10");
}

@Disabled("To be done by https://github.com/apache/incubator-kie-drools/issues/5874")
@Test
void neg_operator_key() {
final String text =
Expand All @@ -310,8 +308,6 @@ void neg_operator_key() {

@Test
void operator_key_temporal() {
// This test (and MiscDRLParserTest.parse_PluggableOperators) fails when adapting drlIdentifier to operator_key and neg_operator_key in DRL6Expressions.g4
// See https://github.com/apache/incubator-kie-drools/issues/5874
final String text =
"rule X\n" +
"when\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,12 +927,10 @@ in_key
;

operator_key
// IDENTIFIER is required to accept custom operators. We need to keep this semantic predicate for custom operators
: {(helper.isPluggableEvaluator(false))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); }
| op=builtInOperator { helper.emit($op.token, DroolsEditorType.KEYWORD); }
// drlIdentifier is required to accept custom operators. We need to keep this semantic predicate for custom operators
: {(helper.isPluggableEvaluator(false))}? id=drlIdentifier { helper.emit($id.token, DroolsEditorType.KEYWORD); }
;

neg_operator_key
: {(helper.isPluggableEvaluator(true))}? id=IDENTIFIER { helper.emit($id, DroolsEditorType.KEYWORD); }
| op=builtInOperator { helper.emit($op.token, DroolsEditorType.KEYWORD); }
: {(helper.isPluggableEvaluator(true))}? id=drlIdentifier { helper.emit($id.token, DroolsEditorType.KEYWORD); }
;
Loading