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

Method Exec

interpreter/interpretable.go:1864–1878  ·  view source on GitHub ↗

Exec implements the InterpretableV2 interface method.

(frame *ExecutionFrame)

Source from the content-addressed store, hash-verified

1862
1863// Exec implements the InterpretableV2 interface method.
1864func (a *evalAttr) Exec(frame *ExecutionFrame) ref.Val {
1865 v, err := a.attr.Resolve(frame)
1866 var res ref.Val
1867 if err != nil {
1868 res = types.LabelErrNode(a.ID(), types.WrapErr(err))
1869 } else {
1870 res = a.adapter.NativeToValue(v)
1871 }
1872 if _, isCond := a.attr.(*conditionalAttribute); !isCond {
1873 if costs := frame.CostTracker(); costs != nil {
1874 costs.EvalAttribute(a.ID(), false, res)
1875 }
1876 }
1877 return res
1878}
1879
1880// Eval implements the Interpretable interface method.
1881func (a *evalAttr) Eval(ctx Activation) ref.Val {

Callers

nothing calls this directly

Calls 7

IDMethod · 0.95
LabelErrNodeFunction · 0.92
WrapErrFunction · 0.92
CostTrackerMethod · 0.80
EvalAttributeMethod · 0.80
ResolveMethod · 0.65
NativeToValueMethod · 0.65

Tested by

no test coverage detected