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
S
Description
My contributions to doctrine/lexer: 2 commits, 1 merged PRs
41 KiB
0 Stars 1 Watchers 0 Forks
Languages
PHP 100%