From 4cbc4b8bcf1acc16b351f37bfb76af1b6ffaf5cd Mon Sep 17 00:00:00 2001 From: joshvera Date: Mon, 30 Nov 2015 12:16:58 -0500 Subject: [PATCH] Revert "try starting from 1" This reverts commit 11efff2442ce3dc430bbe80e9a864994598af2df. --- src/runtime/length.h | 2 +- src/runtime/lexer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/length.h b/src/runtime/length.h index fe7f4b12..a3a574e6 100644 --- a/src/runtime/length.h +++ b/src/runtime/length.h @@ -63,7 +63,7 @@ static inline bool ts_length_eq(TSLength len1, TSLength len2) { } static inline TSPoint ts_point_zero() { - return (TSPoint){ .row = 1, .column = 1 }; + return (TSPoint){ .row = 0, .column = 0 }; } static inline TSPoint ts_point_make(size_t row, size_t column) { diff --git a/src/runtime/lexer.c b/src/runtime/lexer.c index 27426f48..5a6fcf1d 100644 --- a/src/runtime/lexer.c +++ b/src/runtime/lexer.c @@ -71,7 +71,7 @@ static bool ts_lexer__advance(TSLexer *self, TSStateId state) { if (self->lookahead == '\n') { self->current_point.row += 1; - self->current_point.column = 1; + self->current_point.column = 0; } else { self->current_point.column += 1; }