update set_included_ranges to modify extent if the current position is at the very beginning of the included range
This commit is contained in:
parent
0fea8c02ee
commit
9182ebef86
2 changed files with 43 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ static void ts_lexer_goto(Lexer *self, Length position) {
|
|||
for (unsigned i = 0; i < self->included_range_count; i++) {
|
||||
TSRange *included_range = &self->included_ranges[i];
|
||||
if (included_range->end_byte > position.bytes) {
|
||||
if (included_range->start_byte > position.bytes) {
|
||||
if (included_range->start_byte >= position.bytes) {
|
||||
self->current_position = (Length) {
|
||||
.bytes = included_range->start_byte,
|
||||
.extent = included_range->start_point,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue