diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-08-27 23:18:36 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-09-04 20:59:00 +0200 |
commit | 7593c8012b1d183ce4806daca3fb50795ab969bf (patch) | |
tree | b14e9f030b156aedd26ea45c79f73e5317cffe55 /src/tree_sitter/lexer.c | |
parent | 3853276d9cacc99a2698117e904475dbf7033383 (diff) | |
download | rneovim-7593c8012b1d183ce4806daca3fb50795ab969bf.tar.gz rneovim-7593c8012b1d183ce4806daca3fb50795ab969bf.tar.bz2 rneovim-7593c8012b1d183ce4806daca3fb50795ab969bf.zip |
treesitter: update runtime
Diffstat (limited to 'src/tree_sitter/lexer.c')
-rw-r--r-- | src/tree_sitter/lexer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree_sitter/lexer.c b/src/tree_sitter/lexer.c index 3f8a4c0ae8..a3c29544d3 100644 --- a/src/tree_sitter/lexer.c +++ b/src/tree_sitter/lexer.c @@ -73,7 +73,6 @@ static void ts_lexer__get_chunk(Lexer *self) { // code that spans the current position. static void ts_lexer__get_lookahead(Lexer *self) { uint32_t position_in_chunk = self->current_position.bytes - self->chunk_start; - const uint8_t *chunk = (const uint8_t *)self->chunk + position_in_chunk; uint32_t size = self->chunk_size - position_in_chunk; if (size == 0) { @@ -82,6 +81,7 @@ static void ts_lexer__get_lookahead(Lexer *self) { return; } + const uint8_t *chunk = (const uint8_t *)self->chunk + position_in_chunk; UnicodeDecodeFunction decode = self->input.encoding == TSInputEncodingUTF8 ? ts_decode_utf8 : ts_decode_utf16; |