`PLUS { int apply(…) { … } }`: a constant's own class_body declares members of its own, scoped under the constant.
(&mut self, node: Node<'t>, member: Option<(u32, String)>)
| 732 | /// `PLUS { int apply(…) { … } }`: a constant's own class_body declares |
| 733 | /// members of its own, scoped under the constant. |
| 734 | fn visit_enum_constant_body(&mut self, node: Node<'t>, member: Option<(u32, String)>) { |
| 735 | let Some((row, name)) = member else { return }; |
| 736 | let Some(body) = (0..node.named_child_count()).filter_map(|i| node.named_child(i)).find(|c| c.kind() == "class_body") else { return }; |
| 737 | self.stack.push(Scope { row, kind: "enum_member", name }); |
| 738 | for i in 0..body.named_child_count() { |
| 739 | if let Some(c) = body.named_child(i) { |
| 740 | self.visit_node(c); |
| 741 | } |
| 742 | } |
| 743 | self.stack.pop(); |
| 744 | } |
| 745 | |
| 746 | /// extractField — each declarator becomes a field/constant node. Returns |
| 747 | /// the initializers walked under their fields, for the declaration scan to |
no test coverage detected