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

Method Exec

interpreter/interpretable.go:489–505  ·  view source on GitHub ↗

Exec implements the InterpretableV2 interface method.

(frame *ExecutionFrame)

Source from the content-addressed store, hash-verified

487
488// Exec implements the InterpretableV2 interface method.
489func (ne *evalNe) Exec(frame *ExecutionFrame) ref.Val {
490 lVal := ne.lhs.Exec(frame)
491 if types.IsError(lVal) {
492 return lVal
493 }
494 rVal := ne.rhs.Exec(frame)
495 if types.IsError(rVal) {
496 return rVal
497 }
498 var unk *types.Unknown
499 unk, _ = types.MaybeMergeUnknowns(lVal, unk)
500 unk, _ = types.MaybeMergeUnknowns(rVal, unk)
501 if unk != nil {
502 return unk
503 }
504 return types.Bool(types.Equal(lVal, rVal) != types.True)
505}
506
507// Eval implements the Interpretable interface method.
508func (ne *evalNe) Eval(ctx Activation) ref.Val {

Callers 1

EvalMethod · 0.95

Calls 5

IsErrorFunction · 0.92
MaybeMergeUnknownsFunction · 0.92
BoolTypeAlias · 0.92
EqualFunction · 0.92
ExecMethod · 0.65

Tested by

no test coverage detected