MCPcopy Create free account
hub / github.com/douglance/devsql / parent_symbol_id

Function parent_symbol_id

crates/devsql/src/providers/symbols.rs:401–410  ·  view source on GitHub ↗
(node: Node, map: &HashMap<usize, i64>)

Source from the content-addressed store, hash-verified

399
400#[cfg(feature = "tree-sitter-ast")]
401fn 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")]
413fn node_text(node: Node, source: &str) -> String {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected