Fix code paths that still conflated null characters with EOF

This commit is contained in:
Max Brunsfeld 2019-12-06 15:26:57 -08:00
parent 47a926067d
commit 0cb2ef1082
4 changed files with 15 additions and 4 deletions

View file

@ -439,7 +439,7 @@ static Subtree ts_parser__lex(
}
if (self->lexer.current_position.bytes == error_end_position.bytes) {
if (self->lexer.data.lookahead == 0) {
if (self->lexer.data.eof(&self->lexer.data)) {
self->lexer.data.result_symbol = ts_builtin_sym_error;
break;
}