MCPcopy
hub / github.com/microsoft/vscode-js-debug / gather

Function gather

src/common/sourceMaps/renameScopeTree.test.ts:31–36  ·  view source on GitHub ↗
(node: ScopeNode<void>, context: string)

Source from the content-addressed store, hash-verified

29 const toOffset = new PositionToOffset(source);
30 const actual: string[] = [];
31 const gather = (node: ScopeNode<void>, context: string) => {
32 const own = context
33 + source.slice(toOffset.convert(node.range.begin), toOffset.convert(node.range.end));
34 actual.push(own);
35 node.children?.forEach(c => gather(c, own + ' -> '));
36 };
37
38 root.children?.forEach(node => gather(node, ''));
39 return actual;

Callers 1

calculateActualFunction · 0.85

Calls 3

convertMethod · 0.80
pushMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected