Always invalidate old chunk of text when parsing after an edit
This commit is contained in:
parent
c0073c5b72
commit
36c2b685b9
5 changed files with 38 additions and 6 deletions
|
|
@ -132,6 +132,9 @@ static inline void ts_lexer__reset(Lexer *self, Length position) {
|
|||
|
||||
void ts_lexer_set_input(Lexer *self, TSInput input) {
|
||||
self->input = input;
|
||||
self->chunk = 0;
|
||||
self->chunk_start = 0;
|
||||
self->chunk_size = 0;
|
||||
ts_lexer__reset(self, length_zero());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
if (self->lexer.logger.log || self->print_debugging_graphs) { \
|
||||
snprintf(self->lexer.debug_buffer, TREE_SITTER_SERIALIZATION_BUFFER_SIZE, __VA_ARGS__); \
|
||||
parser__log(self); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LOG_STACK() \
|
||||
if (self->print_debugging_graphs) { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue