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

Struct StaticOptimizer

cel/optimizer.go:35–39  ·  view source on GitHub ↗

StaticOptimizer contains a sequence of ASTOptimizer instances which will be applied in order. The static optimizer normalizes expression ids and type-checking run between optimization passes to ensure that the final optimized output is a valid expression with metadata consistent with what would hav

Source from the content-addressed store, hash-verified

33// Note: source position information is best-effort and incomplete, but optimized expressions
34// should be suitable for calls to parser.Unparse.
35type StaticOptimizer struct {
36 optimizers []ASTOptimizer
37 // If set, Optimize() will use this Source instead of the one from the AST.
38 sourceOverride *Source
39}
40
41// OptimizerOption configures a StaticOptimizer instance.
42type OptimizerOption func(*StaticOptimizer) (*StaticOptimizer, error)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected