expr
expr copied to clipboard
Expression language and expression evaluation for Go
Add an ability to calculate on compile step estimated cost of expression evaluation. We can add a tag for fields: ``` type Env struct { List []string `expr:"list",size:"100"` } ``
The built in `filter` function takes an array of type `T` and returns a reduced array of type `T`, but the checker currently loses this type information; if the input...
allow the last argument append with comma in func expr. make below expr can be parsed ok. ```expr func1( argument1, argument2, argument3, ) ```
Add `hasParen` field for ast.Ndoe, which indicated add parenthesis when invoking `String()`. I've always thought that you should keep the parenthetical information of the node if the user input it.
fixes: https://github.com/expr-lang/expr/issues/597
I see the point! But implementing it as function not the best solution. As it will require to evaluate all conditions and cases before choosing a correct one. We need...
This PR is raised to add support for optional string and array access. [#540](https://github.com/expr-lang/expr/issues/540 ) [#547](https://github.com/expr-lang/expr/issues/547) [#573](https://github.com/expr-lang/expr/issues/573)
Right now, in order to use `??` user have to use `?.` instead of `.` in nested structures. ```js events[0]?.labels?.value ?? 'defaul' ``` My idea is to make left hand...
Right now, only array & slices are supported. And we have builtins `values()` & `keys()`, `toPairs()` & `fromPairs()`. But they are difficult to work with. Allow to use map values...
``` ❯ concat(1..2, 3..4) [1 2 3 4] ❯ opcodes 0 OpPush 1 1 OpPush 2 2 OpRange 3 OpPush 3 4 OpPush 4 5 OpRange 6 OpPush 0x10031fca0 7...