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)
| 599 | /// internal in that order; default PUBLIC. Text-includes semantics — |
| 600 | /// annotation text inside modifiers can flip it (bug-for-bug). |
| 601 | fn visibility_of(&self, node: Node) -> u8 { |
| 602 | for child in node.children(&mut node.walk()) { |
| 603 | if child.kind() == "modifiers" { |
| 604 | let text = self.text(child); |
| 605 | if text.contains("public") { |
| 606 | return 1; |
| 607 | } |
| 608 | if text.contains("private") { |
| 609 | return 2; |
| 610 | } |
| 611 | if text.contains("protected") { |
| 612 | return 3; |
| 613 | } |
| 614 | if text.contains("internal") { |
| 615 | return 4; |
| 616 | } |
| 617 | } |
| 618 | } |
| 619 | 1 // Kotlin defaults to public |
| 620 | } |
| 621 | |
| 622 | /// isAsync: modifiers text includes 'suspend' (text-includes false |
| 623 | /// positive on `@suspendMarker` annotations — preserve). |
no test coverage detected