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

Function finish

src/extraction/languages/objcpp.ts:350–363  ·  view source on GitHub ↗
(end: number)

Source from the content-addressed store, hash-verified

348 const prevWord = (): string => (prevKind === 1 ? source.slice(prevStart, prevEnd) : '');
349 const prevChar = (): number => (prevKind === 0 ? 0 : source.charCodeAt(prevEnd - 1));
350 const finish = (end: number): number => {
351 if (stack.length > 0) eligible = false;
352 for (const group of groups) if (group.item === index) eligible = false;
353 if (cpp && eligible && tokens > 0) {
354 // `using namespace std;`, `using std::string;`, `class Foo;`.
355 if (!sawBrace && !sawParen && !sawAssign && (usingHead || wordsAfterAggregate === 1)) bare = true;
356 items.push({ start, end, bodyEnd, bare });
357 if (!bare) named++;
358 } else {
359 edits.length = editsAt;
360 spans.length = spansAt;
361 }
362 return end;
363 };
364
365 let j = start;
366 while (j < n) {

Callers 1

scanItemFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected