Return a normalized raw expr for evaluation.
| 218 | |
| 219 | // Return a normalized raw expr for evaluation. |
| 220 | cel::expr::Expr ExtractExpr( |
| 221 | const conformance::v1alpha1::EvalRequest& request) { |
| 222 | const v1alpha1::Expr* expr = nullptr; |
| 223 | |
| 224 | // For now, discard type-check information if any. |
| 225 | if (request.has_parsed_expr()) { |
| 226 | expr = &request.parsed_expr().expr(); |
| 227 | } else if (request.has_checked_expr()) { |
| 228 | expr = &request.checked_expr().expr(); |
| 229 | } |
| 230 | cel::expr::Expr out; |
| 231 | if (expr != nullptr) { |
| 232 | ABSL_CHECK(ConvertWireCompatProto(*expr, &out)); // Crash OK |
| 233 | } |
| 234 | return out; |
| 235 | } |
| 236 | |
| 237 | absl::Status LegacyParse(const conformance::v1alpha1::ParseRequest& request, |
| 238 | conformance::v1alpha1::ParseResponse& response, |
no test coverage detected