| 50 | validator_(std::move(validator)) {} |
| 51 | |
| 52 | absl::StatusOr<ValidationResult> Compile( |
| 53 | absl::string_view expression, |
| 54 | absl::string_view description) const override { |
| 55 | CEL_ASSIGN_OR_RETURN(auto source, |
| 56 | cel::NewSource(expression, std::string(description))); |
| 57 | CEL_ASSIGN_OR_RETURN(auto ast, parser_->Parse(*source)); |
| 58 | CEL_ASSIGN_OR_RETURN(ValidationResult result, |
| 59 | type_checker_->Check(std::move(ast))); |
| 60 | |
| 61 | result.SetSource(std::move(source)); |
| 62 | if (!validator_.validations().empty()) { |
| 63 | validator_.UpdateValidationResult(result); |
| 64 | } |
| 65 | return result; |
| 66 | } |
| 67 | |
| 68 | std::unique_ptr<CompilerBuilder> ToBuilder() const override; |
| 69 |
nothing calls this directly
no test coverage detected