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

Function NewInlineVariableWithAlias

cel/inlining.go:62–64  ·  view source on GitHub ↗

NewInlineVariableWithAlias declares a variable name to be replaced by a checked expression. If the variable occurs more than once, the provided alias will be used to replace the expressions where the variable name occurs.

(name, alias string, definition *Ast)

Source from the content-addressed store, hash-verified

60// If the variable occurs more than once, the provided alias will be used to replace the expressions
61// where the variable name occurs.
62func NewInlineVariableWithAlias(name, alias string, definition *Ast) *InlineVariable {
63 return &InlineVariable{name: name, alias: alias, def: definition.NativeRep()}
64}
65
66// NewInliningOptimizer creates and optimizer which replaces variables with expression definitions.
67//

Calls 1

NativeRepMethod · 0.80