maybe increment line and column here?

This commit is contained in:
joshvera 2015-11-12 13:25:35 -05:00
parent e3936e71fd
commit e60ab58187

View file

@ -68,6 +68,13 @@ static bool ts_lexer__advance(TSLexer *self, TSStateId state) {
if (self->lookahead_size) {
self->current_position.bytes += self->lookahead_size;
self->current_position.chars += 1;
if (self->lookahead == '\n') {
self->current_source_info.line += 1;
self->current_source_info.column = 0;
} else {
self->current_source_info.column += 1;
}
}
if (self->current_position.bytes >= self->chunk_start + self->chunk_size)