(&mut self, node: Node<'t>)
| 457 | } |
| 458 | |
| 459 | fn visit_for_calls_and_structure(&mut self, node: Node<'t>) { |
| 460 | stack_guard!(); |
| 461 | let kind = node.kind(); |
| 462 | self.maybe_capture_fn_refs(node); |
| 463 | |
| 464 | if kind == "call" { |
| 465 | self.extract_call(node); |
| 466 | } |
| 467 | |
| 468 | // Nested NAMED functions become their own nodes. |
| 469 | if kind == "function_definition" { |
| 470 | let name = self.extract_name(node); |
| 471 | if name != "<anonymous>" { |
| 472 | self.extract_function(node); |
| 473 | return; |
| 474 | } |
| 475 | } |
| 476 | if kind == "class_definition" { |
| 477 | self.extract_class(node); |
| 478 | return; |
| 479 | } |
| 480 | |
| 481 | for i in 0..node.named_child_count() { |
| 482 | if let Some(c) = node.named_child(i) { |
| 483 | self.visit_for_calls_and_structure(c); |
| 484 | } |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | // --- extractors -------------------------------------------------------------- |
| 489 |
no test coverage detected