extractGoInterfaceMethods: method_elem/method_spec → method nodes, each referencing the types its signature names (`decl` declares the interface).
(&mut self, interface_type: Node<'t>, iface_row: u32, iface_name: &str, decl: Node<'t>)
| 640 | /// referencing the types its signature names (`decl` declares the |
| 641 | /// interface). |
| 642 | fn extract_go_interface_methods(&mut self, interface_type: Node<'t>, iface_row: u32, iface_name: &str, decl: Node<'t>) { |
| 643 | self.stack.push(Scope { row: iface_row, kind: "interface", name: iface_name.to_string() }); |
| 644 | let references = edge_kind_index("references").unwrap(); |
| 645 | for m in interface_type.named_children(&mut interface_type.walk()) { |
| 646 | if !matches!(m.kind(), "method_elem" | "method_spec") { |
| 647 | continue; |
| 648 | } |
| 649 | let name_node = m.child_by_field_name("name").or_else(|| m.named_child(0)); |
| 650 | let Some(name_node) = name_node else { continue }; |
| 651 | let mname = self.text(name_node).to_string(); |
| 652 | if !mname.is_empty() { |
| 653 | let signature = self.signature_of(m); |
| 654 | let Some(row) = self.create_node("method", &mname, m, Extra { signature, ..Extra::default() }) else { continue }; |
| 655 | for ty in self.interface_method_type_names(m, decl) { |
| 656 | let text = self.text(ty).to_string(); |
| 657 | self.push_ref_at(row, &text, references, ty); |
| 658 | } |
| 659 | } |
| 660 | } |
| 661 | self.stack.pop(); |
| 662 | } |
| 663 | |
| 664 | /// goInterfaceMethodTypeNames (languages/go.ts): the name nodes of the |
| 665 | /// types an interface method's parameters and results name, but the |
no test coverage detected