| 167 | } // namespace |
| 168 | |
| 169 | absl::StatusOr<std::unique_ptr<CompilerBuilder>> NewCompilerBuilder( |
| 170 | std::shared_ptr<const google::protobuf::DescriptorPool> descriptor_pool, |
| 171 | CompilerOptions options) { |
| 172 | if (descriptor_pool == nullptr) { |
| 173 | return absl::InvalidArgumentError("descriptor_pool must not be null"); |
| 174 | } |
| 175 | CEL_ASSIGN_OR_RETURN(auto type_checker_builder, |
| 176 | CreateTypeCheckerBuilder(std::move(descriptor_pool), |
| 177 | options.checker_options)); |
| 178 | auto parser_builder = NewParserBuilder(options.parser_options); |
| 179 | |
| 180 | return std::make_unique<CompilerBuilderImpl>(std::move(type_checker_builder), |
| 181 | std::move(parser_builder)); |
| 182 | } |
| 183 | |
| 184 | } // namespace cel |
nothing calls this directly
no test coverage detected