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

Function dottedName

src/resolution/dart-libraries.ts:241–248  ·  view source on GitHub ↗

A dotted library name (`app.named`), as the words and dots it is written with.

(tokens: readonly DirectiveToken[])

Source from the content-addressed store, hash-verified

239
240/** A dotted library name (`app.named`), as the words and dots it is written with. */
241function dottedName(tokens: readonly DirectiveToken[]): string | null {
242 let name = '';
243 for (const t of tokens) {
244 if (t.kind === 'word' || (t.kind === 'punctuation' && t.value === '.')) name += t.value;
245 else return null;
246 }
247 return name;
248}
249
250/** Record the directive `keyword` with `tokens` in `out`; false when the tokens are no such directive. */
251function addDirective(out: DartDirectives, keyword: string, tokens: DirectiveToken[]): boolean {

Callers 1

addDirectiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected