rustExtractor.getVisibility: direct `visibility_modifier` child whose text contains `pub` → public, else private; none → private.
(&self, node: Node)
| 368 | /// rustExtractor.getVisibility: direct `visibility_modifier` child whose |
| 369 | /// text contains `pub` → public, else private; none → private. |
| 370 | fn visibility_of(&self, node: Node) -> u8 { |
| 371 | for i in 0..node.child_count() { |
| 372 | if let Some(c) = node.child(i) { |
| 373 | if c.kind() == "visibility_modifier" { |
| 374 | return if self.text(c).contains("pub") { 1 } else { 2 }; |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | 2 // private — Rust defaults to private |
| 379 | } |
| 380 | |
| 381 | /// extractRustReturnType (languages/rust.ts:14). |
| 382 | fn return_type_of(&self, node: Node) -> Option<String> { |
no test coverage detected