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

Function loops

src/ui-server/api/when.ts:182–190  ·  view source on GitHub ↗
(caller, site)

Source from the content-addressed store, hash-verified

180 return guardLabel(await guards(caller, site));
181 },
182 async loops(caller, site) {
183 // Not counted against the budget: the tree is parsed for the site's
184 // guards anyway, and this is a second climb up the same nodes.
185 if (!site.line || !supportsBranchGuards(caller.language)) return [];
186 const file = resolve(caller);
187 if (!file) return [];
188 const key = { line: site.line, column: typeof site.column === 'number' ? site.column : null };
189 return (await loopsForFile(file.abs, file.language, [key])).get(siteKey(key)) ?? [];
190 },
191 async args(caller, site) {
192 if (!site.line || sites >= maxSites || !supportsBranchGuards(caller.language)) return null;
193 const file = resolve(caller);

Callers

nothing calls this directly

Calls 5

supportsBranchGuardsFunction · 0.90
loopsForFileFunction · 0.90
siteKeyFunction · 0.90
resolveFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected