| 315 | } |
| 316 | |
| 317 | std::string ExprPrinter::PrintProto(const cel::expr::Expr& expr) const { |
| 318 | StringBuilder w(adorner_); |
| 319 | absl::StatusOr<std::unique_ptr<Ast>> ast = CreateAstFromParsedExpr(expr); |
| 320 | if (!ast.ok()) { |
| 321 | return std::string(ast.status().message()); |
| 322 | } |
| 323 | return w.Print(ast.value()->root_expr()); |
| 324 | } |
| 325 | |
| 326 | std::string ExprPrinter::Print(const Expr& expr) const { |
| 327 | StringBuilder w(adorner_); |