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

Function RegisterSetsDecls

extensions/sets_functions.cc:129–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129absl::Status RegisterSetsDecls(TypeCheckerBuilder& b) {
130 ListType list_t(b.arena(), TypeParamType("T"));
131 CEL_ASSIGN_OR_RETURN(
132 auto decl,
133 MakeFunctionDecl("sets.contains",
134 MakeOverloadDecl("list_sets_contains_list", BoolType(),
135 list_t, list_t)));
136 CEL_RETURN_IF_ERROR(b.AddFunction(decl));
137
138 CEL_ASSIGN_OR_RETURN(
139 decl, MakeFunctionDecl("sets.equivalent",
140 MakeOverloadDecl("list_sets_equivalent_list",
141 BoolType(), list_t, list_t)));
142 CEL_RETURN_IF_ERROR(b.AddFunction(decl));
143
144 CEL_ASSIGN_OR_RETURN(
145 decl, MakeFunctionDecl("sets.intersects",
146 MakeOverloadDecl("list_sets_intersects_list",
147 BoolType(), list_t, list_t)));
148 return b.AddFunction(decl);
149}
150
151} // namespace
152

Callers

nothing calls this directly

Calls 7

MakeOverloadDeclFunction · 0.85
MakeFunctionDeclFunction · 0.85
TypeParamTypeClass · 0.50
BoolTypeClass · 0.50
CEL_ASSIGN_OR_RETURNFunction · 0.50
arenaMethod · 0.45
AddFunctionMethod · 0.45

Tested by

no test coverage detected