/** * StringReader * A lightweight reader used by the XML / XSD parsers. * * Performance notes * ───────────────── * • consumeWhile uses a pre-compiled RegExp path for the two hot patterns * (whitespace, name chars) so V8 can use a fast SIMD scan instead of a * per-character callback loop. * • consumeUntilStr scans with indexOf instead of character-by-character. * • Line tracking is deferred: we only count newlines in the consumed slice. */ export declare class StringReader { private _input; private _pos; private _line; private _col; private static readonly _WS_RE; private static readonly _NAME_RE; constructor(input: string); get pos(): number; get line(): number; get col(): number; get length(): number; isEOF(): boolean; peek(offset?: number): string; peekStr(len: number): string; next(): string; /** Consume exactly `n` characters and return them. */ consume(n: number): string; /** Consume characters while `predicate` returns true. */ consumeWhile(predicate: (ch: string) => boolean): string; /** * Fast variant: consume characters matching a sticky RegExp. * The regexp must use the `y` (sticky) flag. */ consumePattern(re: RegExp): string; /** Skip XML whitespace using fast regex scan. */ skipWhitespace(): void; /** * Consume characters until the stop sequence is found. * Uses indexOf for bulk scan – O(n) instead of O(n*stopLen) worst case. * Does NOT consume the stop sequence itself. */ consumeUntilStr(stop: string): string; expect(str: string): string; location(): string; /** Update line/col counters for a consumed slice (deferred tracking). */ private _advanceTracking; } //# sourceMappingURL=StringReader.d.ts.map