import type { Highlight } from '../../editor/index.js'; import type { EditorStreamParser } from './contract.js'; /** What is carried from one call to the next: the line, and its pieces. */ export interface StreamState { /** The line the pieces were computed from, so a changed line is redone. */ line: string; pieces: readonly Highlight[]; } /** * The tokenizer, which a host turns into a language with one call. * * ```ts * const openscript = StreamLanguage.define(openscriptStream); * ``` * * `token` moves the stream to the end of the piece that starts where it is and * returns that piece's style. A stream that has somehow been left inside a piece, * which the editor does when it re-tokenizes from a column rather than from the * start of a line, is moved to the end of the piece containing it, so the * tokenizer always advances and the editor cannot be made to loop. */ export declare const openscriptStream: EditorStreamParser; //# sourceMappingURL=stream.d.ts.map