| 111 | } |
| 112 | |
| 113 | absl::optional<cel::Expr> CelBlockMacroExpander(cel::MacroExprFactory& factory, |
| 114 | cel::Expr& target, |
| 115 | absl::Span<cel::Expr> args) { |
| 116 | if (!IsCelNamespace(target)) { |
| 117 | return absl::nullopt; |
| 118 | } |
| 119 | cel::Expr& bindings_arg = args[0]; |
| 120 | if (!bindings_arg.has_list_expr()) { |
| 121 | return factory.ReportErrorAt( |
| 122 | bindings_arg, "cel.block requires the first arg to be a list literal"); |
| 123 | } |
| 124 | return factory.NewCall("cel.@block", args); |
| 125 | } |
| 126 | |
| 127 | absl::optional<cel::Expr> CelIndexMacroExpander(cel::MacroExprFactory& factory, |
| 128 | cel::Expr& target, |
nothing calls this directly
no test coverage detected