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

Method VisitSelect

tools/cel_unparser.cc:221–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221absl::Status Unparser::VisitSelect(const Expr::Select& expr) {
222 if (expr.test_only()) {
223 Print(CelOperator::HAS, kLeftParen);
224 }
225 const auto& operand = expr.operand();
226 bool nested = !expr.test_only() && IsBinaryOrTernaryOperator(operand);
227 CEL_RETURN_IF_ERROR(VisitMaybeNested(operand, nested));
228 Print(kDot, FormatField(expr.field()));
229 if (expr.test_only()) {
230 Print(kRightParen);
231 }
232 return absl::OkStatus();
233}
234
235absl::Status Unparser::VisitOptSelect(const Expr::Call& expr) {
236 if (expr.args_size() != 2 || !expr.args()[1].has_const_expr() ||

Callers

nothing calls this directly

Calls 3

FormatFieldFunction · 0.85
test_onlyMethod · 0.80
fieldMethod · 0.45

Tested by

no test coverage detected