extractInheritance — the swift inheritance_specifier case: FIRST type_identifier of each specifier's user_type, everything as `extends` (conformances included; `: Module.Base` takes `Module`).
(&mut self, node: Node<'t>, class_row: u32)
| 1112 | /// type_identifier of each specifier's user_type, everything as `extends` |
| 1113 | /// (conformances included; `: Module.Base` takes `Module`). |
| 1114 | fn extract_inheritance(&mut self, node: Node<'t>, class_row: u32) { |
| 1115 | let extends_kind = edge_kind_index("extends").unwrap(); |
| 1116 | for i in 0..node.named_child_count() { |
| 1117 | let Some(child) = node.named_child(i) else { continue }; |
| 1118 | if child.kind() != "inheritance_specifier" { |
| 1119 | continue; |
| 1120 | } |
| 1121 | let user_type = (0..child.named_child_count()) |
| 1122 | .filter_map(|j| child.named_child(j)) |
| 1123 | .find(|c| c.kind() == "user_type"); |
| 1124 | let Some(user_type) = user_type else { continue }; |
| 1125 | let type_id = (0..user_type.named_child_count()) |
| 1126 | .filter_map(|j| user_type.named_child(j)) |
| 1127 | .find(|c| c.kind() == "type_identifier"); |
| 1128 | let Some(type_id) = type_id else { continue }; |
| 1129 | let name = self.text(type_id).to_string(); |
| 1130 | self.push_ref_at(class_row, &name, extends_kind, type_id); |
| 1131 | } |
| 1132 | } |
| 1133 | |
| 1134 | /// extractTypeAnnotations — generic path: the 'parameter' field NEVER |
| 1135 | /// resolves (zero param refs), 'return_type' DOES; the direct |
no test coverage detected