getVisibility: modifiers text includes public/private/protected/ internal in that order; default PUBLIC. Text-includes semantics — annotation text inside modifiers can flip it (bug-for-bug).
(&self, node: Node)
| 460 | /// internal in that order; default PUBLIC. Text-includes semantics — |
| 461 | /// annotation text inside modifiers can flip it (bug-for-bug). |
| 462 | fn visibility_of(&self, node: Node) -> u8 { |
| 463 | for i in 0..node.child_count() { |
| 464 | let Some(child) = node.child(i) else { continue }; |
| 465 | if child.kind() == "modifiers" { |
| 466 | let text = self.text(child); |
| 467 | if text.contains("public") { |
| 468 | return 1; |
| 469 | } |
| 470 | if text.contains("private") { |
| 471 | return 2; |
| 472 | } |
| 473 | if text.contains("protected") { |
| 474 | return 3; |
| 475 | } |
| 476 | if text.contains("internal") { |
| 477 | return 4; |
| 478 | } |
| 479 | } |
| 480 | } |
| 481 | 1 // Kotlin defaults to public |
| 482 | } |
| 483 | |
| 484 | /// isAsync: modifiers text includes 'suspend' (text-includes false |
| 485 | /// positive on `@suspendMarker` annotations — preserve). |
no test coverage detected