⬆️ tree-sitter

This commit is contained in:
Max Brunsfeld 2018-03-05 17:44:34 -08:00
parent 98123999d3
commit 90552dc38b
3 changed files with 11 additions and 12 deletions

View File

@ -13,7 +13,7 @@
"nan": "^2.4.0" "nan": "^2.4.0"
}, },
"devDependencies": { "devDependencies": {
"tree-sitter-cli": "^0.9.0" "tree-sitter-cli": "^0.10.1"
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",

18
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 5 #define LANGUAGE_VERSION 6
#define STATE_COUNT 4639 #define STATE_COUNT 4639
#define SYMBOL_COUNT 136 #define SYMBOL_COUNT 136
#define ALIAS_COUNT 5 #define ALIAS_COUNT 5
@ -112503,9 +112503,9 @@ static TSParseActionEntry ts_parse_actions[] = {
[374] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(20), [374] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(20),
[376] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(21), [376] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(21),
[378] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(22), [378] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(22),
[380] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_command_repeat1, 1, .fragile = true), [380] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_command_repeat1, 1),
[382] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_command_repeat1, 1, .fragile = true), [382] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_command_repeat1, 1),
[384] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_command_repeat1, 1, .fragile = true), [384] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_command_repeat1, 1),
[386] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 1), [386] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 1),
[388] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(212), [388] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(212),
[390] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(15), [390] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(15),
@ -112864,9 +112864,9 @@ static TSParseActionEntry ts_parse_actions[] = {
[1096] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(183), [1096] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(183),
[1098] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(600), [1098] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(600),
[1100] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(601), [1100] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(601),
[1102] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym__terminated_statement, 2, .fragile = true), [1102] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym__terminated_statement, 2),
[1104] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym__terminated_statement, 2, .fragile = true), [1104] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym__terminated_statement, 2),
[1106] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym__terminated_statement, 2, .fragile = true), [1106] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym__terminated_statement, 2),
[1108] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(606), [1108] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(606),
[1110] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(606), [1110] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(606),
[1112] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(607), [1112] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(607),
@ -113481,7 +113481,7 @@ static TSParseActionEntry ts_parse_actions[] = {
[2402] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_process_substitution, 3), [2402] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_process_substitution, 3),
[2404] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_process_substitution, 3), [2404] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_process_substitution, 3),
[2406] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), [2406] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3),
[2408] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3, .fragile = true), [2408] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3),
[2410] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1201), [2410] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1201),
[2412] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(1202), [2412] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(1202),
[2414] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1202), [2414] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1202),
@ -114078,7 +114078,7 @@ static TSParseActionEntry ts_parse_actions[] = {
[3678] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(1753), [3678] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(1753),
[3680] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_pipeline, 3), [3680] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_pipeline, 3),
[3682] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), [3682] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3),
[3684] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_list, 3, .fragile = true), [3684] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_list, 3),
[3686] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1755), [3686] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1755),
[3688] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(1756), [3688] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(1756),
[3690] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1756), [3690] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(1756),

View File

@ -47,8 +47,7 @@ typedef struct {
TSSymbol symbol; TSSymbol symbol;
int16_t dynamic_precedence; int16_t dynamic_precedence;
uint8_t child_count; uint8_t child_count;
uint8_t alias_sequence_id : 7; uint8_t alias_sequence_id;
bool fragile : 1;
}; };
} params; } params;
TSParseActionType type : 4; TSParseActionType type : 4;