(&mut self, node: Node<'t>)
| 765 | // --- extractEnum (:1914) ---------------------------------------------- |
| 766 | |
| 767 | fn extract_enum(&mut self, node: Node<'t>) { |
| 768 | let body = match node.child_by_field_name("body") { |
| 769 | Some(b) => b, |
| 770 | None => return, // bodiless enum mints nothing |
| 771 | }; |
| 772 | let name = self.extract_name(node); |
| 773 | let docstring = preceding_docstring(node, self.src); |
| 774 | let visibility = self.visibility_of(node); |
| 775 | let row = self.create_node( |
| 776 | "enum", |
| 777 | &name, |
| 778 | node, |
| 779 | Extra { docstring, visibility, ..Default::default() }, |
| 780 | ); |
| 781 | let Some(row) = row else { return }; |
| 782 | self.extract_inheritance(node, row); |
| 783 | // No extractDecoratorsFor on the enum path (annotated enums emit no |
| 784 | // decorates — shared-pipeline behavior). |
| 785 | self.stack.push(Scope { row, kind: "enum", name }); |
| 786 | // enumMemberTypes is EMPTY → every body child goes through visitNode |
| 787 | // (enum_case_definitions hits the hook; defs become methods). |
| 788 | let mut cursor = body.walk(); |
| 789 | let children: Vec<Node<'t>> = body.named_children(&mut cursor).collect(); |
| 790 | for child in children { |
| 791 | self.visit(child); |
| 792 | } |
| 793 | self.stack.pop(); |
| 794 | } |
| 795 | |
| 796 | // --- extractTypeAlias (:2890, plain path :2967-2991) ------------------ |
| 797 |
no test coverage detected