microsoft / regorus

Regorus - A fast, lightweight Rego (OPA policy language) interpreter written in Rust.
MIT License
152 stars 34 forks source link

fix: Handle parsing corner cases #309

Closed anakrish closed 2 months ago

anakrish commented 2 months ago

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