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)
| 714 | /// parent's children decides (document order, not nearest-preceding — |
| 715 | /// bug-for-bug with the TS loop). |
| 716 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 717 | let parent = node.parent()?; |
| 718 | for i in 0..parent.child_count() { |
| 719 | let Some(child) = parent.child(i) else { continue }; |
| 720 | if child.kind() == "access_specifier" { |
| 721 | let text = self.text(child); |
| 722 | if text.contains("public") { |
| 723 | return Some(1); |
| 724 | } |
| 725 | if text.contains("private") { |
| 726 | return Some(2); |
| 727 | } |
| 728 | if text.contains("protected") { |
| 729 | return Some(3); |
| 730 | } |
| 731 | } |
| 732 | } |
| 733 | None |
| 734 | } |
| 735 | |
| 736 | /// cExtractor.isConst: any named `type_qualifier` child reading "const". |
| 737 | fn is_const_declaration(&self, node: Node) -> bool { |
no test coverage detected