(&mut self, node: Node<'t>)
| 651 | } |
| 652 | |
| 653 | fn visit_for_calls_and_structure(&mut self, node: Node<'t>) { |
| 654 | stack_guard!(); |
| 655 | let kind = node.kind(); |
| 656 | self.maybe_capture_fn_refs(node); |
| 657 | |
| 658 | if kind == "invocation_expression" { |
| 659 | self.extract_call(node); |
| 660 | } else if kind == "object_creation_expression" { |
| 661 | self.extract_instantiation(node); |
| 662 | if let Some(anon_body) = find_anonymous_class_body(node) { |
| 663 | self.extract_anonymous_class(node, anon_body); |
| 664 | return; |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | // Static value reads (`ReadType.ReadAsDouble`) — body walker only. |
| 669 | self.extract_static_member_ref(node); |
| 670 | |
| 671 | // (variable_declarator type-annotation branch: C# has no |
| 672 | // `type_annotation` child node — structurally inert, not ported. |
| 673 | // functionTypes is empty — no nested-function branch.) |
| 674 | |
| 675 | if kind == "class_declaration" || kind == "record_declaration" { |
| 676 | if kind == "record_declaration" && record_is_struct(node) { |
| 677 | self.extract_struct(node); |
| 678 | } else { |
| 679 | self.extract_class(node); |
| 680 | } |
| 681 | return; |
| 682 | } |
| 683 | if kind == "struct_declaration" || kind == "record_struct_declaration" { |
| 684 | self.extract_struct(node); |
| 685 | return; |
| 686 | } |
| 687 | if kind == "enum_declaration" { |
| 688 | self.extract_enum(node); |
| 689 | return; |
| 690 | } |
| 691 | if kind == "interface_declaration" { |
| 692 | self.extract_interface(node); |
| 693 | return; |
| 694 | } |
| 695 | |
| 696 | for i in 0..node.named_child_count() { |
| 697 | if let Some(c) = node.named_child(i) { |
| 698 | self.visit_for_calls_and_structure(c); |
| 699 | } |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | // --- extractors -------------------------------------------------------------- |
| 704 |
no test coverage detected