(&mut self, node: Node<'t>)
| 861 | } |
| 862 | |
| 863 | fn extract_class(&mut self, node: Node<'t>) { |
| 864 | let resolved_body = self.resolve_body(node); |
| 865 | let name = self.extract_name(node); |
| 866 | let extra = Extra { |
| 867 | docstring: preceding_docstring(node, self.src), |
| 868 | visibility: Some(self.visibility_of(node)), |
| 869 | ..Extra::default() |
| 870 | }; |
| 871 | let Some(row) = self.create_node("class", &name, node, extra) else { return }; |
| 872 | self.extract_inheritance(node, row); |
| 873 | // primaryCtor refs: csharp-gated no-op. |
| 874 | self.extract_decorators_for(node, row); |
| 875 | self.stack.push(Scope { row, kind: "class", name }); |
| 876 | // Bodied: ONLY class_body children (primary-ctor properties/defaults |
| 877 | // invisible). Bodiless: the class node itself → header children |
| 878 | // visited → ctor default-value + super-arg calls attribute to the |
| 879 | // CLASS (the asymmetry, pinned). |
| 880 | let body = resolved_body.unwrap_or(node); |
| 881 | for i in 0..body.named_child_count() { |
| 882 | if let Some(c) = body.named_child(i) { |
| 883 | self.visit_node(c); |
| 884 | } |
| 885 | } |
| 886 | self.stack.pop(); |
| 887 | } |
| 888 | |
| 889 | fn extract_interface(&mut self, node: Node<'t>) { |
| 890 | let name = self.extract_name(node); |
no test coverage detected