Anand Krishnamoorthi
8003cfc5b7
fix: Handle parsing corner cases ( #309 )
...
A block with a single or expression needs to be treated as a comprehension instead of a
set/array with 1 item. e.g.: {1 | 1 }, [2 | foo]
Allow successfully parsing object comprehensions as rule body
x if { 1:2 | 1 }
fixes #306 , fixes #307
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
2024-09-04 10:02:14 -07:00
Anand Krishnamoorthi
800e594d52
Arity for builtins ( #28 )
...
Old-style function call
Utility for running opa yaml tests
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
2023-10-24 10:11:50 -07:00
Anand Krishnamoorthi
2436467fbd
Minimize PR 22 ( #26 )
...
* specific functions added to eval different rego components
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* allow multiple inputs and results
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* prepare_for_eval is necessary to be called
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* test with the suggested code examples and clean scopes
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* try to refactor first steps of evaluations
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* improve coverage and fix clean state internal evaluation
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* add getters and setters and fix clean function
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
* Tests are single input by default. Multi input specified via "many!" marker.
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
---------
Signed-off-by: eric-therond <eric.therond.fr@gmail.com >
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
Co-authored-by: eric-therond <eric.therond.fr@gmail.com >
2023-10-09 14:27:31 -07:00
Anand Krishnamoorthi
112623c762
tracing::trace builtin
...
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
2023-03-05 16:39:42 +05:30
Ming-Wei Shih
c0972ad2ba
Update license to MIT
...
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com >
2023-02-09 19:40:35 +00:00
Anand Krishnamoorthi
cb0b3a1790
Code from github.com/anakrish/rego-rs
...
Authored by anakrish and mingweishih
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com >
2023-02-09 10:56:54 -08:00