fix: do not increment current_included_range_index past included_range_count in __do_advance
This commit is contained in:
parent
8e718fcb1c
commit
a4ea4737ac
6 changed files with 95 additions and 1 deletions
|
|
@ -172,7 +172,9 @@ static void ts_lexer__do_advance(Lexer *self, bool skip) {
|
|||
self->current_position.bytes >= current_range->end_byte ||
|
||||
current_range->end_byte == current_range->start_byte
|
||||
) {
|
||||
self->current_included_range_index++;
|
||||
if (self->current_included_range_index < self->included_range_count) {
|
||||
self->current_included_range_index++;
|
||||
}
|
||||
if (self->current_included_range_index < self->included_range_count) {
|
||||
current_range++;
|
||||
self->current_position = (Length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue