isMisparsedFunction (dart.ts:177-188) — skip the UNNAMED constructor, and a `const` ctor / redirecting factory that names no enclosing type (error recovery's).
(&self, node: Node<'t>)
| 604 | /// and a `const` ctor / redirecting factory that names no enclosing type |
| 605 | /// (error recovery's). |
| 606 | fn is_misparsed_function(&self, node: Node<'t>) -> bool { |
| 607 | // The part of a Dart 3.13 primary constructor written in the class |
| 608 | // body, `this : y = x + 1 { … }`, belongs to the constructor the |
| 609 | // header declares: its body runs as the unnamed constructor's does. |
| 610 | let mut cursor = node.walk(); |
| 611 | if node.named_children(&mut cursor).any(|c| c.kind() == "primary_constructor_body_signature") { |
| 612 | return true; |
| 613 | } |
| 614 | match self.ctor_info(node) { |
| 615 | Some((class_name, ctor_name)) => ctor_name == class_name, |
| 616 | None => is_bodiless_ctor(node.kind()), |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | /// getSignature (dart.ts:189-208). |
| 621 | fn signature_of(&self, node: Node<'t>) -> Option<String> { |
no test coverage detected