Include rows and columns in TSLength

This way, we don't have to have separate 1D and 2D versions for so many values
This commit is contained in:
Max Brunsfeld 2015-12-04 20:20:29 -08:00
parent 22c76fc71b
commit d2bf88d5fe
14 changed files with 186 additions and 241 deletions

View file

@ -19,6 +19,8 @@ typedef unsigned short TSStateId;
typedef struct {
size_t bytes;
size_t chars;
size_t rows;
size_t columns;
} TSLength;
typedef struct {
@ -42,10 +44,6 @@ typedef struct TSLexer {
TSLength token_end_position;
TSLength token_start_position;
TSPoint current_point;
TSPoint token_end_point;
TSPoint token_start_point;
size_t lookahead_size;
int32_t lookahead;