MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CheckAstExtensions

Function CheckAstExtensions

eval/compiler/flat_expr_builder.cc:2516–2530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2514}
2515
2516absl::Status CheckAstExtensions(
2517 const std::vector<cel::ExtensionSpec>& extensions) {
2518 for (const cel::ExtensionSpec& extension : extensions) {
2519 if (extension.id() == "cel_block" && extension.version().major() == 1) {
2520 // cel_block v1 is always supported.
2521 continue;
2522 }
2523
2524 // TODO(uncreated-issue/89): Add support for json field names.
2525 return absl::InvalidArgumentError(absl::StrCat(
2526 "unsupported CEL extension: ", extension.id(), "@",
2527 extension.version().major(), ".", extension.version().minor()));
2528 }
2529 return absl::OkStatus();
2530}
2531
2532} // namespace
2533

Callers 1

CreateExpressionImplMethod · 0.85

Calls 4

majorMethod · 0.80
versionMethod · 0.80
minorMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected