(&mut self, node: Node<'t>, class_row: u32)
| 1167 | // --- extractInheritance — the dart rows (:5368-5393, :5437-5459) ------ |
| 1168 | |
| 1169 | fn extract_inheritance(&mut self, node: Node<'t>, class_row: u32) { |
| 1170 | let mut cursor = node.walk(); |
| 1171 | let kids: Vec<Node<'t>> = node.named_children(&mut cursor).collect(); |
| 1172 | for child in kids { |
| 1173 | if child.kind() == "superclass" { |
| 1174 | // extends type + `with` mixins (implements) — dart branch. |
| 1175 | let mut cc = child.walk(); |
| 1176 | let targets: Vec<Node<'t>> = child.named_children(&mut cc).collect(); |
| 1177 | for t in targets { |
| 1178 | if t.kind() == "mixins" { |
| 1179 | let mut mc = t.walk(); |
| 1180 | let mixins: Vec<Node<'t>> = t.named_children(&mut mc).collect(); |
| 1181 | for m in mixins { |
| 1182 | if m.kind() == "type_identifier" { |
| 1183 | let name = self.text(m).to_string(); |
| 1184 | self.push_ref_at(class_row, &name, "implements", m); |
| 1185 | } |
| 1186 | } |
| 1187 | } else if t.kind() == "type_identifier" { |
| 1188 | let name = self.text(t).to_string(); |
| 1189 | self.push_ref_at(class_row, &name, "extends", t); |
| 1190 | } |
| 1191 | } |
| 1192 | } else if child.kind() == "interfaces" { |
| 1193 | // implements — one per named child, FULL child text. |
| 1194 | let mut cc = child.walk(); |
| 1195 | let targets: Vec<Node<'t>> = child.named_children(&mut cc).collect(); |
| 1196 | for iface in targets { |
| 1197 | let name = self.text(iface).to_string(); |
| 1198 | self.push_ref_at(class_row, &name, "implements", iface); |
| 1199 | } |
| 1200 | } |
| 1201 | } |
| 1202 | } |
| 1203 | |
| 1204 | // --- extractTypeAnnotations — the dart path (:5819-5833) -------------- |
| 1205 |
no test coverage detected