Restore external scanner's state only after repositioning lexer

Also, properly identify the leaf node with the external token state
This commit is contained in:
Max Brunsfeld 2016-12-21 13:59:56 -08:00
parent 3706678b89
commit 2fa7b453c8
5 changed files with 38 additions and 4 deletions

View file

@ -25,6 +25,8 @@ typedef struct {
TSInput input;
TSLogger logger;
char debug_buffer[TS_DEBUG_BUFFER_SIZE];
bool needs_to_restore_external_scanner;
uint32_t last_external_token_end_byte;
} Lexer;
void ts_lexer_init(Lexer *);