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

Function exprCall

common/ast/conversion.go:150–168  ·  view source on GitHub ↗
(factory ExprFactory, id int64, call *exprpb.Expr_Call)

Source from the content-addressed store, hash-verified

148}
149
150func exprCall(factory ExprFactory, id int64, call *exprpb.Expr_Call) (Expr, error) {
151 var err error
152 args := make([]Expr, len(call.GetArgs()))
153 for i, a := range call.GetArgs() {
154 args[i], err = exprInternal(factory, a)
155 if err != nil {
156 return nil, err
157 }
158 }
159 if call.GetTarget() == nil {
160 return factory.NewCall(id, call.GetFunction(), args...), nil
161 }
162
163 target, err := exprInternal(factory, call.GetTarget())
164 if err != nil {
165 return nil, err
166 }
167 return factory.NewMemberCall(id, call.GetFunction(), target, args...), nil
168}
169
170func exprComprehension(factory ExprFactory, id int64, comp *exprpb.Expr_Comprehension) (Expr, error) {
171 iterRange, err := exprInternal(factory, comp.GetIterRange())

Callers 1

exprInternalFunction · 0.85

Calls 4

exprInternalFunction · 0.85
GetArgsMethod · 0.65
NewCallMethod · 0.65
NewMemberCallMethod · 0.65

Tested by

no test coverage detected