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

Function AddEqualityOps

checker/standard_library.cc:381–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381absl::Status AddEqualityOps(TypeCheckerBuilder& builder) {
382 FunctionDecl equals_op;
383 equals_op.set_name(StandardFunctions::kEqual);
384 CEL_RETURN_IF_ERROR(equals_op.AddOverload(MakeOverloadDecl(
385 StandardOverloadIds::kEquals, BoolType(), TypeParamA(), TypeParamA())));
386 CEL_RETURN_IF_ERROR(builder.AddFunction(std::move(equals_op)));
387
388 FunctionDecl not_equals_op;
389 not_equals_op.set_name(StandardFunctions::kInequal);
390 CEL_RETURN_IF_ERROR(not_equals_op.AddOverload(
391 MakeOverloadDecl(StandardOverloadIds::kNotEquals, BoolType(),
392 TypeParamA(), TypeParamA())));
393 CEL_RETURN_IF_ERROR(builder.AddFunction(std::move(not_equals_op)));
394
395 return absl::OkStatus();
396}
397
398absl::Status AddContainerOps(TypeCheckerBuilder& builder) {
399 FunctionDecl index;

Callers 1

AddStandardLibraryDeclsFunction · 0.85

Calls 6

MakeOverloadDeclFunction · 0.85
AddOverloadMethod · 0.80
TypeParamAFunction · 0.70
BoolTypeClass · 0.50
set_nameMethod · 0.45
AddFunctionMethod · 0.45

Tested by

no test coverage detected