lastNamedOfType (function-ref.ts:600): rightmost matching DESCENDANT in document order (deeper matches override).
(node: Node<'t>)
| 264 | /// lastNamedOfType (function-ref.ts:600): rightmost matching DESCENDANT in |
| 265 | /// document order (deeper matches override). |
| 266 | fn last_simple_identifier<'t>(node: Node<'t>) -> Option<Node<'t>> { |
| 267 | let mut found: Option<Node<'t>> = None; |
| 268 | for i in 0..node.named_child_count() { |
| 269 | let Some(child) = node.named_child(i) else { continue }; |
| 270 | if child.kind() == "simple_identifier" { |
| 271 | found = Some(child); |
| 272 | } |
| 273 | if let Some(deeper) = last_simple_identifier(child) { |
| 274 | found = Some(deeper); |
| 275 | } |
| 276 | } |
| 277 | found |
| 278 | } |
| 279 | |
| 280 | impl<'t> Walker<'t> { |
| 281 | fn text(&self, node: Node) -> &'t str { |
no outgoing calls
no test coverage detected