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

Function directiveName

src/extraction/languages/objcpp.ts:208–213  ·  view source on GitHub ↗

The name of the directive whose `#` is at `i` (`if`, `import`, `endif`).

(source: string, i: number)

Source from the content-addressed store, hash-verified

206
207/** The name of the directive whose `#` is at `i` (`if`, `import`, `endif`). */
208function directiveName(source: string, i: number): string {
209 let j = i + 1;
210 while (j < source.length && isBlank(source.charCodeAt(j))) j++;
211 const end = wordEnd(source, j);
212 return end < 0 ? '' : source.slice(j, end);
213}
214
215/** Past the bracket group opening at `i`, strings and comments inside skipped; -1 when it doesn't close. */
216function groupEnd(source: string, i: number, open: number, close: number): number {

Callers 2

atBlockEndFunction · 0.85
scanItemFunction · 0.85

Calls 2

isBlankFunction · 0.90
wordEndFunction · 0.90

Tested by

no test coverage detected