| 448 | } |
| 449 | |
| 450 | fn extract_calls(state: &mut ExtractionState, node: TsNode<'_>, fn_id: &str) { |
| 451 | let mut cursor = node.walk(); |
| 452 | if cursor.goto_first_child() { |
| 453 | loop { |
| 454 | let child = cursor.node(); |
| 455 | match child.kind() { |
| 456 | "application_expression" => { |
| 457 | if let Some(callee) = child.child(0) { |
| 458 | let name = state.node_text(callee); |
| 459 | state.unresolved_refs.push(UnresolvedRef { |
| 460 | from_node_id: fn_id.to_string(), |
| 461 | reference_name: name, |
| 462 | reference_kind: EdgeKind::Calls, |
| 463 | line: child.start_position().row as u32, |
| 464 | column: child.start_position().column as u32, |
| 465 | file_path: state.file_path.clone(), |
| 466 | }); |
| 467 | } |
| 468 | Self::extract_calls(state, child, fn_id); |
| 469 | } |
| 470 | "function_or_value_defn" | "type_definition" => {} |
| 471 | _ => Self::extract_calls(state, child, fn_id), |
| 472 | } |
| 473 | if !cursor.goto_next_sibling() { |
| 474 | break; |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | fn extract_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> { |
| 481 | // F# XML doc comments: /// text |