| 136 | } |
| 137 | |
| 138 | std::vector<cel::FunctionOverloadReference> |
| 139 | FunctionRegistry::FindStaticOverloadsByArity(absl::string_view name, |
| 140 | bool receiver_style, |
| 141 | size_t arity) const { |
| 142 | std::vector<cel::FunctionOverloadReference> matched_funcs; |
| 143 | |
| 144 | auto overloads = functions_.find(name); |
| 145 | if (overloads == functions_.end()) { |
| 146 | return matched_funcs; |
| 147 | } |
| 148 | |
| 149 | for (const auto& overload : overloads->second.static_overloads) { |
| 150 | if (overload.descriptor->receiver_style() == receiver_style && |
| 151 | overload.descriptor->types().size() == arity) { |
| 152 | matched_funcs.push_back({*overload.descriptor, *overload.implementation}); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | return matched_funcs; |
| 157 | } |
| 158 | |
| 159 | std::vector<FunctionRegistry::LazyOverload> FunctionRegistry::FindLazyOverloads( |
| 160 | absl::string_view name, bool receiver_style, |
no test coverage detected