chore: sync generation w/ upstream ts

This commit is contained in:
Amaan Qureshi
2023-11-07 04:49:21 -05:00
committed by Michael Hoffmann
parent 573e5bd076
commit 229d8e50ab
6 changed files with 16534 additions and 16443 deletions

View File

@@ -5,8 +5,17 @@
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
},
{
"type": "SYMBOL",
"name": "object"
}
]
},
{
"type": "BLANK"

View File

@@ -202,6 +202,10 @@
{
"type": "body",
"named": true
},
{
"type": "object",
"named": true
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -13,9 +13,8 @@ extern "C" {
#define ts_builtin_sym_end 0
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
typedef uint16_t TSStateId;
#ifndef TREE_SITTER_API_H_
typedef uint16_t TSStateId;
typedef uint16_t TSSymbol;
typedef uint16_t TSFieldId;
typedef struct TSLanguage TSLanguage;
@@ -140,7 +139,8 @@ struct TSLanguage {
lexer->advance(lexer, skip); \
start: \
skip = false; \
lookahead = lexer->lookahead;
lookahead = lexer->lookahead; \
eof = lexer->eof(lexer);
#define ADVANCE(state_value) \
{ \
@@ -166,7 +166,7 @@ struct TSLanguage {
* Parse Table Macros
*/
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT)
#define STATE(id) id
@@ -176,7 +176,7 @@ struct TSLanguage {
{{ \
.shift = { \
.type = TSParseActionTypeShift, \
.state = state_value \
.state = (state_value) \
} \
}}
@@ -184,7 +184,7 @@ struct TSLanguage {
{{ \
.shift = { \
.type = TSParseActionTypeShift, \
.state = state_value, \
.state = (state_value), \
.repetition = true \
} \
}}