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