MCPcopy Create free account
hub / github.com/Snapchat/Valdi / traverse

Function traverse

valdi/vscode_debugger/src/common/sourceUtils.ts:59–70  ·  view source on GitHub ↗
(node: ts.Node)

Source from the content-addressed store, hash-verified

57 let line = 0;
58 let column = 0;
59 function traverse(node: ts.Node) {
60 for (; index < node.pos; ++index) {
61 if (text[index] === '\n') {
62 ++line;
63 column = 0;
64 continue;
65 }
66 ++column;
67 }
68 result.push(line + 1, column);
69 ts.forEachChild(node, traverse);
70 }
71 traverse(sourceFile);
72 return result;
73}

Callers 2

generatePositionsFunction · 0.70
rewriteTopLevelAwaitFunction · 0.70

Calls 5

substrMethod · 0.80
substringMethod · 0.80
startsWithMethod · 0.80
pushMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected