chore(deps): upgrade to tree-sitter@0.16.7
This commit is contained in:
parent
cca2f85ad5
commit
ea45e670ee
|
@ -1,4 +1,4 @@
|
|||
git clone https://github.com/ikatyang/tree-sitter --branch 0.15.9-custom --depth 1
|
||||
git clone https://github.com/ikatyang/tree-sitter --branch 0.16.7-custom --depth 1
|
||||
cd tree-sitter
|
||||
git submodule update --init
|
||||
./script/build-wasm
|
||||
|
|
56
src/node-types.json
generated
56
src/node-types.json
generated
|
@ -197,7 +197,7 @@
|
|||
"fields": {},
|
||||
"children": {
|
||||
"multiple": true,
|
||||
"required": true,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "escape_sequence",
|
||||
|
@ -253,27 +253,23 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "[",
|
||||
"type": "\"",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "]",
|
||||
"type": "\"\"\"",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "[[",
|
||||
"type": "'",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "]]",
|
||||
"type": "'''",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "=",
|
||||
"type": ",",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
|
@ -281,39 +277,23 @@
|
|||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "\"",
|
||||
"type": "=",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "\"",
|
||||
"type": "[",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "\"\"\"",
|
||||
"type": "[[",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "\"\"\"",
|
||||
"type": "]",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "escape_sequence",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "'",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "'",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "'''",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "'''",
|
||||
"type": "]]",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
|
@ -321,24 +301,24 @@
|
|||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "offset_date_time",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "local_date_time",
|
||||
"type": "escape_sequence",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "local_date",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "local_date_time",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "local_time",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": ",",
|
||||
"named": false
|
||||
"type": "offset_date_time",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "{",
|
||||
|
|
5537
src/parser.c
generated
5537
src/parser.c
generated
File diff suppressed because it is too large
Load diff
42
src/tree_sitter/parser.h
generated
42
src/tree_sitter/parser.h
generated
|
@ -45,7 +45,8 @@ struct TSLexer {
|
|||
void (*advance)(TSLexer *, bool);
|
||||
void (*mark_end)(TSLexer *);
|
||||
uint32_t (*get_column)(TSLexer *);
|
||||
bool (*is_at_included_range_start)(TSLexer *);
|
||||
bool (*is_at_included_range_start)(const TSLexer *);
|
||||
bool (*eof)(const TSLexer *);
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
@ -61,13 +62,13 @@ typedef struct {
|
|||
TSStateId state;
|
||||
bool extra : 1;
|
||||
bool repetition : 1;
|
||||
};
|
||||
} shift;
|
||||
struct {
|
||||
TSSymbol symbol;
|
||||
int16_t dynamic_precedence;
|
||||
uint8_t child_count;
|
||||
uint8_t production_id;
|
||||
};
|
||||
} reduce;
|
||||
} params;
|
||||
TSParseActionType type : 4;
|
||||
} TSParseAction;
|
||||
|
@ -82,7 +83,7 @@ typedef union {
|
|||
struct {
|
||||
uint8_t count;
|
||||
bool reusable : 1;
|
||||
};
|
||||
} entry;
|
||||
} TSParseActionEntry;
|
||||
|
||||
struct TSLanguage {
|
||||
|
@ -114,6 +115,10 @@ struct TSLanguage {
|
|||
const TSFieldMapSlice *field_map_slices;
|
||||
const TSFieldMapEntry *field_map_entries;
|
||||
const char **field_names;
|
||||
uint32_t large_state_count;
|
||||
const uint16_t *small_parse_table;
|
||||
const uint32_t *small_parse_table_map;
|
||||
const TSSymbol *public_symbol_map;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -123,6 +128,7 @@ struct TSLanguage {
|
|||
#define START_LEXER() \
|
||||
bool result = false; \
|
||||
bool skip = false; \
|
||||
bool eof = false; \
|
||||
int32_t lookahead; \
|
||||
goto start; \
|
||||
next_state: \
|
||||
|
@ -155,6 +161,8 @@ struct TSLanguage {
|
|||
* Parse Table Macros
|
||||
*/
|
||||
|
||||
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
|
||||
|
||||
#define STATE(id) id
|
||||
|
||||
#define ACTIONS(id) id
|
||||
|
@ -162,19 +170,25 @@ struct TSLanguage {
|
|||
#define SHIFT(state_value) \
|
||||
{ \
|
||||
{ \
|
||||
.type = TSParseActionTypeShift, \
|
||||
.params = {.state = state_value}, \
|
||||
.params = { \
|
||||
.shift = { \
|
||||
.state = state_value \
|
||||
} \
|
||||
}, \
|
||||
.type = TSParseActionTypeShift \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SHIFT_REPEAT(state_value) \
|
||||
{ \
|
||||
{ \
|
||||
.type = TSParseActionTypeShift, \
|
||||
.params = { \
|
||||
.shift = { \
|
||||
.state = state_value, \
|
||||
.repetition = true \
|
||||
} \
|
||||
}, \
|
||||
.type = TSParseActionTypeShift \
|
||||
} \
|
||||
}
|
||||
|
||||
|
@ -186,20 +200,26 @@ struct TSLanguage {
|
|||
#define SHIFT_EXTRA() \
|
||||
{ \
|
||||
{ \
|
||||
.type = TSParseActionTypeShift, \
|
||||
.params = {.extra = true} \
|
||||
.params = { \
|
||||
.shift = { \
|
||||
.extra = true \
|
||||
} \
|
||||
}, \
|
||||
.type = TSParseActionTypeShift \
|
||||
} \
|
||||
}
|
||||
|
||||
#define REDUCE(symbol_val, child_count_val, ...) \
|
||||
{ \
|
||||
{ \
|
||||
.type = TSParseActionTypeReduce, \
|
||||
.params = { \
|
||||
.reduce = { \
|
||||
.symbol = symbol_val, \
|
||||
.child_count = child_count_val, \
|
||||
__VA_ARGS__ \
|
||||
} \
|
||||
}, \
|
||||
}, \
|
||||
.type = TSParseActionTypeReduce \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue