Bump cel-go to v0.17.6
This commit is contained in:
13
vendor/github.com/google/cel-go/parser/options.go
generated
vendored
13
vendor/github.com/google/cel-go/parser/options.go
generated
vendored
@@ -25,6 +25,7 @@ type options struct {
|
||||
macros map[string]Macro
|
||||
populateMacroCalls bool
|
||||
enableOptionalSyntax bool
|
||||
enableVariadicOperatorASTs bool
|
||||
}
|
||||
|
||||
// Option configures the behavior of the parser.
|
||||
@@ -125,3 +126,15 @@ func EnableOptionalSyntax(optionalSyntax bool) Option {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// EnableVariadicOperatorASTs enables a compact representation of chained like-kind commutative
|
||||
// operators. e.g. `a || b || c || d` -> `call(op='||', args=[a, b, c, d])`
|
||||
//
|
||||
// The benefit of enabling variadic operators ASTs is a more compact representation deeply nested
|
||||
// logic graphs.
|
||||
func EnableVariadicOperatorASTs(varArgASTs bool) Option {
|
||||
return func(opts *options) error {
|
||||
opts.enableVariadicOperatorASTs = varArgASTs
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user