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