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