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

Method AppendList

testutil/expr_printer.cc:126–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 void AppendList(const ListExpr& list) {
127 if (list.elements().empty()) {
128 Append("[]");
129 return;
130 }
131 Append("[");
132 AppendLine();
133 Indent();
134 for (int i = 0; i < list.elements().size(); ++i) {
135 const auto& elem = list.elements()[i];
136 if (i > 0) {
137 Append(",");
138 AppendLine();
139 }
140 if (elem.optional()) {
141 Append("?");
142 }
143 AppendExpr(elem.expr());
144 }
145 AppendLine();
146 Unindent();
147 Append("]");
148 }
149
150 void AppendStruct(const StructExpr& obj) {
151 Append(obj.name());

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
sizeMethod · 0.45
optionalMethod · 0.45
exprMethod · 0.45

Tested by

no test coverage detected