(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr)
| 360 | } |
| 361 | |
| 362 | func 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 | |
| 373 | func celIndex(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { |
| 374 | if !isCELNamespace(target) { |
nothing calls this directly
no test coverage detected