extractInterface — kind `trait` (interfaceKind), inheritance from trait_bounds, body children visited with the trait pushed.
(&mut self, node: Node<'t>)
| 571 | /// extractInterface — kind `trait` (interfaceKind), inheritance from |
| 572 | /// trait_bounds, body children visited with the trait pushed. |
| 573 | fn extract_interface(&mut self, node: Node<'t>) { |
| 574 | stack_guard!(); |
| 575 | let name = self.extract_name(node); |
| 576 | let extra = Extra { |
| 577 | docstring: preceding_docstring(node, self.src), |
| 578 | ..Extra::default() // no visibility/isExported on the interface path |
| 579 | }; |
| 580 | let Some(row) = self.create_node("trait", &name, node, extra) else { return }; |
| 581 | self.extract_inheritance(node, row); |
| 582 | |
| 583 | self.stack.push(Scope { row, kind: "trait", name }); |
| 584 | let body = node.child_by_field_name("body").unwrap_or(node); |
| 585 | for i in 0..body.named_child_count() { |
| 586 | if let Some(c) = body.named_child(i) { |
| 587 | self.visit_node(c); |
| 588 | } |
| 589 | } |
| 590 | self.stack.pop(); |
| 591 | } |
| 592 | |
| 593 | /// Extract a Rust struct or union with a body; unit structs remain skipped. |
| 594 | fn extract_aggregate(&mut self, node: Node<'t>, kind: &'static str) { |
no test coverage detected