| 157 | } |
| 158 | |
| 159 | std::vector<FunctionRegistry::LazyOverload> FunctionRegistry::FindLazyOverloads( |
| 160 | absl::string_view name, bool receiver_style, |
| 161 | absl::Span<const cel::Kind> types) const { |
| 162 | std::vector<FunctionRegistry::LazyOverload> matched_funcs; |
| 163 | |
| 164 | auto overloads = functions_.find(name); |
| 165 | if (overloads == functions_.end()) { |
| 166 | return matched_funcs; |
| 167 | } |
| 168 | |
| 169 | for (const auto& entry : overloads->second.lazy_overloads) { |
| 170 | if (entry.descriptor->ShapeMatches(receiver_style, types)) { |
| 171 | matched_funcs.push_back({*entry.descriptor, *entry.function_provider}); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | return matched_funcs; |
| 176 | } |
| 177 | |
| 178 | std::vector<FunctionRegistry::LazyOverload> |
| 179 | FunctionRegistry::FindLazyOverloadsByArity(absl::string_view name, |