MCPcopy Create free account
hub / github.com/cel-expr/cel-go / EnableVariadicOperatorASTs

Function EnableVariadicOperatorASTs

parser/options.go:173–178  ·  view source on GitHub ↗

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.

(varArgASTs bool)

Source from the content-addressed store, hash-verified

171// The benefit of enabling variadic operators ASTs is a more compact representation deeply nested
172// logic graphs.
173func EnableVariadicOperatorASTs(varArgASTs bool) Option {
174 return func(opts *options) error {
175 opts.enableVariadicOperatorASTs = varArgASTs
176 return nil
177 }
178}
179
180// EnablePrattParser enables the Pratt parser implementation instead of the ANTLR parser.
181func EnablePrattParser(enablePrattParser bool) Option {

Callers 4

programFunction · 0.92
TestCheckFunction · 0.92
BenchmarkCheckFunction · 0.92
configureMethod · 0.92

Calls

no outgoing calls

Tested by 3

programFunction · 0.74
TestCheckFunction · 0.74
BenchmarkCheckFunction · 0.74