/** * Top-level .gg parser (v2, command-first grammar): * * 1. tokenize() — character-stream → Token[] (dsl.ts) * 2. parseStatements() — Token[] → per-statement results (dsl.ts) * 3. fold into DiagramDef — merge `doc` bodies (deep-merge, later wins) * and accumulate icon / region / note / connector arrays. * 4. checkIntegrity() — duplicate ids, valid refs, region connectedness. * * No more `%%{…}%%` directives — all scalars / theme / icons come from * `doc { … }` statements. */ import type { DiagramDef } from '../types.js'; import type { GgError } from './errors.js'; export interface ParseResult { def: DiagramDef; errors: GgError[]; /** * Inline icon map collected from one or more `doc { icons: { … } }` bodies. * `undefined` when no icons directive appeared. Passed to the icon loader * as its `jsonIconsMap` argument — kept out of DiagramDef itself because * DiagramDef is the rendered-diagram contract and icon *sources* are a * build-time detail. */ icons?: Record; } export declare function parseGg(source: string): ParseResult; //# sourceMappingURL=parser.d.ts.map