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

Function has_function_ancestor

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

hasFunctionAncestor (tree-sitter.ts:295).

(node: Node)

Source from the content-addressed store, hash-verified

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

Callers 1

extract_variableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected