getVisibility: FIRST `modifier` child whose text is one of the four levels wins; none → private (the C# default).
(&self, node: Node)
| 417 | /// getVisibility: FIRST `modifier` child whose text is one of the four |
| 418 | /// levels wins; none → private (the C# default). |
| 419 | fn visibility_of(&self, node: Node) -> u8 { |
| 420 | for i in 0..node.child_count() { |
| 421 | let Some(child) = node.child(i) else { continue }; |
| 422 | if child.kind() == "modifier" { |
| 423 | match self.text(child) { |
| 424 | "public" => return 1, |
| 425 | "private" => return 2, |
| 426 | "protected" => return 3, |
| 427 | "internal" => return 4, |
| 428 | _ => {} |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | 2 // C# defaults to private |
| 433 | } |
| 434 | |
| 435 | fn is_static(&self, node: Node) -> bool { |
| 436 | (0..node.child_count()) |
no test coverage detected