Implement comparison operators. Formalize semantics.

Rename compare.rs to comparison.rs to match OPA documentation of builtins.

Also update loop handling to ensure that the current scope is restored after
each iteration of the loop so as to undo side effects of the iteration.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-02-12 17:09:23 -08:00
parent fd5140a5a8
commit 53030c4ada
6 changed files with 641 additions and 254 deletions
+1 -1
View File
@@ -87,8 +87,8 @@ pub enum Value {
// Json data types. serde will automatically map json to these variants.
Null,
Bool(bool),
String(String),
Number(Number),
String(String),
Array(Rc<Vec<Value>>),
Object(Rc<BTreeMap<Value, Value>>),