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

Function CheckInvalidArgs

extensions/math_ext_macros.cc:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64absl::optional<Expr> CheckInvalidArgs(MacroExprFactory &factory,
65 absl::string_view macro,
66 absl::Span<const Expr> arguments) {
67 for (const auto &argument : arguments) {
68 if (!IsValidArgType(argument)) {
69 return factory.ReportErrorAt(
70 argument,
71 absl::StrCat(macro, " simple literal arguments must be numeric"));
72 }
73 }
74
75 return absl::nullopt;
76}
77
78bool IsListLiteralWithValidArgs(const Expr &arg) {
79 if (const auto *list_expr = arg.has_list_expr() ? &arg.list_expr() : nullptr;

Callers 1

math_macrosFunction · 0.85

Calls 2

IsValidArgTypeFunction · 0.85
ReportErrorAtMethod · 0.45

Tested by

no test coverage detected