(node: Node, map: &HashMap<usize, i64>)
| 399 | |
| 400 | #[cfg(feature = "tree-sitter-ast")] |
| 401 | fn parent_symbol_id(node: Node, map: &HashMap<usize, i64>) -> Option<i64> { |
| 402 | let mut current = node.parent(); |
| 403 | while let Some(parent) = current { |
| 404 | if let Some(id) = map.get(&parent.id()) { |
| 405 | return Some(*id); |
| 406 | } |
| 407 | current = parent.parent(); |
| 408 | } |
| 409 | None |
| 410 | } |
| 411 | |
| 412 | #[cfg(feature = "tree-sitter-ast")] |
| 413 | fn node_text(node: Node, source: &str) -> String { |
no outgoing calls
no test coverage detected