extractInheritance — base_clause takes ONLY the first base (interface multi-extends drops the rest); class_interface_clause takes ALL children unfiltered (full text, incl. leading `\`).
(&mut self, node: Node<'t>, class_row: u32)
| 1314 | /// multi-extends drops the rest); class_interface_clause takes ALL |
| 1315 | /// children unfiltered (full text, incl. leading `\`). |
| 1316 | fn extract_inheritance(&mut self, node: Node<'t>, class_row: u32) { |
| 1317 | let extends_kind = edge_kind_index("extends").unwrap(); |
| 1318 | let implements_kind = edge_kind_index("implements").unwrap(); |
| 1319 | for child in node.named_children(&mut node.walk()) { |
| 1320 | if child.kind() == "base_clause" { |
| 1321 | if let Some(target) = child.named_child(0) { |
| 1322 | let name = self.text(target).to_string(); |
| 1323 | self.push_ref_at(class_row, &name, extends_kind, target); |
| 1324 | } |
| 1325 | } else if child.kind() == "class_interface_clause" { |
| 1326 | for iface in child.named_children(&mut child.walk()) { |
| 1327 | let name = self.text(iface).to_string(); |
| 1328 | self.push_ref_at(class_row, &name, implements_kind, iface); |
| 1329 | } |
| 1330 | } |
| 1331 | } |
| 1332 | } |
| 1333 | |
| 1334 | // --- php type refs (extractPhpTypeRefs, 6022) ---------------------------------- |
| 1335 |
no test coverage detected