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

Function celBlock

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

Source from the content-addressed store, hash-verified

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