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

Function has_function_ancestor

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

hasFunctionAncestor (tree-sitter.ts:295).

(node: Node)

Source from the content-addressed store, hash-verified

2737
2738/// hasFunctionAncestor (tree-sitter.ts:295).
2739fn has_function_ancestor(node: Node) -> bool {
2740 let mut p = node.parent();
2741 while let Some(n) = p {
2742 if n.kind() == "function_definition" {
2743 return true;
2744 }
2745 p = n.parent();
2746 }
2747 false
2748}
2749
2750fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
2751 match s {

Callers 1

extract_variableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected