Cascade.LexerSourceStage 2 stream: characters -> Token.t (CSS Syntax section 4).
Wraps a Reader.t and produces Token.t values via the section 4.3 tokenization algorithm. Exposes the uniform next / peek / reconsume triple used across parse stages.
The input is already-decoded UTF-8 text. CSS Syntax section 3.2 byte-stream decoding is outside this layer.
A lexer stream: a character cursor plus one-token pushback.
of_string s builds a fresh reader from an already-decoded UTF-8 string and wraps it. enforce_spec is passed to Reader.of_string.
source t is the full input string the underlying reader was built from.
next t consumes the next token. Returns Token.kind.Eof at end of input. Honours any token pushed back by reconsume.
reconsume t tok pushes tok back so the next next returns it. The pushback buffer is unbounded -- multiple reconsume calls stack.
restore t replays the tokens consumed since the most recent save. Pops one entry off the save stack.
spec_non_ascii_ident_cp cp is the CSS Syntax section 4.2 predicate: is cp in that section's range list of non-ASCII ident code points? Exposed for serialisers, which hex-escape anything outside it; an escape is read by every parser, so emission stays on this list even though reading accepts any code point >= U+0080 unless ~enforce_spec:true.