MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / traverse

Function traverse

website/src/lib/parser.worker.ts:537–542  ·  view source on GitHub ↗
(n: any)

Source from the content-addressed store, hash-verified

535
536 let count = 1;
537 function traverse(n: any) {
538 if (complexityNodes.has(n.type)) count++;
539 for (let i = 0; i < n.childCount; i++) {
540 traverse(n.child(i));
541 }
542 }
543 traverse(node);
544 return count;
545}

Callers 15

traverseMethod · 0.85
_calculate_complexityMethod · 0.85
traverseMethod · 0.85
_calculate_complexityMethod · 0.85
traverseMethod · 0.85
_calculate_complexityMethod · 0.85
traverseMethod · 0.85
_calculate_complexityMethod · 0.85
traverseMethod · 0.85
_calculate_complexityMethod · 0.85
traverseMethod · 0.85
_calculate_complexityMethod · 0.85

Calls 2

hasMethod · 0.65
childMethod · 0.45

Tested by

no test coverage detected