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

Function has_function_ancestor

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

hasFunctionAncestor (tree-sitter.ts:295).

(node: Node)

Source from the content-addressed store, hash-verified

1997
1998/// hasFunctionAncestor (tree-sitter.ts:295).
1999fn has_function_ancestor(node: Node) -> bool {
2000 let mut p = node.parent();
2001 while let Some(n) = p {
2002 if n.kind() == "function_definition" {
2003 return true;
2004 }
2005 p = n.parent();
2006 }
2007 false
2008}
2009
2010fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
2011 match s {

Callers 1

extract_variableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected