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

Method VisitCreateList

tools/cel_unparser.cc:293–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293absl::Status Unparser::VisitCreateList(const Expr::CreateList& expr) {
294 Print(kLeftBracket);
295 for (int i = 0; i < expr.elements_size(); i++) {
296 if (i > 0) {
297 Print(kComma, kSpace);
298 }
299 if (std::find(expr.optional_indices().begin(),
300 expr.optional_indices().end(),
301 static_cast<int32_t>(i)) != expr.optional_indices().end()) {
302 Print(kQuestionMark);
303 }
304 CEL_RETURN_IF_ERROR(Visit(expr.elements(i)));
305 }
306 Print(kRightBracket);
307 return absl::OkStatus();
308}
309
310absl::Status Unparser::VisitCreateStruct(const Expr::CreateStruct& expr) {
311 if (!expr.message_name().empty()) {

Callers

nothing calls this directly

Calls 3

VisitFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected