getVisibility: whole-text substring matching over `modifiers` children; default INTERNAL. `open` → internal, `fileprivate` → private (via the 'private' substring), `public private(set)` → public (first match).
(&self, node: Node)
| 532 | /// default INTERNAL. `open` → internal, `fileprivate` → private (via the |
| 533 | /// 'private' substring), `public private(set)` → public (first match). |
| 534 | fn visibility_of(&self, node: Node) -> u8 { |
| 535 | for i in 0..node.child_count() { |
| 536 | let Some(child) = node.child(i) else { continue }; |
| 537 | if child.kind() == "modifiers" { |
| 538 | let text = self.text(child); |
| 539 | if text.contains("public") { |
| 540 | return 1; |
| 541 | } |
| 542 | if text.contains("private") { |
| 543 | return 2; |
| 544 | } |
| 545 | if text.contains("internal") { |
| 546 | return 4; |
| 547 | } |
| 548 | // 'fileprivate' arm is dead — 'private' already matched. |
| 549 | } |
| 550 | } |
| 551 | 4 // Swift defaults to internal |
| 552 | } |
| 553 | |
| 554 | /// isStatic: modifiers text contains 'static' OR 'class' (class members |
| 555 | /// count — deliberate; substring semantics preserved). |
no test coverage detected