Pass row/column position to input seek method
This commit is contained in:
parent
8b70cb85f7
commit
facafcd6e4
5 changed files with 10 additions and 10 deletions
|
|
@ -20,7 +20,7 @@ static void ts_lexer__get_chunk(Lexer *self) {
|
|||
TSInput input = self->input;
|
||||
if (!self->chunk ||
|
||||
self->current_position.bytes != self->chunk_start + self->chunk_size) {
|
||||
input.seek(input.payload, self->current_position.bytes);
|
||||
input.seek(input.payload, self->current_position.bytes, self->current_position.extent);
|
||||
}
|
||||
|
||||
self->chunk_start = self->current_position.bytes;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ static const char *ts_string_input__read(void *payload, uint32_t *bytes_read) {
|
|||
return input->string + previous_position;
|
||||
}
|
||||
|
||||
static int ts_string_input__seek(void *payload, uint32_t byte) {
|
||||
static int ts_string_input__seek(void *payload, uint32_t byte, TSPoint _) {
|
||||
TSStringInput *input = (TSStringInput *)payload;
|
||||
input->position = byte;
|
||||
return (byte < input->length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue