lastNamedOfType (function-ref.ts:600): rightmost matching DESCENDANT in document order (deeper matches override).
(node: Node<'t>)
| 332 | /// lastNamedOfType (function-ref.ts:600): rightmost matching DESCENDANT in |
| 333 | /// document order (deeper matches override). |
| 334 | fn last_simple_identifier<'t>(node: Node<'t>) -> Option<Node<'t>> { |
| 335 | stack_guard!(); |
| 336 | let mut found: Option<Node<'t>> = None; |
| 337 | for child in node.named_children(&mut node.walk()) { |
| 338 | if child.kind() == "simple_identifier" { |
| 339 | found = Some(child); |
| 340 | } |
| 341 | if let Some(deeper) = last_simple_identifier(child) { |
| 342 | found = Some(deeper); |
| 343 | } |
| 344 | } |
| 345 | found |
| 346 | } |
| 347 | |
| 348 | impl<'t> Walker<'t> { |
| 349 | fn text(&self, node: Node) -> &'t str { |
no test coverage detected