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

Function groupEnd

src/extraction/languages/cobol.ts:196–206  ·  view source on GitHub ↗
(i: number)

Source from the content-addressed store, hash-verified

194
195 /** A group item extends to the last entry before the next level <= its own. */
196 const groupEnd = (i: number): number => {
197 const self = items[i]!;
198 let end = endLineOf(self.node);
199 for (let j = i + 1; j < entries.length; j++) {
200 const it = items[j];
201 if (!it) continue;
202 if (it.level !== 88 && (it.level <= self.level || isTopLevel(it.level))) break;
203 end = Math.max(end, endLineOf(it.node));
204 }
205 return end;
206 };
207
208 const open: { level: number }[] = [];
209 let pushed = 0;

Callers 1

walkDataEntriesFunction · 0.85

Calls 2

endLineOfFunction · 0.85
isTopLevelFunction · 0.85

Tested by

no test coverage detected