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