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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ If you have an idea of how to improve the project, please create a [new issue](h
14
14
15
15
### Providing pull requests
16
16
17
-
Do you want to provide a bug fix or an inprovement? Great! :tada:
17
+
Do you want to provide a bug fix or an improvement? Great! :tada:
18
18
19
19
Before you start coding, make sure that there is a related issue. The issue helps to confirm that the behavior is unexpected, or the idea of the improvement is valid. (Following the rule "Talk, then code")
20
20
@@ -23,6 +23,8 @@ Before you open a pull request:
23
23
* Run all tests to verify you don't break anything
24
24
* Build the project with Maven to format the code
25
25
26
+
If you added a new feature, please add it to the [Camunda docs](https://docs.camunda.io/docs/next/components/modeler/feel/language-guide/feel-expressions-introduction/) by contributing its documentation to the [repository](https://github.com/camunda/camunda-docs).
27
+
26
28
## Building the project from source
27
29
28
30
You can build the project with [Maven](http://maven.apache.org).
@@ -75,11 +77,10 @@ If you're new and want to contribute to the project, check out the following ste
75
77
76
78
### Adding a new built-in function
77
79
78
-
The built-in functions are grouped by their main argument type, following the DMN specification.
79
-
80
80
Example: Add a new string function `reverse(value: string): string`
81
81
82
82
* Implement the function in [StringBuiltinFunctions.scala](src/main/scala/org/camunda/feel/impl/builtin/StringBuiltinFunctions.scala)
83
+
* Note: the built-in functions are grouped by their main argument type
83
84
* Add a new private method `reverseFunction` and use the method `builtinFunction()`
84
85
*`params` returns the argument list: `params = List("value")`
85
86
*`invoke` is called when the function is invoked
@@ -100,14 +101,30 @@ Example: Add a new string function `reverse(value: string): string`
100
101
* Add the function to the page, describe the behavior, and provide a few examples
101
102
* Open a pull request and link to the FEEL issue and your pull request
102
103
104
+
### Fix or extend the evaluation
105
+
106
+
Example: Zero-bases index list access `[1,2,3][0]` instead of `[1,2,3][1]`
107
+
108
+
* Adjust the list access in [FeelInterpreter.scala](src/main/scala/org/camunda/feel/impl/interpreter/FeelInterpreter.scala)
109
+
* Note: The entry point of the evaluation is `def eval(expression: Exp)`
110
+
* Note: The list access is parsed as `Filter(list, filter)`
111
+
* Note: Inspect the call hierachie starting from `def eval(expression: Exp)` and looking for `case Filter(list, filter) =>`
112
+
* Change the access behavior in `private def filterList(list: List[Val], index: Number)`
113
+
* Adjust the relevant test cases in [InterpreterListExpressionTest.scala](src/test/scala/org/camunda/feel/impl/interpreter/InterpreterListExpressionTest.scala)
114
+
* Note: The test cases are grouped by value type
115
+
* Run all tests to verify that other cases are not broken
116
+
* Run the Maven build to format the code
117
+
* Open a pull request and link to the FEEL issue
118
+
* Then, adjust the documentation in the [Camunda docs](https://docs.camunda.io/docs/components/modeler/feel/language-guide/feel-list-expressions/#get-element)
119
+
103
120
### Fix or extend the parsing
104
121
105
122
Modifying the FEEL parser is more complex and requires some knowledge about the parsing library. Here are some useful resources:
0 commit comments