(&mut self, node: Node<'t>, class_row: u32)
| 1086 | // --- extractInheritance — the scala branch (:5339-5360) --------------- |
| 1087 | |
| 1088 | fn extract_inheritance(&mut self, node: Node<'t>, class_row: u32) { |
| 1089 | let mut cursor = node.walk(); |
| 1090 | let kids: Vec<Node<'t>> = node.named_children(&mut cursor).collect(); |
| 1091 | for child in kids { |
| 1092 | if matches!( |
| 1093 | child.kind(), |
| 1094 | "extends_clause" | "superclass" | "base_clause" | "extends_interfaces" |
| 1095 | ) { |
| 1096 | // Iterate ALL supertypes (with-chains, comma form); unwrap |
| 1097 | // each via scalaBaseTypeName; `arguments` children → None → |
| 1098 | // skipped. `derives_clause` is a different kind — silent. |
| 1099 | let mut cc = child.walk(); |
| 1100 | let targets: Vec<Node<'t>> = child.named_children(&mut cc).collect(); |
| 1101 | for target in targets { |
| 1102 | if let Some(name) = self.scala_base_type_name(Some(target)) { |
| 1103 | self.push_ref_at(class_row, &name, "extends", target); |
| 1104 | } |
| 1105 | } |
| 1106 | } |
| 1107 | } |
| 1108 | } |
| 1109 | |
| 1110 | // --- extractTypeAnnotations (:5788-5880) ------------------------------ |
| 1111 |
no test coverage detected