Expand description
Stateful mode-stack lexer, a direct port of the v0.0.6 lexer.mll.
The transitions between the five states are driven entirely by the lexer’s own stack (see the transition table in the OCaml header comment); the whole file is lexed eagerly so that parser backtracking can never desynchronize the mode stack.
Structs§
Functions§
- lex
- Lex a whole source file under SATySFi 0.0.6’s grammar (a
.satydocument, i.e. program mode at the top) — a thin wrapper overlex_with_version. - lex_
partial lex_with_version, keeping the tokens produced before a failure instead of discarding them.- lex_
with_ version - Lex a whole source file under an explicit target version.
V0_0through this entry point is byte-for-bytelex’s own behavior — pinned by a differential test that lexes every vendored 0.0.6 package and fixture through bothlex(src)andlex_with_version(src, V0_0), asserting identical token streams (crates/rustyfi-syntax/tests/lex_with_version_differential.rs).