/** * Recursive-descent parser for SceneGraph XML. * * Consumes the token stream from `xmlLexer.ts` and produces a lossless CST — * calling `root.getText()` reproduces the original source. Error-tolerant: * always produces a tree, even for malformed input (unrecognized/misplaced * content is wrapped in `ErrorNode`s; a missing required token is * synthesized as a zero-width missing token — see `XmlToken.isMissing` — * rather than re-attaching the current unconsumed token, which would * duplicate its text on every subsequent failed `expect()`; see the * BrightScript parser's `expect()` for the bug this avoids from the start). */ import { XmlToken } from './xmlToken.js'; import { XmlSyntaxNode } from './xmlSyntaxNode.js'; export interface XmlParseDiagnostic { readonly message: string; readonly pos: number; readonly end: number; readonly line: number; readonly column: number; } export interface XmlParseResult { readonly root: XmlSyntaxNode; readonly diagnostics: readonly XmlParseDiagnostic[]; readonly tokens: readonly XmlToken[]; } /** Parses SceneGraph XML source into a lossless CST. */ export declare function parseXml(source: string): XmlParseResult; //# sourceMappingURL=xmlParser.d.ts.map