Add version number to TSLanguage structs

This commit is contained in:
Max Brunsfeld 2017-01-31 10:21:47 -08:00
parent 672d491775
commit d853b6504d
6 changed files with 24 additions and 1 deletions

View file

@ -65,6 +65,7 @@ typedef union {
} TSParseActionEntry;
typedef struct TSLanguage {
uint32_t version;
uint32_t symbol_count;
uint32_t token_count;
uint32_t external_token_count;
@ -166,6 +167,7 @@ typedef struct TSLanguage {
#define GET_LANGUAGE(...) \
static TSLanguage language = { \
.version = LANGUAGE_VERSION, \
.symbol_count = SYMBOL_COUNT, \
.token_count = TOKEN_COUNT, \
.symbol_metadata = ts_symbol_metadata, \