ppl: bubble up values, bug fixes (#2213)

This commit is contained in:
Caleb Doxsey 2021-05-18 14:01:36 -06:00 committed by GitHub
parent e138054cb9
commit bdccd4f785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 218 additions and 118 deletions

View file

@ -141,6 +141,9 @@ func (o Object) Clone() Value {
func (o Object) RegoValue() ast.Value {
kvps := make([][2]*ast.Term, 0, len(o))
for k, v := range o {
if v == nil {
v = Null{}
}
kvps = append(kvps, [2]*ast.Term{
ast.StringTerm(k),
ast.NewTerm(v.RegoValue()),