Check if a node has a `pub` visibility modifier.
(&self, node: &Node)
| 480 | |
| 481 | /// Check if a node has a `pub` visibility modifier. |
| 482 | fn is_pub(&self, node: &Node) -> bool { |
| 483 | let mut cursor = node.walk(); |
| 484 | let children: Vec<_> = node.children(&mut cursor).collect(); |
| 485 | children.iter().any(|c| c.kind() == "visibility_modifier") |
| 486 | } |
| 487 | |
| 488 | /// Get the text content of a node. |
| 489 | fn node_text(&self, node: &Node, source: &str) -> String { |
no test coverage detected