(&mut self, node: Node<'t>)
| 360 | } |
| 361 | |
| 362 | fn visit_for_calls_and_structure(&mut self, node: Node<'t>) { |
| 363 | let kind = node.kind(); |
| 364 | self.maybe_capture_fn_refs(node); |
| 365 | |
| 366 | if kind == "call" { |
| 367 | self.extract_call(node); |
| 368 | } |
| 369 | |
| 370 | // Nested NAMED functions become their own nodes. |
| 371 | if kind == "function_definition" { |
| 372 | let name = self.extract_name(node); |
| 373 | if name != "<anonymous>" { |
| 374 | self.extract_function(node); |
| 375 | return; |
| 376 | } |
| 377 | } |
| 378 | if kind == "class_definition" { |
| 379 | self.extract_class(node); |
| 380 | return; |
| 381 | } |
| 382 | |
| 383 | for i in 0..node.named_child_count() { |
| 384 | if let Some(c) = node.named_child(i) { |
| 385 | self.visit_for_calls_and_structure(c); |
| 386 | } |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | // --- extractors -------------------------------------------------------------- |
| 391 |
no test coverage detected