getVisibility: any `visibility_modifier` child with one of the three texts; none → public (the php default).
(&self, node: Node)
| 426 | /// getVisibility: any `visibility_modifier` child with one of the three |
| 427 | /// texts; none → public (the php default). |
| 428 | fn visibility_of(&self, node: Node) -> u8 { |
| 429 | for i in 0..node.child_count() { |
| 430 | let Some(child) = node.child(i) else { continue }; |
| 431 | if child.kind() == "visibility_modifier" { |
| 432 | match self.text(child) { |
| 433 | "public" => return 1, |
| 434 | "private" => return 2, |
| 435 | "protected" => return 3, |
| 436 | _ => {} |
| 437 | } |
| 438 | } |
| 439 | } |
| 440 | 1 // PHP defaults to public |
| 441 | } |
| 442 | |
| 443 | fn is_static(&self, node: Node) -> bool { |
| 444 | (0..node.child_count()) |
no test coverage detected