| 228 | } |
| 229 | |
| 230 | absl::StatusOr<std::unique_ptr<Program>> MakeProgram(absl::string_view expr) { |
| 231 | CEL_ASSIGN_OR_RETURN(auto result, compiler_->Compile(expr)); |
| 232 | if (!result.IsValid()) { |
| 233 | return absl::InvalidArgumentError(result.FormatError()); |
| 234 | } |
| 235 | CEL_ASSIGN_OR_RETURN(auto ast, result.ReleaseAst()); |
| 236 | return runtime_->CreateProgram(std::move(ast)); |
| 237 | } |
| 238 | |
| 239 | private: |
| 240 | BenchmarkState(std::unique_ptr<Compiler> c, std::unique_ptr<const Runtime> r) |
no test coverage detected