⬆️ tree-sitter-cli (new ABI version)

This commit is contained in:
Max Brunsfeld 2018-07-18 13:19:42 -07:00
parent d4d694d66c
commit 7873b864b1
3 changed files with 10 additions and 7 deletions

View File

@ -13,7 +13,7 @@
"nan": "^2.10.0" "nan": "^2.10.0"
}, },
"devDependencies": { "devDependencies": {
"tree-sitter-cli": "^0.12.6" "tree-sitter-cli": "^0.13.1"
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",

2
src/parser.c vendored
View File

@ -5,7 +5,7 @@
#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif #endif
#define LANGUAGE_VERSION 8 #define LANGUAGE_VERSION 9
#define STATE_COUNT 2830 #define STATE_COUNT 2830
#define SYMBOL_COUNT 144 #define SYMBOL_COUNT 144
#define ALIAS_COUNT 5 #define ALIAS_COUNT 5

View File

@ -25,13 +25,16 @@ typedef struct {
bool named : 1; bool named : 1;
} TSSymbolMetadata; } TSSymbolMetadata;
typedef struct { typedef struct TSLexer TSLexer;
void (*advance)(void *, bool);
void (*mark_end)(void *); struct TSLexer {
uint32_t (*get_column)(void *);
int32_t lookahead; int32_t lookahead;
TSSymbol result_symbol; TSSymbol result_symbol;
} TSLexer; void (*advance)(TSLexer *, bool);
void (*mark_end)(TSLexer *);
uint32_t (*get_column)(TSLexer *);
bool (*is_at_included_range_start)(TSLexer *);
};
typedef enum { typedef enum {
TSParseActionTypeShift, TSParseActionTypeShift,