3 Commits
Author SHA1 Message Date
dualfroz 9bc7753c83 Describe this repository 2026-10-22 21:03:24 +02:00
dualfroz 35639310c2 Describe the position argument without contrasting it, cover the past-the-end reset 2026-09-23 05:46:46 +02:00
dualfroz f6e27044ad fix: make resetPosition() accept a token character offset
resetPosition() used its argument directly as an index into the
internal tokens array. The only position value the public API
exposes is Token::$position, a character offset into the input
string, so passing a multi-character token's offset silently
resumed the lexer at the wrong token, or past the end of input.

resetPosition() now locates the token whose character offset is
greater than or equal to the given position and resumes from there,
matching the offset semantics already used by getInputUntilPosition().

Closes #53
2026-09-06 00:57:01 +02:00