(mut node: Node<'_>, source: &str)
| 323 | } |
| 324 | |
| 325 | fn conditional(mut node: Node<'_>, source: &str) -> bool { |
| 326 | loop { |
| 327 | let mut previous = node.prev_named_sibling(); |
| 328 | while let Some(attribute) = previous.filter(|node| node.kind() == "attribute_item") { |
| 329 | if text(attribute, source).contains("cfg") { |
| 330 | return true; |
| 331 | } |
| 332 | previous = attribute.prev_named_sibling(); |
| 333 | } |
| 334 | let Some(parent) = node.parent() else { |
| 335 | return false; |
| 336 | }; |
| 337 | node = parent; |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | fn rust_import( |
| 342 | node: Node<'_>, |