Expand description
Token tape types.
The token tape is the lossless representation of the source. Every token carries a byte-offset span; trivia (whitespace, comments) is preserved verbatim in a side-table. Round-tripping is:
reconstruct(token_tape(input)) == input // byte-for-byteThis contract is enforced by the proptest in tests/conformance.rs.
Structs§
- Token
- A single syntactic token in the token tape.
- Token
Tape - An ordered sequence of tokens representing the full lexed source.
- Trivia
Table - Maps each token index to the trivia that precedes it.