(&mut self, node: Node<'t>)
| 686 | } |
| 687 | |
| 688 | fn visit_for_calls_and_structure(&mut self, node: Node<'t>) { |
| 689 | let kind = node.kind(); |
| 690 | self.maybe_capture_fn_refs(node); |
| 691 | |
| 692 | if kind == "call_expression" { |
| 693 | self.extract_call(node); |
| 694 | } else if kind == "new_expression" { |
| 695 | self.extract_instantiation(node); |
| 696 | } |
| 697 | |
| 698 | // Local variable type annotations (TS family only). |
| 699 | if self.variant.is_ts() && kind == "variable_declarator" { |
| 700 | let owner = self.top_row(); |
| 701 | self.extract_variable_type_annotation(node, owner); |
| 702 | } |
| 703 | |
| 704 | // Nested NAMED functions become their own nodes. |
| 705 | if is_function_type(kind) { |
| 706 | let name = self.extract_name(node); |
| 707 | if name != "<anonymous>" { |
| 708 | self.extract_function(node, None); |
| 709 | return; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | if is_class_type(self.variant, kind) { |
| 714 | self.extract_class(node); |
| 715 | return; |
| 716 | } |
| 717 | if self.variant.is_ts() && kind == "enum_declaration" { |
| 718 | self.extract_enum(node); |
| 719 | return; |
| 720 | } |
| 721 | if self.variant.is_ts() && kind == "interface_declaration" { |
| 722 | self.extract_interface(node); |
| 723 | return; |
| 724 | } |
| 725 | |
| 726 | for i in 0..node.named_child_count() { |
| 727 | if let Some(c) = node.named_child(i) { |
| 728 | self.visit_for_calls_and_structure(c); |
| 729 | } |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | // --- name / signature / modifier helpers ------------------------------------ |
| 734 |
no test coverage detected