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