(&mut self, node: Node<'t>)
| 845 | } |
| 846 | |
| 847 | fn extract_struct(&mut self, node: Node<'t>) { |
| 848 | // Body gate (:1876) — bodiless mints nothing (record exemption is C#). |
| 849 | let Some(body) = node.child_by_field_name("body") else { return }; |
| 850 | let name = self.extract_name(node); |
| 851 | let extra = Extra { |
| 852 | docstring: preceding_docstring(node, self.src), |
| 853 | visibility: Some(self.visibility_of(node)), |
| 854 | ..Extra::default() |
| 855 | }; |
| 856 | let Some(row) = self.create_node("struct", &name, node, extra) else { return }; |
| 857 | self.extract_inheritance(node, row); |
| 858 | // NO extractDecoratorsFor for structs (`@main struct` emits nothing). |
| 859 | self.stack.push(Scope { row, kind: "struct", name }); |
| 860 | for i in 0..body.named_child_count() { |
| 861 | if let Some(c) = body.named_child(i) { |
| 862 | self.visit_node(c); |
| 863 | } |
| 864 | } |
| 865 | self.stack.pop(); |
| 866 | } |
| 867 | |
| 868 | fn extract_enum(&mut self, node: Node<'t>) { |
| 869 | let Some(body) = node.child_by_field_name("body") else { return }; |
no test coverage detected