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

Function findFrame

interpreter/interpretable.go:224–239  ·  view source on GitHub ↗

findFrame walks the activation hierarchy via Unwrap and Parent to locate an existing ExecutionFrame, if one exists.

(a Activation)

Source from the content-addressed store, hash-verified

222// findFrame walks the activation hierarchy via Unwrap and Parent to locate an
223// existing ExecutionFrame, if one exists.
224func findFrame(a Activation) *ExecutionFrame {
225 if wrapper, ok := a.(activationWrapper); ok {
226 unwrapped := wrapper.Unwrap()
227 if f, ok := unwrapped.(*ExecutionFrame); ok {
228 return f
229 }
230 return findFrame(unwrapped)
231 }
232 if p := a.Parent(); p != nil {
233 if f, ok := p.(*ExecutionFrame); ok {
234 return f
235 }
236 return findFrame(p)
237 }
238 return nil
239}
240
241// Core Interpretable implementations used during the program planning phase.
242

Callers

nothing calls this directly

Calls 2

UnwrapMethod · 0.65
ParentMethod · 0.65

Tested by

no test coverage detected