| 186 | } |
| 187 | |
| 188 | absl::Status RegisterRegexDecls(TypeCheckerBuilder& builder) { |
| 189 | CEL_ASSIGN_OR_RETURN( |
| 190 | FunctionDecl regex_extract_decl, |
| 191 | MakeFunctionDecl( |
| 192 | std::string(kRegexExtract), |
| 193 | MakeOverloadDecl("re_extract_string_string_string", StringType(), |
| 194 | StringType(), StringType(), StringType()))); |
| 195 | CEL_RETURN_IF_ERROR(builder.AddFunction(regex_extract_decl)); |
| 196 | |
| 197 | CEL_ASSIGN_OR_RETURN( |
| 198 | FunctionDecl regex_capture_decl, |
| 199 | MakeFunctionDecl( |
| 200 | std::string(kRegexCapture), |
| 201 | MakeOverloadDecl("re_capture_string_string", StringType(), |
| 202 | StringType(), StringType()))); |
| 203 | CEL_RETURN_IF_ERROR(builder.AddFunction(regex_capture_decl)); |
| 204 | |
| 205 | CEL_ASSIGN_OR_RETURN( |
| 206 | FunctionDecl regex_capture_n_decl, |
| 207 | MakeFunctionDecl( |
| 208 | std::string(kRegexCaptureN), |
| 209 | MakeOverloadDecl("re_captureN_string_string", CaptureNMapType(), |
| 210 | StringType(), StringType()))); |
| 211 | return builder.AddFunction(regex_capture_n_decl); |
| 212 | } |
| 213 | |
| 214 | } // namespace |
| 215 |
nothing calls this directly
no test coverage detected