import type { SyntaxLayer } from './layer.js'; import type { Token } from './tokens.js'; /** * Every character of the text, as tokens, in source order. * * Two things happen here that the layer deliberately does not pay to store. * * The first is `trivia`. Whitespace is the complement of the stored tokens, so storing it would * roughly double the token count to hold something derivable by subtraction. This function fills * each gap as it walks, which is what makes the layer's complete coverage observable (FR-016) * without the layer carrying it: the sequence begins at offset 0, ends at `text.length`, and has * no gap and no overlap anywhere between. * * The second is the line split. No yielded token crosses a line boundary (FR-047), while a stored * `value` region may, because the format lets a field be written across two lines and real files * do it. Every token encoding in use, the Language Server Protocol's included, expresses a token * as a length on a single line, so a token spanning one cannot be encoded at all. The split adds * tokens and moves no boundary, so the tiling holds exactly as before, and the stored region stays * whole for everything that is not being drawn. * * A generator, so a consumer colouring a viewport stops where it stops rather than materialising * four hundred thousand tokens to read the first fifty. */ export declare function classify(layer: SyntaxLayer): Iterable; //# sourceMappingURL=classify.d.ts.map