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

Function IsListLiteralWithValidArgs

extensions/math_ext_macros.cc:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78bool IsListLiteralWithValidArgs(const Expr &arg) {
79 if (const auto *list_expr = arg.has_list_expr() ? &arg.list_expr() : nullptr;
80 list_expr) {
81 if (list_expr->elements().empty()) {
82 return false;
83 }
84 for (const auto &element : list_expr->elements()) {
85 if (!IsValidArgType(element.expr())) {
86 return false;
87 }
88 }
89 return true;
90 }
91 return false;
92}
93
94} // namespace
95

Callers 1

math_macrosFunction · 0.85

Calls 4

IsValidArgTypeFunction · 0.85
has_list_exprMethod · 0.80
emptyMethod · 0.45
exprMethod · 0.45

Tested by

no test coverage detected