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

Function celBlock

conformance/conformance_test.go:361–370  ·  view source on GitHub ↗
(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr)

Source from the content-addressed store, hash-verified

359}
360
361func celBlock(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) {
362 if !isCELNamespace(target) {
363 return nil, nil
364 }
365 bindings := args[0]
366 if bindings.Kind() != ast.ListKind {
367 return bindings, mef.NewError(bindings.ID(), "cel.block requires the first arg to be a list literal")
368 }
369 return mef.NewCall("cel.@block", args...), nil
370}
371
372func celIndex(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) {
373 if !isCELNamespace(target) {

Callers

nothing calls this directly

Calls 5

isCELNamespaceFunction · 0.85
KindMethod · 0.65
NewErrorMethod · 0.65
IDMethod · 0.65
NewCallMethod · 0.65

Tested by

no test coverage detected