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

Function ListValueToExpr

common/internal/value_conversion.cc:174–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174absl::StatusOr<ExprListValue> ListValueToExpr(
175 const ListValue& list_value,
176 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
177 google::protobuf::MessageFactory* absl_nonnull message_factory,
178 google::protobuf::Arena* absl_nonnull arena) {
179 ExprListValue result;
180
181 CEL_ASSIGN_OR_RETURN(auto iter, list_value.NewIterator());
182
183 while (iter->HasNext()) {
184 CEL_ASSIGN_OR_RETURN(auto elem,
185 iter->Next(descriptor_pool, message_factory, arena));
186 CEL_ASSIGN_OR_RETURN(
187 *result.add_values(),
188 ToExprValue(elem, descriptor_pool, message_factory, arena));
189 }
190
191 return result;
192}
193
194absl::StatusOr<google::protobuf::Any> ToProtobufAny(
195 const StructValue& struct_value,

Callers 1

ToExprValueFunction · 0.85

Calls 3

ToExprValueFunction · 0.85
CEL_ASSIGN_OR_RETURNFunction · 0.50
HasNextMethod · 0.45

Tested by

no test coverage detected