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)
| 459 | /// default INTERNAL. `open` → internal, `fileprivate` → private (via the |
| 460 | /// 'private' substring), `public private(set)` → public (first match). |
| 461 | fn visibility_of(&self, node: Node) -> u8 { |
| 462 | for i in 0..node.child_count() { |
| 463 | let Some(child) = node.child(i) else { continue }; |
| 464 | if child.kind() == "modifiers" { |
| 465 | let text = self.text(child); |
| 466 | if text.contains("public") { |
| 467 | return 1; |
| 468 | } |
| 469 | if text.contains("private") { |
| 470 | return 2; |
| 471 | } |
| 472 | if text.contains("internal") { |
| 473 | return 4; |
| 474 | } |
| 475 | // 'fileprivate' arm is dead — 'private' already matched. |
| 476 | } |
| 477 | } |
| 478 | 4 // Swift defaults to internal |
| 479 | } |
| 480 | |
| 481 | /// isStatic: modifiers text contains 'static' OR 'class' (class members |
| 482 | /// count — deliberate; substring semantics preserved). |
no test coverage detected