isDartFieldOrTopLevelEntry (dart.ts) — an `initialized_identifier` declaring a field or a top-level variable, not the second variable of a local declaration (`for (var i = 0, j = n(); …)`).
(&self, node: Node<'t>)
| 2198 | /// declaring a field or a top-level variable, not the second variable of |
| 2199 | /// a local declaration (`for (var i = 0, j = n(); …)`). |
| 2200 | fn is_field_or_top_level_entry(&self, node: Node<'t>) -> bool { |
| 2201 | let Some(list) = node.parent() else { return false }; |
| 2202 | if list.kind() != "initialized_identifier_list" { |
| 2203 | return false; |
| 2204 | } |
| 2205 | let Some(owner) = list.parent() else { return false }; |
| 2206 | if owner.kind() == "program" { |
| 2207 | return true; |
| 2208 | } |
| 2209 | owner.kind() == "declaration" |
| 2210 | && owner |
| 2211 | .parent() |
| 2212 | .map(|p| matches!(p.kind(), "class_body" | "extension_body" | "enum_body")) |
| 2213 | .unwrap_or(false) |
| 2214 | } |
| 2215 | |
| 2216 | /// dartMemberRead (dart.ts) — `x.area` / `x?.area` not followed by a call's |
| 2217 | /// argument part, receiver a plain name: a `references` ref `x.area` on |