Expand description
Test factories for creating locations and spanned tokens succinctly.
The lexer and parser now require every token to carry a byte-span. These helpers keep tests concise while enforcing that requirement.
Functions§
- make_
loc - Make a byte range location
- mk_
token - Make a single spanned token
- mk_
tokens - Make a vector of spanned tokens from a list of (Token, start, end)
- mk_
tokens_ with_ dummy_ span - Create tokens with zero-length spans for convenience in tests that only care about token order.
Type Aliases§
- Tokens
- Canonical alias for spanned tokens used across tests