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