MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / has_function_ancestor

Function has_function_ancestor

codegraph-kernel/src/ccpp/mod.rs:2714–2723  ·  view source on GitHub ↗

hasFunctionAncestor (tree-sitter.ts:295).

(node: Node)

Source from the content-addressed store, hash-verified

2712
2713/// hasFunctionAncestor (tree-sitter.ts:295).
2714fn has_function_ancestor(node: Node) -> bool {
2715 let mut p = node.parent();
2716 while let Some(n) = p {
2717 if n.kind() == "function_definition" {
2718 return true;
2719 }
2720 p = n.parent();
2721 }
2722 false
2723}
2724
2725fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
2726 match s {

Callers 1

extract_variableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected