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

Function parseTableHeader

src/installer/targets/toml.ts:429–435  ·  view source on GitHub ↗

`[a.b]` / `[[a.b]]` (already known to be a header line) → its decoded path.

(text: string)

Source from the content-addressed store, hash-verified

427
428/** `[a.b]` / `[[a.b]]` (already known to be a header line) → its decoded path. */
429function parseTableHeader(text: string): { array: boolean; path: string[] | null } {
430 let i = skipWs(text, 0) + 1;
431 const array = text[i] === '[';
432 if (array) i++;
433 const key = parseDottedKey(text, skipWs(text, i));
434 return { array, path: key ? key.path : null };
435}
436
437/** `key = …` at the start of a line → the key's decoded path. */
438function parseKeyValueStart(text: string): { path: string[] | null; inlineTable: boolean } | null {

Callers 1

scanTomlStatementsFunction · 0.85

Calls 2

parseDottedKeyFunction · 0.85
skipWsFunction · 0.70

Tested by

no test coverage detected