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