MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / findFns

Function findFns

src/context/data-flow.ts:166–173  ·  view source on GitHub ↗
(n: any, depth: number)

Source from the content-addressed store, hash-verified

164
165 // Find function nodes anywhere in the tree (depth-unbounded, like ast-chunk).
166 const findFns = (n: any, depth: number) => {
167 if (depth > 12 || !n) return;
168 if (FUNC_NODE_RE.test(n.type)) {
169 analyzeFunction(n);
170 // still descend — nested functions are analyzed too
171 }
172 for (let i = 0; i < (n.childCount ?? 0); i++) findFns(n.child(i), depth + 1);
173 };
174 findFns(tree.rootNode, 0);
175
176 return results;

Callers 1

analyzeDataFlowFunction · 0.85

Calls 2

analyzeFunctionFunction · 0.85
childMethod · 0.80

Tested by

no test coverage detected