(&mut self, node: Node<'t>)
| 1239 | // --- visitFunctionBody (:5129-5286) — dart rows ----------------------- |
| 1240 | |
| 1241 | fn visit_body(&mut self, node: Node<'t>) { |
| 1242 | self.maybe_capture_fn_refs(node); |
| 1243 | |
| 1244 | let kind = node.kind(); |
| 1245 | if kind == "new_expression" { |
| 1246 | // INSTANTIATION branch fires first — extractBareCall's |
| 1247 | // new_expression arm is dead. Children still recursed. |
| 1248 | self.extract_instantiation(node); |
| 1249 | } else if let Some(callee) = self.bare_call_name(node) { |
| 1250 | // extractBareCall (:5159-5173) — ref at the MATCHED node. |
| 1251 | if !self.stack.is_empty() { |
| 1252 | let caller_row = self.top_row(); |
| 1253 | self.push_ref_at(caller_row, &callee, "calls", node); |
| 1254 | } |
| 1255 | } |
| 1256 | |
| 1257 | self.extract_static_member_ref(node); |
| 1258 | |
| 1259 | if kind == "function_signature" { |
| 1260 | // Nested named functions (:5245) — extractFunction walks the |
| 1261 | // nested body itself; the enclosing walker ALSO revisits the |
| 1262 | // sibling function_body (double-walk pass 2b) via recursion. |
| 1263 | self.extract_function(node); |
| 1264 | return; |
| 1265 | } |
| 1266 | |
| 1267 | let mut cursor = node.walk(); |
| 1268 | let children: Vec<Node<'t>> = node.named_children(&mut cursor).collect(); |
| 1269 | for child in children { |
| 1270 | self.visit_body(child); |
| 1271 | } |
| 1272 | } |
| 1273 | |
| 1274 | // --- function-as-value capture (#756) — DART_SPEC --------------------- |
| 1275 |
no test coverage detected