You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Note: the parser uses levels for a hierarchy to define precedence and avoid left recursion
135
135
* Build the parsed expression: `.map { NullishCoalescing(value, _) }`
136
-
* Add the new parser to the suitable level
137
-
* Add the new operator in [FeelInterpreter.scala](src/main/scala/org/camunda/feel/impl/interpreter/FeelInterpreter.scala)
138
-
* ???
139
-
* Verify the behavior by writing test cases in ???
140
-
136
+
* Add the new parser to the suitable level `| nullishCoalesching(value)`
137
+
* Handle the new operator in [FeelInterpreter.scala](src/main/scala/org/camunda/feel/impl/interpreter/FeelInterpreter.scala)
138
+
* Add a case in `def eval(expression: Exp)` with: `case NullishCoalescing(value, alternative) => ???`
139
+
* Implement the behavior and return `eval(value)` or `eval(alternative)`
140
+
* Verify the behavior by writing test cases in [InterpreterBooleanExpressionTest.scala](src/test/scala/org/camunda/feel/impl/interpreter/InterpreterBooleanExpressionTest.scala)
141
+
* Add a new test case following the pattern: `"A nullish coalescing operator" should "return the value if the given value is not null" in { ??? }`
142
+
* Add more test cases for other results, or covering edge cases
143
+
* Group all test cases for a method using `it should "return the alternative if the given value is null" in { ??? }`
144
+
* Run all tests to verify the behavior
145
+
* Run the Maven build to format the code
146
+
* Open a pull request and link to the FEEL issue
147
+
* Then, add the new operator to the documentation in the [Camunda docs](https://docs.camunda.io/docs/next/components/modeler/feel/language-guide/feel-boolean-expressions/)
0 commit comments