Commit Graph

275 Commits

Author SHA1 Message Date
Anand Krishnamoorthi
267b76e4d3 Allow comprehensions in default value. (#2)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30
Anand Krishnamoorthi
12c3d26476 Lock down numbers
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30
Anand Krishnamoorthi
a8a1d4b820 mod function
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30
Anand Krishnamoorthi
b30fc2599c Builtin functions for numbers (WIP)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30
Ming-Wei Shih
24911e6807 Merge pull request #7 from anakrish/main
Implement comparison operators. Formalize semantics.
2023-02-13 13:23:00 -08:00
Anand Krishnamoorthi
53030c4ada 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>
2023-02-12 22:19:16 -08:00
Ming-Wei Shih
fd5140a5a8 Rework assign operations (#6)
Support "var = value", "value = var", and "var = var"
Fall back the '=' to comparsion when both operators are defined
Correctly support variable shadowing with "var := value"

Also, remove the unused Variable struct

Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-11 06:37:04 +05:30
Ming-Wei Shih
1001afbb28 Merge pull request #5 from anakrish/main
Locked down supported values in default rule.
2023-02-10 08:32:18 -08:00
Anand Krishnamoorthi
3a3bbcdb7d Locked down supported values in default rule.
Only scalars, composites and comprehensions containing scalars are supported.
This will be changed as OPA fixes bug with default values

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-10 06:13:42 -08:00
Anand Krishnamoorthi
c92707433e Improvements to github workflow (#4)
- format check
- clippy checks
- build tests separately before running

Also fix clippy warnings

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-10 11:16:09 +05:30
Anand Krishnamoorthi
dc0720b32a Merge pull request #3 from anakrish/main
Update name to regorus
2023-02-10 10:08:33 +05:30
Anand Krishnamoorthi
980a5d4772 Update name to regorus
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 20:33:39 -08:00
Ming-Wei Shih
4c3df24a09 Update rust.yml 2023-02-09 14:41:00 -08:00
Ming-Wei Shih
db0a4607a9 Add simple git action 2023-02-09 14:37:22 -08:00
Ming-Wei Shih
67ae4066d5 Merge pull request #2 from mingweishih/update_license
Update license
2023-02-09 11:42:20 -08:00
Ming-Wei Shih
b2aca43e64 Add missing config.toml
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:47 +00:00
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
Ming-Wei Shih
8218053c24 Merge pull request #1 from anakrish/main
Code from github.com/anakrish/rego-rs
2023-02-09 11:11:05 -08: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
Microsoft Open Source
8f67aeecb0 SUPPORT.md committed 2023-02-09 10:46:51 -08:00
Microsoft Open Source
3eb0fe3897 SECURITY.md committed 2023-02-09 10:46:50 -08:00
Microsoft Open Source
746f815a89 README.md committed 2023-02-09 10:46:49 -08:00
Microsoft Open Source
bab1c5f60a LICENSE committed 2023-02-09 10:46:48 -08:00
Microsoft Open Source
73f9005860 CODE_OF_CONDUCT.md committed 2023-02-09 10:46:48 -08:00
microsoft-github-operations[bot]
d49a85c3cd Initial commit 2023-02-09 18:46:42 +00:00