(&mut self, node: Node<'t>)
| 790 | // --- extractEnum (:1914) ---------------------------------------------- |
| 791 | |
| 792 | fn extract_enum(&mut self, node: Node<'t>) { |
| 793 | stack_guard!(); |
| 794 | let body = match node.child_by_field_name("body") { |
| 795 | Some(b) => b, |
| 796 | None => return, // bodiless enum mints nothing |
| 797 | }; |
| 798 | let name = self.extract_name(node); |
| 799 | let docstring = preceding_docstring(node, self.src); |
| 800 | let visibility = self.visibility_of(node); |
| 801 | let row = self.create_node( |
| 802 | "enum", |
| 803 | &name, |
| 804 | node, |
| 805 | Extra { docstring, visibility, ..Default::default() }, |
| 806 | ); |
| 807 | let Some(row) = row else { return }; |
| 808 | self.extract_inheritance(node, row); |
| 809 | // No extractDecoratorsFor on the enum path (annotated enums emit no |
| 810 | // decorates — shared-pipeline behavior). |
| 811 | self.stack.push(Scope { row, kind: "enum", name }); |
| 812 | // enumMemberTypes is EMPTY → every body child goes through visitNode |
| 813 | // (enum_case_definitions hits the hook; defs become methods). |
| 814 | let mut cursor = body.walk(); |
| 815 | let children: Vec<Node<'t>> = body.named_children(&mut cursor).collect(); |
| 816 | for child in children { |
| 817 | self.visit(child); |
| 818 | } |
| 819 | self.stack.pop(); |
| 820 | } |
| 821 | |
| 822 | // --- extractTypeAlias (:2890, plain path :2967-2991) ------------------ |
| 823 |
no test coverage detected