/** Quote characters recognised as string delimiters. */ export type QuoteChar = '"' | "'" | "`"; export interface StringAwareScannerOptions { /** Which characters open/close a string literal. */ quoteChars: readonly QuoteChar[]; /** * Quote chars for which backslash-escape processing applies. * Typically just `'"'`; backtick raw strings and single-quoted TOML * strings never treat `\\` as an escape sequence. */ escapedQuotes?: readonly QuoteChar[]; } /** * Scans `input` character-by-character while tracking string-literal state. * * Calls: * - `callbacks.onUnquoted(char, index)` for every character that is NOT inside * a string literal. Returning `false` stops the scan early. * - `callbacks.onQuoteOpen(quoteChar, index)` when a string literal opens * (called with the opening quote character and its position). * - `callbacks.onQuoteClose(quoteChar, index)` when a string literal closes * (called with the closing quote character and its position). * * The quote-open and quote-close characters themselves are NOT passed to * `onUnquoted` — only truly unquoted content reaches that callback. */ export declare function scanStringAware(input: string, options: StringAwareScannerOptions, callbacks: { onUnquoted?: (char: string, index: number) => boolean | void; onQuoteOpen?: (quoteChar: QuoteChar, index: number) => void; onQuoteClose?: (quoteChar: QuoteChar, index: number) => void; }): void; //# sourceMappingURL=stringAwareScanner.d.ts.map