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)
| 991 | /// parent's children decides (document order, not nearest-preceding — |
| 992 | /// bug-for-bug with the TS loop). |
| 993 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 994 | let parent = node.parent()?; |
| 995 | for i in 0..parent.child_count() { |
| 996 | let Some(child) = parent.child(i) else { continue }; |
| 997 | if child.kind() == "access_specifier" { |
| 998 | let text = self.text(child); |
| 999 | if text.contains("public") { |
| 1000 | return Some(1); |
| 1001 | } |
| 1002 | if text.contains("private") { |
| 1003 | return Some(2); |
| 1004 | } |
| 1005 | if text.contains("protected") { |
| 1006 | return Some(3); |
| 1007 | } |
| 1008 | } |
| 1009 | } |
| 1010 | None |
| 1011 | } |
| 1012 | |
| 1013 | /// cExtractor.isConst: any named `type_qualifier` child reading "const". |
| 1014 | fn is_const_declaration(&self, node: Node) -> bool { |
no test coverage detected