getVisibility (dart.ts:209-222) — `_` prefix = private; every constructor is public (the unwrap misses ctor signatures / the name FIELD is the class identifier).
(&self, node: Node<'t>)
| 585 | /// constructor is public (the unwrap misses ctor signatures / the name |
| 586 | /// FIELD is the class identifier). |
| 587 | fn visibility_of(&self, node: Node<'t>) -> u8 { |
| 588 | let name_node = if node.kind() == "method_signature" { |
| 589 | let mut cursor = node.walk(); |
| 590 | let inner = node.named_children(&mut cursor).find(|c| { |
| 591 | matches!(c.kind(), "function_signature" | "getter_signature" | "setter_signature") |
| 592 | }); |
| 593 | inner.and_then(|i| { |
| 594 | let mut ic = i.walk(); |
| 595 | let found = i.named_children(&mut ic).find(|c| c.kind() == "identifier"); |
| 596 | found |
| 597 | }) |
| 598 | } else { |
| 599 | node.child_by_field_name("name") |
| 600 | }; |
| 601 | match name_node { |
| 602 | Some(n) if self.text(n).starts_with('_') => 2, |
| 603 | _ => 1, |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | /// isAsync (dart.ts:223-233) — the `async` anon child of the SIBLING |
| 608 | /// function_body; `async*`/`sync*` are different token types → false. |
no test coverage detected