| 116 | } |
| 117 | |
| 118 | std::vector<cel::FunctionOverloadReference> |
| 119 | FunctionRegistry::FindStaticOverloads(absl::string_view name, |
| 120 | bool receiver_style, |
| 121 | absl::Span<const cel::Kind> types) const { |
| 122 | std::vector<cel::FunctionOverloadReference> matched_funcs; |
| 123 | |
| 124 | auto overloads = functions_.find(name); |
| 125 | if (overloads == functions_.end()) { |
| 126 | return matched_funcs; |
| 127 | } |
| 128 | |
| 129 | for (const auto& overload : overloads->second.static_overloads) { |
| 130 | if (overload.descriptor->ShapeMatches(receiver_style, types)) { |
| 131 | matched_funcs.push_back({*overload.descriptor, *overload.implementation}); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | return matched_funcs; |
| 136 | } |
| 137 | |
| 138 | std::vector<cel::FunctionOverloadReference> |
| 139 | FunctionRegistry::FindStaticOverloadsByArity(absl::string_view name, |