cppExtractor.getVisibility: the FIRST access_specifier among the parent's children decides (document order, not nearest-preceding — bug-for-bug with the TS loop).
(&self, node: Node)
| 812 | /// parent's children decides (document order, not nearest-preceding — |
| 813 | /// bug-for-bug with the TS loop). |
| 814 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 815 | let parent = node.parent()?; |
| 816 | for i in 0..parent.child_count() { |
| 817 | let Some(child) = parent.child(i) else { continue }; |
| 818 | if child.kind() == "access_specifier" { |
| 819 | let text = self.text(child); |
| 820 | if text.contains("public") { |
| 821 | return Some(1); |
| 822 | } |
| 823 | if text.contains("private") { |
| 824 | return Some(2); |
| 825 | } |
| 826 | if text.contains("protected") { |
| 827 | return Some(3); |
| 828 | } |
| 829 | } |
| 830 | } |
| 831 | None |
| 832 | } |
| 833 | |
| 834 | /// cExtractor.isConst: any named `type_qualifier` child reading "const". |
| 835 | fn is_const_declaration(&self, node: Node) -> bool { |
no test coverage detected