(state: &ExtractionState, node: TsNode<'_>, kind: &str)
| 432 | } |
| 433 | |
| 434 | fn find_child_text(state: &ExtractionState, node: TsNode<'_>, kind: &str) -> Option<String> { |
| 435 | let mut cursor = node.walk(); |
| 436 | if cursor.goto_first_child() { |
| 437 | loop { |
| 438 | let child = cursor.node(); |
| 439 | if child.kind() == kind { |
| 440 | return Some(state.node_text(child)); |
| 441 | } |
| 442 | if !cursor.goto_next_sibling() { |
| 443 | break; |
| 444 | } |
| 445 | } |
| 446 | } |
| 447 | None |
| 448 | } |
| 449 | |
| 450 | fn extract_calls(state: &mut ExtractionState, node: TsNode<'_>, fn_id: &str) { |
| 451 | let mut cursor = node.walk(); |