| 462 | } // namespace |
| 463 | |
| 464 | absl::StatusOr<std::unique_ptr<Ast>> CreateAstFromParsedExpr( |
| 465 | const cel::expr::Expr& expr, |
| 466 | const cel::expr::SourceInfo* source_info) { |
| 467 | CEL_ASSIGN_OR_RETURN(auto runtime_expr, ExprValueFromProto(expr)); |
| 468 | SourceInfo runtime_source_info; |
| 469 | if (source_info != nullptr) { |
| 470 | CEL_ASSIGN_OR_RETURN(runtime_source_info, |
| 471 | ConvertProtoSourceInfoToNative(*source_info)); |
| 472 | } |
| 473 | return std::make_unique<Ast>(std::move(runtime_expr), |
| 474 | std::move(runtime_source_info)); |
| 475 | } |
| 476 | |
| 477 | absl::StatusOr<std::unique_ptr<Ast>> CreateAstFromParsedExpr( |
| 478 | const ParsedExprPb& parsed_expr) { |