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

Function FindFunctionActivation

interpreter/activation.go:344–346  ·  view source on GitHub ↗

FindFunctionActivation returns the activation which supplies the late-bound function implementations for a hierarchy, or nil when the hierarchy supplies none. Late-bound functions are bound for the duration of an evaluation rather than for a lexical scope, so a hierarchy may contain at most one act

(vars Activation)

Source from the content-addressed store, hash-verified

342// caller-supplied activations. Scopes introduced during evaluation, such as those of a
343// comprehension, report the enclosing frame as their parent rather than the enclosing activation.
344func FindFunctionActivation(vars Activation) (FunctionActivation, error) {
345 return findFunctionActivation(vars, nil)
346}
347
348// findFunctionActivation searches a hierarchy for the activation which supplies late-bound
349// functions, carrying the match found so far so that a second match can be reported as an error.

Callers 6

GlobalsFunction · 0.92
SetDefaultVarsMethod · 0.85
NewExecutionFrameFunction · 0.85
resolveFunctionFunction · 0.85

Calls 1

findFunctionActivationFunction · 0.85

Tested by 2

resolveFunctionFunction · 0.68