(&mut self, node: Node<'t>)
| 575 | } |
| 576 | |
| 577 | fn visit_for_calls_and_structure(&mut self, node: Node<'t>) { |
| 578 | let kind = node.kind(); |
| 579 | self.maybe_capture_fn_refs(node); |
| 580 | |
| 581 | if kind == "invocation_expression" { |
| 582 | self.extract_call(node); |
| 583 | } else if kind == "object_creation_expression" { |
| 584 | self.extract_instantiation(node); |
| 585 | if let Some(anon_body) = find_anonymous_class_body(node) { |
| 586 | self.extract_anonymous_class(node, anon_body); |
| 587 | return; |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | // Static value reads (`ReadType.ReadAsDouble`) — body walker only. |
| 592 | self.extract_static_member_ref(node); |
| 593 | |
| 594 | // (variable_declarator type-annotation branch: C# has no |
| 595 | // `type_annotation` child node — structurally inert, not ported. |
| 596 | // functionTypes is empty — no nested-function branch.) |
| 597 | |
| 598 | if kind == "class_declaration" || kind == "record_declaration" { |
| 599 | if kind == "record_declaration" && record_is_struct(node) { |
| 600 | self.extract_struct(node); |
| 601 | } else { |
| 602 | self.extract_class(node); |
| 603 | } |
| 604 | return; |
| 605 | } |
| 606 | if kind == "struct_declaration" || kind == "record_struct_declaration" { |
| 607 | self.extract_struct(node); |
| 608 | return; |
| 609 | } |
| 610 | if kind == "enum_declaration" { |
| 611 | self.extract_enum(node); |
| 612 | return; |
| 613 | } |
| 614 | if kind == "interface_declaration" { |
| 615 | self.extract_interface(node); |
| 616 | return; |
| 617 | } |
| 618 | |
| 619 | for i in 0..node.named_child_count() { |
| 620 | if let Some(c) = node.named_child(i) { |
| 621 | self.visit_for_calls_and_structure(c); |
| 622 | } |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | // --- extractors -------------------------------------------------------------- |
| 627 |
no test coverage detected