Get the visibility modifier as a string ("public ", "private ", "protected ", or "").
(&self, node: &Node, source: &str)
| 578 | |
| 579 | /// Get the visibility modifier as a string ("public ", "private ", "protected ", or ""). |
| 580 | fn get_visibility(&self, node: &Node, source: &str) -> String { |
| 581 | if self.has_modifier(node, source, "public") { |
| 582 | "public ".to_string() |
| 583 | } else if self.has_modifier(node, source, "protected") { |
| 584 | "protected ".to_string() |
| 585 | } else if self.has_modifier(node, source, "private") { |
| 586 | "private ".to_string() |
| 587 | } else { |
| 588 | String::new() // package-private |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | /// Get the text content of a node. |
| 593 | fn node_text(&self, node: &Node, source: &str) -> String { |
no test coverage detected