Find types that are queryable (have `#[visit]`, `#[visit(self)]`, or `#[visit(all)]` - not skip/children) Queryable nodes are those that get a NodeId and can be matched by selectors.
(dir: &str, matches: &mut HashSet<VisitableNode>, path_callback: impl Fn(&PathBuf) + Copy)
| 196 | /// |
| 197 | /// Queryable nodes are those that get a NodeId and can be matched by selectors. |
| 198 | pub fn find_queryable_nodes(dir: &str, matches: &mut HashSet<VisitableNode>, path_callback: impl Fn(&PathBuf) + Copy) { |
| 199 | let mut all_visitable = HashSet::new(); |
| 200 | find_visitable_nodes(dir, &mut all_visitable, path_callback); |
| 201 | // Filter to only queryable modes |
| 202 | matches.extend(all_visitable.into_iter().filter(|node| node.visit_mode.is_queryable())); |
| 203 | } |
| 204 | |
| 205 | #[test] |
| 206 | fn test_find_visitable_nodes() { |
no test coverage detected