MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / AddMathExtensionDeclarations

Function AddMathExtensionDeclarations

extensions/math_ext_decls.cc:283–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283absl::Status AddMathExtensionDeclarations(TypeCheckerBuilder& builder,
284 int version) {
285 CEL_RETURN_IF_ERROR(AddMinMaxDecls(builder));
286 if (version == 0) {
287 return absl::OkStatus();
288 }
289
290 CEL_RETURN_IF_ERROR(AddSignednessDecls(builder));
291 CEL_RETURN_IF_ERROR(AddFloatingPointDecls(builder));
292 CEL_RETURN_IF_ERROR(AddBitwiseDecls(builder));
293 if (version == 1) {
294 return absl::OkStatus();
295 }
296 CEL_RETURN_IF_ERROR(AddSqrtDecls(builder));
297
298 return absl::OkStatus();
299}
300
301absl::Status AddMathExtensionMacros(ParserBuilder& builder, int version) {
302 for (const auto& m : math_macros()) {

Callers 2

MathCompilerLibraryFunction · 0.85
MathCheckerLibraryFunction · 0.85

Calls 5

AddMinMaxDeclsFunction · 0.85
AddSignednessDeclsFunction · 0.85
AddFloatingPointDeclsFunction · 0.85
AddBitwiseDeclsFunction · 0.85
AddSqrtDeclsFunction · 0.85

Tested by

no test coverage detected