extractStruct — body field REQUIRED (unit structs mint no node; tuple structs' ordered_field_declaration_list is a body).
(&mut self, node: Node<'t>)
| 582 | /// extractStruct — body field REQUIRED (unit structs mint no node; tuple |
| 583 | /// structs' ordered_field_declaration_list is a body). |
| 584 | fn extract_struct(&mut self, node: Node<'t>) { |
| 585 | let Some(body) = node.child_by_field_name("body") else { return }; |
| 586 | let name = self.extract_name(node); |
| 587 | let extra = Extra { |
| 588 | docstring: preceding_docstring(node, self.src), |
| 589 | visibility: Some(self.visibility_of(node)), |
| 590 | ..Extra::default() |
| 591 | }; |
| 592 | let Some(row) = self.create_node("struct", &name, node, extra) else { return }; |
| 593 | self.extract_inheritance(node, row); |
| 594 | |
| 595 | self.stack.push(Scope { row, kind: "struct", name }); |
| 596 | for i in 0..body.named_child_count() { |
| 597 | if let Some(c) = body.named_child(i) { |
| 598 | self.visit_node(c); |
| 599 | } |
| 600 | } |
| 601 | self.stack.pop(); |
| 602 | } |
| 603 | |
| 604 | /// extractEnum — body required; enum_variant children → enum_member nodes |
| 605 | /// (name field only, payloads never walked); other children re-dispatched. |
no test coverage detected