mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
feat: or keyword (#315)
Add `or` operator to Rego languages. Available via `rego-extensions` Cargo feature. If the evaluated lhs value is not false, null or undefined it is returned. Otherwise rhs is evaluated and returned. or operator has least precedence, and is left-associative. closes #314
This commit is contained in:
committed by
GitHub
parent
8498274356
commit
7565ec3ecf
@@ -61,9 +61,9 @@ in-expr ::= in-expr 'in' bool-expr
|
||||
bool-expr ::= bool-expr bool-op or-expr
|
||||
| or-expr
|
||||
bool-op ::= '<' | '<=' | '==' | '>=' | '>' | '!='
|
||||
or-expr ::= or-expr '|' and-expr
|
||||
| and-expr
|
||||
and-expr ::= and-expr '&' arith-expr
|
||||
set-union-expr ::= set-union-expr '|' set-intersection-expr
|
||||
| set-intersection-expr
|
||||
set-intersection-expr ::= set-intersection-expr '&' arith-expr
|
||||
| arith-expr
|
||||
arith-expr ::= arith-expr ('+' | '-') mul-div-expr
|
||||
| mul-div-expr
|
||||
|
||||
Reference in New Issue
Block a user