From ebb642cb144c77753ac7a9aefec34f03af7e3799 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 10 Apr 2024 15:30:57 +0000 Subject: [PATCH 01/20] Rename to 'tree-sitter-bp' This is really just to simplify my life and align with the Vim/NeoVim filetype name. --- .gitignore | 2 +- Cargo.toml | 4 ++-- README.md | 2 +- binding.gyp | 2 +- bindings/node/binding.cc | 8 ++++---- bindings/node/index.js | 4 ++-- bindings/rust/lib.rs | 10 +++++----- flake.nix | 6 +++--- grammar.js | 2 +- package.json | 4 ++-- src/grammar.json | 2 +- src/parser.c | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 244f59a..f565f65 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ /.pre-commit-config.yaml # Tree-sitter artifact -/tree-sitter-blueprint.wasm +/tree-sitter-bp.wasm # Rust bindings /target diff --git a/Cargo.toml b/Cargo.toml index 9e95645..28da48a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "tree-sitter-blueprint" +name = "tree-sitter-bp" description = "Blueprint grammar for the tree-sitter parsing library" version = "0.1.0" keywords = ["incremental", "parsing", "android", "blueprint"] categories = ["parsing", "text-editors"] -repository = "https://git.belanyi.fr/ambroisie/tree-sitter-blueprint" +repository = "https://git.belanyi.fr/ambroisie/tree-sitter-bp" edition = "2018" license = "MIT" diff --git a/README.md b/README.md index 0a33789..129e93d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# tree-sitter-blueprint +# tree-sitter-bp Tree-sitter grammar for [Blueprint][blueprint-aosp], the meta-build system used in AOSP for its `Android.bp` files. diff --git a/binding.gyp b/binding.gyp index c94ea72..be4507b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "tree_sitter_blueprint_binding", + "target_name": "tree_sitter_bp_binding", "include_dirs": [ " exports, Local module) { Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_blueprint()); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_bp()); - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("blueprint").ToLocalChecked()); + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("bp").ToLocalChecked()); Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); } -NODE_MODULE(tree_sitter_blueprint_binding, Init) +NODE_MODULE(tree_sitter_bp_binding, Init) } // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js index 3b30fe6..9bd9a6e 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,11 +1,11 @@ try { - module.exports = require("../../build/Release/tree_sitter_blueprint_binding"); + module.exports = require("../../build/Release/tree_sitter_bp_binding"); } catch (error1) { if (error1.code !== 'MODULE_NOT_FOUND') { throw error1; } try { - module.exports = require("../../build/Debug/tree_sitter_blueprint_binding"); + module.exports = require("../../build/Debug/tree_sitter_bp_binding"); } catch (error2) { if (error2.code !== 'MODULE_NOT_FOUND') { throw error2; diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 5f3b8ca..22bfdfc 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,4 +1,4 @@ -//! This crate provides blueprint support for the [tree-sitter][] parsing library. +//! This crate provides bp support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: @@ -6,7 +6,7 @@ //! ``` //! let code = ""; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_blueprint::language()).expect("Error loading txtpb grammar"); +//! parser.set_language(tree_sitter_bp::language()).expect("Error loading txtpb grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -18,14 +18,14 @@ use tree_sitter::Language; extern "C" { - fn tree_sitter_blueprint() -> Language; + fn tree_sitter_bp() -> Language; } /// Get the tree-sitter [Language][] for this grammar. /// /// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html pub fn language() -> Language { - unsafe { tree_sitter_blueprint() } + unsafe { tree_sitter_bp() } } /// The content of the [`node-types.json`][] file for this grammar. @@ -47,6 +47,6 @@ mod tests { let mut parser = tree_sitter::Parser::new(); parser .set_language(super::language()) - .expect("Error loading blueprint language"); + .expect("Error loading bp language"); } } diff --git a/flake.nix b/flake.nix index e7053c4..2ac4027 100644 --- a/flake.nix +++ b/flake.nix @@ -122,9 +122,9 @@ }; packages = { - default = packages.tree-sitter-blueprint; + default = packages.tree-sitter-bp; - inherit (pkgs.tree-sitter.passthru.builtGrammars) tree-sitter-blueprint; + inherit (pkgs.tree-sitter.passthru.builtGrammars) tree-sitter-bp; inherit (pkgs) tree-sitter; }; @@ -133,7 +133,7 @@ default = final: prev: { tree-sitter = prev.tree-sitter.override { extraGrammars = { - tree-sitter-blueprint = { + tree-sitter-bp = { src = ./.; }; }; diff --git a/grammar.js b/grammar.js index 929f36e..a22f3d7 100644 --- a/grammar.js +++ b/grammar.js @@ -7,7 +7,7 @@ function trailingCommaSeparated(elem) { } module.exports = grammar({ - name: "blueprint", + name: "bp", extras: ($) => [ /\s+/, diff --git a/package.json b/package.json index 3db073a..5b2c53d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "tree-sitter-blueprint", + "name": "tree-sitter-bp", "version": "0.1.0", "description": "Blueprint grammar for tree-sitter", "main": "bindings/node", @@ -18,7 +18,7 @@ }, "tree-sitter": [ { - "scope": "source.blueprint", + "scope": "source.bp", "file-types": [ "bp" ], diff --git a/src/grammar.json b/src/grammar.json index 2ac5436..84c6bce 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,5 +1,5 @@ { - "name": "blueprint", + "name": "bp", "rules": { "source_file": { "type": "REPEAT", diff --git a/src/parser.c b/src/parser.c index f7c2b6f..5171d84 100644 --- a/src/parser.c +++ b/src/parser.c @@ -7926,7 +7926,7 @@ extern "C" { #define extern __declspec(dllexport) #endif -extern const TSLanguage *tree_sitter_blueprint(void) { +extern const TSLanguage *tree_sitter_bp(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, From dc1d139d35a843fbd2849588b8ed95a24cf2974a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:00:12 +0100 Subject: [PATCH 02/20] Fix 'PHONY' target name --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e421948..cd607dd 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ -.PHONE: all +.PHONY: all all: tree-sitter generate -.PHONE: test +.PHONY: test test: all tree-sitter test --apply-all-captures -.PHONE: update-tests +.PHONY: update-tests update-tests: all tree-sitter test -u --apply-all-captures From 508ea00920ca364d3ca9e3a0c59464da6a0e8919 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:01:32 +0100 Subject: [PATCH 03/20] Add missing 'PHONY' target --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index cd607dd..4d5ad28 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ test: all update-tests: all tree-sitter test -u --apply-all-captures +.PHONY: playground playground: nix shell pkgs#emscripten --command tree-sitter build-wasm tree-sitter playground From aa8472e73f3c158effeb0ce5dbb67a0e351209be Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:08:40 +0100 Subject: [PATCH 04/20] Add test for literals --- test/corpus/literals.txt | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 test/corpus/literals.txt diff --git a/test/corpus/literals.txt b/test/corpus/literals.txt new file mode 100644 index 0000000..b1c3fba --- /dev/null +++ b/test/corpus/literals.txt @@ -0,0 +1,134 @@ +================================================================================ +Booelan literal +================================================================================ + +foo = true + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (boolean_literal))) + +================================================================================ +Integer literal +================================================================================ + +foo = 42 + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (integer_literal))) + +================================================================================ +String literal +================================================================================ + +foo = "Hello World!" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal))) + +================================================================================ +String literal special character escapes +================================================================================ + +foo = "Hello\nWorld!" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (escape_sequence)))) + +================================================================================ +String literal octal +================================================================================ + +foo = "Hello World\041" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (escape_sequence)))) + +================================================================================ +String literal hex +================================================================================ + +foo = "Hello World\x21" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (escape_sequence)))) + +================================================================================ +String literal character escapes +================================================================================ + +foo = "Hello\\\"World\"" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (escape_sequence) + (escape_sequence) + (escape_sequence)))) + +================================================================================ +Unterminated string literal +================================================================================ + +foo = " + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (MISSING """)))) + +================================================================================ +String literal unterminated escape +================================================================================ + +foo = "\" + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (interpreted_string_literal + (escape_sequence) + (MISSING """)))) From b62fc19da96abc6de1bf3e6c3b93bc4cb731d8af Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:33:52 +0100 Subject: [PATCH 05/20] Make comments a single node in the grammar This looks to be a *strong* idiom in tree-sitter parsers. --- grammar.js | 10 +- queries/highlights.scm | 5 +- src/grammar.json | 57 +- src/node-types.json | 9 +- src/parser.c | 1208 +++++++++++++++++--------------------- test/corpus/comments.txt | 22 +- 6 files changed, 588 insertions(+), 723 deletions(-) diff --git a/grammar.js b/grammar.js index a22f3d7..d63d58e 100644 --- a/grammar.js +++ b/grammar.js @@ -11,8 +11,7 @@ module.exports = grammar({ extras: ($) => [ /\s+/, - $.line_comment, - $.block_comment, + $.comment, ], rules: { @@ -23,9 +22,10 @@ module.exports = grammar({ $.module, ), - line_comment: (_) => seq("//", /[^\n]*/), - - block_comment: (_) => seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, '/'), + comment: (_) => choice( + seq("//", /[^\n]*/), + seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, '/'), + ), // Definitions {{{ diff --git a/queries/highlights.scm b/queries/highlights.scm index 17c5692..e548e18 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -1,7 +1,4 @@ -[ - (line_comment) - (block_comment) -] @comment +(comment) @comment ; Operators {{{ (operator) @operator diff --git a/src/grammar.json b/src/grammar.json index 84c6bce..3dc19bc 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -21,33 +21,38 @@ } ] }, - "line_comment": { - "type": "SEQ", + "comment": { + "type": "CHOICE", "members": [ { - "type": "STRING", - "value": "//" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "PATTERN", + "value": "[^\\n]*" + } + ] }, { - "type": "PATTERN", - "value": "[^\\n]*" - } - ] - }, - "block_comment": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "/*" - }, - { - "type": "PATTERN", - "value": "[^*]*\\*+([^/*][^*]*\\*+)*" - }, - { - "type": "STRING", - "value": "/" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "PATTERN", + "value": "[^*]*\\*+([^/*][^*]*\\*+)*" + }, + { + "type": "STRING", + "value": "/" + } + ] } ] }, @@ -956,11 +961,7 @@ }, { "type": "SYMBOL", - "name": "line_comment" - }, - { - "type": "SYMBOL", - "name": "block_comment" + "name": "comment" } ], "conflicts": [], diff --git a/src/node-types.json b/src/node-types.json index 0a7db28..1db28a2 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -168,12 +168,12 @@ } }, { - "type": "block_comment", + "type": "boolean_literal", "named": true, "fields": {} }, { - "type": "boolean_literal", + "type": "comment", "named": true, "fields": {} }, @@ -259,11 +259,6 @@ ] } }, - { - "type": "line_comment", - "named": true, - "fields": {} - }, { "type": "list_expression", "named": true, diff --git a/src/parser.c b/src/parser.c index 5171d84..63ff83c 100644 --- a/src/parser.c +++ b/src/parser.c @@ -8,7 +8,7 @@ #define LANGUAGE_VERSION 14 #define STATE_COUNT 123 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 65 +#define SYMBOL_COUNT 64 #define ALIAS_COUNT 0 #define TOKEN_COUNT 34 #define EXTERNAL_TOKEN_COUNT 0 @@ -18,9 +18,9 @@ enum ts_symbol_identifiers { anon_sym_SLASH_SLASH = 1, - aux_sym_line_comment_token1 = 2, + aux_sym_comment_token1 = 2, anon_sym_SLASH_STAR = 3, - aux_sym_block_comment_token1 = 4, + aux_sym_comment_token2 = 4, anon_sym_SLASH = 5, anon_sym_EQ = 6, anon_sym_PLUS_EQ = 7, @@ -52,43 +52,42 @@ enum ts_symbol_identifiers { anon_sym_PLUS = 33, sym_source_file = 34, sym__definition = 35, - sym_line_comment = 36, - sym_block_comment = 37, - sym_assignment = 38, - sym_module = 39, - sym__old_module = 40, - sym__new_module = 41, - sym__expr = 42, - sym_boolean_literal = 43, - sym_integer_literal = 44, - sym__string_literal = 45, - sym_interpreted_string_literal = 46, - sym_select_expression = 47, - sym_select_value = 48, - sym_soong_config_variable = 49, - sym_select_cases = 50, - sym_select_case = 51, - sym_default_case = 52, - sym__case_value = 53, - sym_list_expression = 54, - sym_map_expression = 55, - sym_binary_expression = 56, - sym__colon_property = 57, - sym__equal_property = 58, - aux_sym_source_file_repeat1 = 59, - aux_sym__old_module_repeat1 = 60, - aux_sym__new_module_repeat1 = 61, - aux_sym_interpreted_string_literal_repeat1 = 62, - aux_sym_select_cases_repeat1 = 63, - aux_sym_list_expression_repeat1 = 64, + sym_comment = 36, + sym_assignment = 37, + sym_module = 38, + sym__old_module = 39, + sym__new_module = 40, + sym__expr = 41, + sym_boolean_literal = 42, + sym_integer_literal = 43, + sym__string_literal = 44, + sym_interpreted_string_literal = 45, + sym_select_expression = 46, + sym_select_value = 47, + sym_soong_config_variable = 48, + sym_select_cases = 49, + sym_select_case = 50, + sym_default_case = 51, + sym__case_value = 52, + sym_list_expression = 53, + sym_map_expression = 54, + sym_binary_expression = 55, + sym__colon_property = 56, + sym__equal_property = 57, + aux_sym_source_file_repeat1 = 58, + aux_sym__old_module_repeat1 = 59, + aux_sym__new_module_repeat1 = 60, + aux_sym_interpreted_string_literal_repeat1 = 61, + aux_sym_select_cases_repeat1 = 62, + aux_sym_list_expression_repeat1 = 63, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", [anon_sym_SLASH_SLASH] = "//", - [aux_sym_line_comment_token1] = "line_comment_token1", + [aux_sym_comment_token1] = "comment_token1", [anon_sym_SLASH_STAR] = "/*", - [aux_sym_block_comment_token1] = "block_comment_token1", + [aux_sym_comment_token2] = "comment_token2", [anon_sym_SLASH] = "/", [anon_sym_EQ] = "=", [anon_sym_PLUS_EQ] = "operator", @@ -120,8 +119,7 @@ static const char * const ts_symbol_names[] = { [anon_sym_PLUS] = "operator", [sym_source_file] = "source_file", [sym__definition] = "_definition", - [sym_line_comment] = "line_comment", - [sym_block_comment] = "block_comment", + [sym_comment] = "comment", [sym_assignment] = "assignment", [sym_module] = "module", [sym__old_module] = "_old_module", @@ -154,9 +152,9 @@ static const char * const ts_symbol_names[] = { static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, [anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH, - [aux_sym_line_comment_token1] = aux_sym_line_comment_token1, + [aux_sym_comment_token1] = aux_sym_comment_token1, [anon_sym_SLASH_STAR] = anon_sym_SLASH_STAR, - [aux_sym_block_comment_token1] = aux_sym_block_comment_token1, + [aux_sym_comment_token2] = aux_sym_comment_token2, [anon_sym_SLASH] = anon_sym_SLASH, [anon_sym_EQ] = anon_sym_EQ, [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, @@ -188,8 +186,7 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_PLUS] = anon_sym_PLUS_EQ, [sym_source_file] = sym_source_file, [sym__definition] = sym__definition, - [sym_line_comment] = sym_line_comment, - [sym_block_comment] = sym_block_comment, + [sym_comment] = sym_comment, [sym_assignment] = sym_assignment, [sym_module] = sym_module, [sym__old_module] = sym__old_module, @@ -228,7 +225,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [aux_sym_line_comment_token1] = { + [aux_sym_comment_token1] = { .visible = false, .named = false, }, @@ -236,7 +233,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [aux_sym_block_comment_token1] = { + [aux_sym_comment_token2] = { .visible = false, .named = false, }, @@ -364,11 +361,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [sym_line_comment] = { - .visible = true, - .named = true, - }, - [sym_block_comment] = { + [sym_comment] = { .visible = true, .named = true, }, @@ -5012,14 +5005,14 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead != '\n') ADVANCE(93); END_STATE(); case 91: - ACCEPT_TOKEN(aux_sym_line_comment_token1); + ACCEPT_TOKEN(aux_sym_comment_token1); if (lookahead == '*') ADVANCE(97); if (lookahead == '/') ADVANCE(90); if (lookahead != 0 && lookahead != '\n') ADVANCE(93); END_STATE(); case 92: - ACCEPT_TOKEN(aux_sym_line_comment_token1); + ACCEPT_TOKEN(aux_sym_comment_token1); if (lookahead == '/') ADVANCE(91); if (lookahead == '\t' || (11 <= lookahead && lookahead <= '\r') || @@ -5028,7 +5021,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead != '\n') ADVANCE(93); END_STATE(); case 93: - ACCEPT_TOKEN(aux_sym_line_comment_token1); + ACCEPT_TOKEN(aux_sym_comment_token1); if (lookahead != 0 && lookahead != '\n') ADVANCE(93); END_STATE(); @@ -5054,7 +5047,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead != '\n') ADVANCE(93); END_STATE(); case 98: - ACCEPT_TOKEN(aux_sym_block_comment_token1); + ACCEPT_TOKEN(aux_sym_comment_token2); if (lookahead == '*') ADVANCE(98); if (lookahead != 0 && lookahead != '/') ADVANCE(8); @@ -5734,8 +5727,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { - [sym_line_comment] = STATE(0), - [sym_block_comment] = STATE(0), + [sym_comment] = STATE(0), [ts_builtin_sym_end] = ACTIONS(1), [anon_sym_SLASH_SLASH] = ACTIONS(3), [anon_sym_SLASH_STAR] = ACTIONS(5), @@ -5771,8 +5763,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [1] = { [sym_source_file] = STATE(110), [sym__definition] = STATE(77), - [sym_line_comment] = STATE(1), - [sym_block_comment] = STATE(1), + [sym_comment] = STATE(1), [sym_assignment] = STATE(79), [sym_module] = STATE(79), [sym__old_module] = STATE(80), @@ -5809,6 +5800,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_unset, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(2), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(75), 1, @@ -5818,9 +5811,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(2), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -5829,7 +5819,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [60] = 17, + [59] = 17, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5852,6 +5842,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_unset, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(3), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(75), 1, @@ -5861,9 +5853,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(3), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -5872,7 +5861,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [120] = 16, + [118] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5895,6 +5884,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_RBRACK, + STATE(4), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(56), 1, @@ -5902,9 +5893,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(4), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -5913,7 +5901,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [177] = 16, + [174] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5936,6 +5924,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(33), 1, anon_sym_RBRACK, + STATE(5), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(42), 1, @@ -5943,9 +5933,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(5), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -5954,7 +5941,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [234] = 16, + [230] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5977,6 +5964,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(35), 1, anon_sym_RBRACK, + STATE(6), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(56), 1, @@ -5984,9 +5973,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(6), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -5995,7 +5981,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [291] = 15, + [286] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6016,6 +6002,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_select, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(7), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(65), 1, @@ -6023,9 +6011,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(7), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -6034,7 +6019,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [345] = 15, + [339] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6055,6 +6040,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_select, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(8), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(62), 1, @@ -6062,9 +6049,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(8), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -6073,7 +6057,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [399] = 15, + [392] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6094,6 +6078,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_select, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(9), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(28), 1, @@ -6101,9 +6087,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(9), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -6112,7 +6095,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [453] = 15, + [445] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6133,6 +6116,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_select, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(10), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(56), 1, @@ -6140,9 +6125,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(10), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -6151,7 +6133,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [507] = 15, + [498] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6172,6 +6154,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_select, ACTIONS(29), 1, anon_sym_LBRACK, + STATE(11), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(58), 1, @@ -6179,9 +6163,6 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(11), 2, - sym_line_comment, - sym_block_comment, STATE(26), 7, sym_boolean_literal, sym_integer_literal, @@ -6190,7 +6171,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [561] = 12, + [551] = 12, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6203,6 +6184,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, ACTIONS(39), 1, anon_sym_default, + STATE(12), 1, + sym_comment, STATE(14), 1, aux_sym_select_cases_repeat1, STATE(19), 1, @@ -6213,10 +6196,7 @@ static const uint16_t ts_small_parse_table[] = { sym_select_case, STATE(113), 1, sym_default_case, - STATE(12), 2, - sym_line_comment, - sym_block_comment, - [599] = 12, + [588] = 12, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6231,6 +6211,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, STATE(12), 1, aux_sym_select_cases_repeat1, + STATE(13), 1, + sym_comment, STATE(19), 1, sym_interpreted_string_literal, STATE(102), 1, @@ -6239,10 +6221,7 @@ static const uint16_t ts_small_parse_table[] = { sym_select_case, STATE(104), 1, sym_default_case, - STATE(13), 2, - sym_line_comment, - sym_block_comment, - [637] = 9, + [625] = 9, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6260,18 +6239,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(43), 2, anon_sym_RBRACE, anon_sym_default, - STATE(14), 3, - sym_line_comment, - sym_block_comment, + STATE(14), 2, + sym_comment, aux_sym_select_cases_repeat1, - [668] = 4, + [655] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(15), 2, - sym_line_comment, - sym_block_comment, + STATE(15), 1, + sym_comment, ACTIONS(51), 8, ts_builtin_sym_end, anon_sym_COMMA, @@ -6281,14 +6258,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON, anon_sym_RBRACK, anon_sym_PLUS, - [689] = 4, + [675] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(16), 2, - sym_line_comment, - sym_block_comment, + STATE(16), 1, + sym_comment, ACTIONS(53), 8, ts_builtin_sym_end, anon_sym_COMMA, @@ -6298,7 +6274,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON, anon_sym_RBRACK, anon_sym_PLUS, - [710] = 10, + [695] = 10, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6307,6 +6283,8 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(55), 1, ts_builtin_sym_end, + STATE(17), 1, + sym_comment, STATE(18), 1, aux_sym_source_file_repeat1, STATE(77), 1, @@ -6315,13 +6293,10 @@ static const uint16_t ts_small_parse_table[] = { sym__old_module, STATE(84), 1, sym__new_module, - STATE(17), 2, - sym_line_comment, - sym_block_comment, STATE(79), 2, sym_assignment, sym_module, - [743] = 9, + [727] = 9, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6336,21 +6311,19 @@ static const uint16_t ts_small_parse_table[] = { sym__old_module, STATE(84), 1, sym__new_module, + STATE(18), 2, + sym_comment, + aux_sym_source_file_repeat1, STATE(79), 2, sym_assignment, sym_module, - STATE(18), 3, - sym_line_comment, - sym_block_comment, - aux_sym_source_file_repeat1, - [774] = 4, + [757] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(19), 2, - sym_line_comment, - sym_block_comment, + STATE(19), 1, + sym_comment, ACTIONS(62), 8, ts_builtin_sym_end, anon_sym_COMMA, @@ -6360,14 +6333,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON, anon_sym_RBRACK, anon_sym_PLUS, - [795] = 4, + [777] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(20), 2, - sym_line_comment, - sym_block_comment, + STATE(20), 1, + sym_comment, ACTIONS(64), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6376,30 +6348,28 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, + [796] = 4, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + STATE(21), 1, + sym_comment, + ACTIONS(66), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_RPAREN, + sym_identifier, + anon_sym_RBRACK, + anon_sym_PLUS, [815] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(21), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(66), 7, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_RBRACE, - anon_sym_RPAREN, - sym_identifier, - anon_sym_RBRACK, - anon_sym_PLUS, - [835] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - STATE(22), 2, - sym_line_comment, - sym_block_comment, + STATE(22), 1, + sym_comment, ACTIONS(68), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6408,14 +6378,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [855] = 4, + [834] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(23), 2, - sym_line_comment, - sym_block_comment, + STATE(23), 1, + sym_comment, ACTIONS(70), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6424,14 +6393,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [875] = 4, + [853] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(24), 2, - sym_line_comment, - sym_block_comment, + STATE(24), 1, + sym_comment, ACTIONS(72), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6440,14 +6408,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [895] = 4, + [872] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(25), 2, - sym_line_comment, - sym_block_comment, + STATE(25), 1, + sym_comment, ACTIONS(74), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6456,14 +6423,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [915] = 4, + [891] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(26), 2, - sym_line_comment, - sym_block_comment, + STATE(26), 1, + sym_comment, ACTIONS(76), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6472,14 +6438,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [935] = 4, + [910] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(27), 2, - sym_line_comment, - sym_block_comment, + STATE(27), 1, + sym_comment, ACTIONS(78), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6488,14 +6453,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [955] = 4, + [929] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(28), 2, - sym_line_comment, - sym_block_comment, + STATE(28), 1, + sym_comment, ACTIONS(80), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6504,14 +6468,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [975] = 4, + [948] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(29), 2, - sym_line_comment, - sym_block_comment, + STATE(29), 1, + sym_comment, ACTIONS(82), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6520,14 +6483,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [995] = 4, + [967] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(30), 2, - sym_line_comment, - sym_block_comment, + STATE(30), 1, + sym_comment, ACTIONS(84), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6536,14 +6498,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1015] = 4, + [986] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(31), 2, - sym_line_comment, - sym_block_comment, + STATE(31), 1, + sym_comment, ACTIONS(86), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6552,14 +6513,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1035] = 4, + [1005] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(32), 2, - sym_line_comment, - sym_block_comment, + STATE(32), 1, + sym_comment, ACTIONS(88), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6568,14 +6528,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1055] = 4, + [1024] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(33), 2, - sym_line_comment, - sym_block_comment, + STATE(33), 1, + sym_comment, ACTIONS(90), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6584,14 +6543,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1075] = 4, + [1043] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(34), 2, - sym_line_comment, - sym_block_comment, + STATE(34), 1, + sym_comment, ACTIONS(92), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6600,14 +6558,13 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1095] = 4, + [1062] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(35), 2, - sym_line_comment, - sym_block_comment, + STATE(35), 1, + sym_comment, ACTIONS(94), 7, ts_builtin_sym_end, anon_sym_COMMA, @@ -6616,16 +6573,15 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1115] = 6, + [1081] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(98), 1, anon_sym_soong_config_variable, - STATE(36), 2, - sym_line_comment, - sym_block_comment, + STATE(36), 1, + sym_comment, STATE(98), 2, sym_select_value, sym_soong_config_variable, @@ -6633,7 +6589,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_product_variable, anon_sym_release_variable, anon_sym_variant, - [1138] = 7, + [1103] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6644,12 +6600,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE, STATE(19), 1, sym_interpreted_string_literal, + STATE(37), 1, + sym_comment, STATE(92), 1, sym__string_literal, - STATE(37), 2, - sym_line_comment, - sym_block_comment, - [1161] = 7, + [1125] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6660,12 +6615,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE, STATE(19), 1, sym_interpreted_string_literal, + STATE(38), 1, + sym_comment, STATE(107), 1, sym__string_literal, - STATE(38), 2, - sym_line_comment, - sym_block_comment, - [1184] = 7, + [1147] = 7, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, @@ -6676,12 +6630,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE2, ACTIONS(108), 1, sym_escape_sequence, + STATE(39), 1, + sym_comment, STATE(43), 1, aux_sym_interpreted_string_literal_repeat1, - STATE(39), 2, - sym_line_comment, - sym_block_comment, - [1207] = 7, + [1169] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6692,12 +6645,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE, STATE(19), 1, sym_interpreted_string_literal, + STATE(40), 1, + sym_comment, STATE(93), 1, sym__string_literal, - STATE(40), 2, - sym_line_comment, - sym_block_comment, - [1230] = 7, + [1191] = 7, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, @@ -6710,10 +6662,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE2, STATE(39), 1, aux_sym_interpreted_string_literal_repeat1, - STATE(41), 2, - sym_line_comment, - sym_block_comment, - [1253] = 7, + STATE(41), 1, + sym_comment, + [1213] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6724,12 +6675,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACK, ACTIONS(116), 1, anon_sym_PLUS, + STATE(42), 1, + sym_comment, STATE(60), 1, aux_sym_list_expression_repeat1, - STATE(42), 2, - sym_line_comment, - sym_block_comment, - [1276] = 6, + [1235] = 6, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, @@ -6740,11 +6690,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE2, ACTIONS(123), 1, sym_escape_sequence, - STATE(43), 3, - sym_line_comment, - sym_block_comment, + STATE(43), 2, + sym_comment, aux_sym_interpreted_string_literal_repeat1, - [1297] = 6, + [1255] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6753,26 +6702,24 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACE, ACTIONS(130), 1, anon_sym_LPAREN, + STATE(44), 1, + sym_comment, ACTIONS(126), 2, anon_sym_EQ, anon_sym_PLUS_EQ, - STATE(44), 2, - sym_line_comment, - sym_block_comment, - [1318] = 4, + [1275] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(45), 2, - sym_line_comment, - sym_block_comment, + STATE(45), 1, + sym_comment, ACTIONS(43), 4, anon_sym_RBRACE, sym_raw_string_literal, anon_sym_DQUOTE, anon_sym_default, - [1335] = 6, + [1291] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6781,12 +6728,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(134), 1, anon_sym_RPAREN, + STATE(46), 1, + sym_comment, STATE(51), 1, aux_sym__new_module_repeat1, - STATE(46), 2, - sym_line_comment, - sym_block_comment, - [1355] = 6, + [1310] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6795,12 +6741,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(138), 1, anon_sym_RBRACE, + STATE(47), 1, + sym_comment, STATE(64), 1, aux_sym__old_module_repeat1, - STATE(47), 2, - sym_line_comment, - sym_block_comment, - [1375] = 6, + [1329] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6809,12 +6754,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, ACTIONS(142), 1, sym_identifier, + STATE(48), 1, + sym_comment, STATE(73), 1, sym__colon_property, - STATE(48), 2, - sym_line_comment, - sym_block_comment, - [1395] = 6, + [1348] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6823,12 +6767,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RPAREN, ACTIONS(146), 1, sym_identifier, + STATE(49), 1, + sym_comment, STATE(72), 1, sym__equal_property, - STATE(49), 2, - sym_line_comment, - sym_block_comment, - [1415] = 6, + [1367] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6837,12 +6780,11 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(148), 1, anon_sym_RBRACE, + STATE(50), 1, + sym_comment, STATE(57), 1, sym__colon_property, - STATE(50), 2, - sym_line_comment, - sym_block_comment, - [1435] = 6, + [1386] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6851,12 +6793,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(152), 1, anon_sym_RPAREN, + STATE(51), 1, + sym_comment, STATE(67), 1, aux_sym__new_module_repeat1, - STATE(51), 2, - sym_line_comment, - sym_block_comment, - [1455] = 6, + [1405] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6865,25 +6806,23 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(154), 1, anon_sym_RBRACE, + STATE(52), 1, + sym_comment, STATE(73), 1, sym__colon_property, - STATE(52), 2, - sym_line_comment, - sym_block_comment, - [1475] = 5, + [1424] = 5, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, anon_sym_SLASH_STAR, ACTIONS(156), 1, aux_sym_interpreted_string_literal_token1, + STATE(53), 1, + sym_comment, ACTIONS(158), 2, anon_sym_DQUOTE2, sym_escape_sequence, - STATE(53), 2, - sym_line_comment, - sym_block_comment, - [1493] = 6, + [1441] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6892,12 +6831,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(162), 1, anon_sym_RBRACE, + STATE(54), 1, + sym_comment, STATE(64), 1, aux_sym__old_module_repeat1, - STATE(54), 2, - sym_line_comment, - sym_block_comment, - [1513] = 6, + [1460] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6908,23 +6846,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, STATE(54), 1, aux_sym__old_module_repeat1, - STATE(55), 2, - sym_line_comment, - sym_block_comment, - [1533] = 5, + STATE(55), 1, + sym_comment, + [1479] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(116), 1, anon_sym_PLUS, + STATE(56), 1, + sym_comment, ACTIONS(168), 2, anon_sym_COMMA, anon_sym_RBRACK, - STATE(56), 2, - sym_line_comment, - sym_block_comment, - [1551] = 6, + [1496] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6935,23 +6871,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, STATE(47), 1, aux_sym__old_module_repeat1, - STATE(57), 2, - sym_line_comment, - sym_block_comment, - [1571] = 5, + STATE(57), 1, + sym_comment, + [1515] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(116), 1, anon_sym_PLUS, + STATE(58), 1, + sym_comment, ACTIONS(174), 2, ts_builtin_sym_end, sym_identifier, - STATE(58), 2, - sym_line_comment, - sym_block_comment, - [1589] = 5, + [1532] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6960,11 +6894,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(179), 1, anon_sym_RBRACK, - STATE(59), 3, - sym_line_comment, - sym_block_comment, + STATE(59), 2, + sym_comment, aux_sym_list_expression_repeat1, - [1607] = 6, + [1549] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6975,10 +6908,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACK, STATE(59), 1, aux_sym_list_expression_repeat1, - STATE(60), 2, - sym_line_comment, - sym_block_comment, - [1627] = 6, + STATE(60), 1, + sym_comment, + [1568] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6989,23 +6921,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, STATE(55), 1, sym__colon_property, - STATE(61), 2, - sym_line_comment, - sym_block_comment, - [1647] = 5, + STATE(61), 1, + sym_comment, + [1587] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(116), 1, anon_sym_PLUS, + STATE(62), 1, + sym_comment, ACTIONS(187), 2, anon_sym_COMMA, anon_sym_RBRACE, - STATE(62), 2, - sym_line_comment, - sym_block_comment, - [1665] = 6, + [1604] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7014,12 +6944,11 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(189), 1, anon_sym_RBRACE, + STATE(63), 1, + sym_comment, STATE(73), 1, sym__colon_property, - STATE(63), 2, - sym_line_comment, - sym_block_comment, - [1685] = 5, + [1623] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7028,24 +6957,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(194), 1, anon_sym_RBRACE, - STATE(64), 3, - sym_line_comment, - sym_block_comment, + STATE(64), 2, + sym_comment, aux_sym__old_module_repeat1, - [1703] = 5, + [1640] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(116), 1, anon_sym_PLUS, + STATE(65), 1, + sym_comment, ACTIONS(196), 2, anon_sym_COMMA, anon_sym_RPAREN, - STATE(65), 2, - sym_line_comment, - sym_block_comment, - [1721] = 6, + [1657] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7054,12 +6981,11 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(198), 1, anon_sym_RPAREN, + STATE(66), 1, + sym_comment, STATE(72), 1, sym__equal_property, - STATE(66), 2, - sym_line_comment, - sym_block_comment, - [1741] = 5, + [1676] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7068,11 +6994,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, ACTIONS(203), 1, anon_sym_RPAREN, - STATE(67), 3, - sym_line_comment, - sym_block_comment, + STATE(67), 2, + sym_comment, aux_sym__new_module_repeat1, - [1759] = 6, + [1693] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7083,10 +7008,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RPAREN, STATE(46), 1, sym__equal_property, - STATE(68), 2, - sym_line_comment, - sym_block_comment, - [1779] = 6, + STATE(68), 1, + sym_comment, + [1712] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7095,68 +7019,62 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, ACTIONS(207), 1, anon_sym_RBRACE, + STATE(69), 1, + sym_comment, STATE(73), 1, sym__colon_property, - STATE(69), 2, - sym_line_comment, - sym_block_comment, - [1799] = 4, + [1731] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(70), 1, + sym_comment, ACTIONS(209), 2, ts_builtin_sym_end, sym_identifier, - STATE(70), 2, - sym_line_comment, - sym_block_comment, - [1814] = 5, + [1745] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(146), 1, sym_identifier, + STATE(71), 1, + sym_comment, STATE(72), 1, sym__equal_property, - STATE(71), 2, - sym_line_comment, - sym_block_comment, - [1831] = 4, + [1761] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(72), 1, + sym_comment, ACTIONS(211), 2, anon_sym_COMMA, anon_sym_RPAREN, - STATE(72), 2, - sym_line_comment, - sym_block_comment, - [1846] = 4, + [1775] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(73), 1, + sym_comment, ACTIONS(213), 2, anon_sym_COMMA, anon_sym_RBRACE, - STATE(73), 2, - sym_line_comment, - sym_block_comment, - [1861] = 4, + [1789] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(74), 1, + sym_comment, ACTIONS(215), 2, ts_builtin_sym_end, sym_identifier, - STATE(74), 2, - sym_line_comment, - sym_block_comment, - [1876] = 5, + [1803] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7165,143 +7083,130 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, ACTIONS(217), 1, anon_sym_COMMA, - STATE(75), 2, - sym_line_comment, - sym_block_comment, - [1893] = 4, + STATE(75), 1, + sym_comment, + [1819] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(76), 1, + sym_comment, ACTIONS(219), 2, ts_builtin_sym_end, sym_identifier, - STATE(76), 2, - sym_line_comment, - sym_block_comment, - [1908] = 4, + [1833] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(77), 1, + sym_comment, ACTIONS(221), 2, ts_builtin_sym_end, sym_identifier, - STATE(77), 2, - sym_line_comment, - sym_block_comment, - [1923] = 4, + [1847] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(78), 1, + sym_comment, ACTIONS(223), 2, ts_builtin_sym_end, sym_identifier, - STATE(78), 2, - sym_line_comment, - sym_block_comment, - [1938] = 4, + [1861] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(79), 1, + sym_comment, ACTIONS(225), 2, ts_builtin_sym_end, sym_identifier, - STATE(79), 2, - sym_line_comment, - sym_block_comment, - [1953] = 4, + [1875] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(80), 1, + sym_comment, ACTIONS(227), 2, ts_builtin_sym_end, sym_identifier, - STATE(80), 2, - sym_line_comment, - sym_block_comment, - [1968] = 5, + [1889] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(229), 1, anon_sym_LBRACE, + STATE(81), 1, + sym_comment, STATE(95), 1, sym_select_cases, - STATE(81), 2, - sym_line_comment, - sym_block_comment, - [1985] = 4, + [1905] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(82), 1, + sym_comment, ACTIONS(231), 2, ts_builtin_sym_end, sym_identifier, - STATE(82), 2, - sym_line_comment, - sym_block_comment, - [2000] = 4, + [1919] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(83), 1, + sym_comment, ACTIONS(233), 2, ts_builtin_sym_end, sym_identifier, - STATE(83), 2, - sym_line_comment, - sym_block_comment, - [2015] = 4, + [1933] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(84), 1, + sym_comment, ACTIONS(227), 2, ts_builtin_sym_end, sym_identifier, - STATE(84), 2, - sym_line_comment, - sym_block_comment, - [2030] = 4, + [1947] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(85), 1, + sym_comment, ACTIONS(235), 2, ts_builtin_sym_end, sym_identifier, - STATE(85), 2, - sym_line_comment, - sym_block_comment, - [2045] = 4, + [1961] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(86), 1, + sym_comment, ACTIONS(237), 2, ts_builtin_sym_end, sym_identifier, - STATE(86), 2, - sym_line_comment, - sym_block_comment, - [2060] = 4, + [1975] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(87), 1, + sym_comment, ACTIONS(239), 2, ts_builtin_sym_end, sym_identifier, - STATE(87), 2, - sym_line_comment, - sym_block_comment, - [2075] = 5, + [1989] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -7310,460 +7215,427 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, STATE(73), 1, sym__colon_property, - STATE(88), 2, - sym_line_comment, - sym_block_comment, - [2092] = 4, + STATE(88), 1, + sym_comment, + [2005] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + STATE(89), 1, + sym_comment, ACTIONS(241), 2, ts_builtin_sym_end, sym_identifier, - STATE(89), 2, - sym_line_comment, - sym_block_comment, - [2107] = 4, + [2019] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(243), 1, anon_sym_COMMA, - STATE(90), 2, - sym_line_comment, - sym_block_comment, - [2121] = 4, + STATE(90), 1, + sym_comment, + [2032] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(245), 1, anon_sym_COMMA, - STATE(91), 2, - sym_line_comment, - sym_block_comment, - [2135] = 4, + STATE(91), 1, + sym_comment, + [2045] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(247), 1, anon_sym_RPAREN, - STATE(92), 2, - sym_line_comment, - sym_block_comment, - [2149] = 4, + STATE(92), 1, + sym_comment, + [2058] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(249), 1, anon_sym_COMMA, - STATE(93), 2, - sym_line_comment, - sym_block_comment, - [2163] = 4, + STATE(93), 1, + sym_comment, + [2071] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(251), 1, aux_sym_integer_literal_token1, - STATE(94), 2, - sym_line_comment, - sym_block_comment, - [2177] = 4, + STATE(94), 1, + sym_comment, + [2084] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(253), 1, anon_sym_RPAREN, - STATE(95), 2, - sym_line_comment, - sym_block_comment, - [2191] = 4, + STATE(95), 1, + sym_comment, + [2097] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(255), 1, anon_sym_RPAREN, - STATE(96), 2, - sym_line_comment, - sym_block_comment, - [2205] = 4, + STATE(96), 1, + sym_comment, + [2110] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(257), 1, anon_sym_SLASH, - STATE(97), 2, - sym_line_comment, - sym_block_comment, - [2219] = 4, + STATE(97), 1, + sym_comment, + [2123] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(259), 1, anon_sym_COMMA, - STATE(98), 2, - sym_line_comment, - sym_block_comment, - [2233] = 4, + STATE(98), 1, + sym_comment, + [2136] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(261), 1, anon_sym_RBRACE, - STATE(99), 2, - sym_line_comment, - sym_block_comment, - [2247] = 4, + STATE(99), 1, + sym_comment, + [2149] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(263), 1, anon_sym_RPAREN, - STATE(100), 2, - sym_line_comment, - sym_block_comment, - [2261] = 4, + STATE(100), 1, + sym_comment, + [2162] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(265), 1, anon_sym_COLON, - STATE(101), 2, - sym_line_comment, - sym_block_comment, - [2275] = 4, + STATE(101), 1, + sym_comment, + [2175] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(267), 1, anon_sym_COLON, - STATE(102), 2, - sym_line_comment, - sym_block_comment, - [2289] = 4, + STATE(102), 1, + sym_comment, + [2188] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(269), 1, anon_sym_COMMA, - STATE(103), 2, - sym_line_comment, - sym_block_comment, - [2303] = 4, + STATE(103), 1, + sym_comment, + [2201] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(271), 1, anon_sym_COMMA, - STATE(104), 2, - sym_line_comment, - sym_block_comment, - [2317] = 4, + STATE(104), 1, + sym_comment, + [2214] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(273), 1, anon_sym_COLON, - STATE(105), 2, - sym_line_comment, - sym_block_comment, - [2331] = 4, + STATE(105), 1, + sym_comment, + [2227] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(275), 1, anon_sym_EQ, - STATE(106), 2, - sym_line_comment, - sym_block_comment, - [2345] = 4, + STATE(106), 1, + sym_comment, + [2240] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(277), 1, anon_sym_RPAREN, - STATE(107), 2, - sym_line_comment, - sym_block_comment, - [2359] = 4, + STATE(107), 1, + sym_comment, + [2253] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(279), 1, anon_sym_LPAREN, - STATE(108), 2, - sym_line_comment, - sym_block_comment, - [2373] = 4, + STATE(108), 1, + sym_comment, + [2266] = 4, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, anon_sym_SLASH_STAR, ACTIONS(281), 1, - aux_sym_line_comment_token1, - STATE(109), 2, - sym_line_comment, - sym_block_comment, - [2387] = 4, + aux_sym_comment_token1, + STATE(109), 1, + sym_comment, + [2279] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(283), 1, ts_builtin_sym_end, - STATE(110), 2, - sym_line_comment, - sym_block_comment, - [2401] = 4, + STATE(110), 1, + sym_comment, + [2292] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(285), 1, anon_sym_RBRACE, - STATE(111), 2, - sym_line_comment, - sym_block_comment, - [2415] = 4, + STATE(111), 1, + sym_comment, + [2305] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(287), 1, anon_sym_RPAREN, - STATE(112), 2, - sym_line_comment, - sym_block_comment, - [2429] = 4, + STATE(112), 1, + sym_comment, + [2318] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(289), 1, anon_sym_COMMA, - STATE(113), 2, - sym_line_comment, - sym_block_comment, - [2443] = 4, + STATE(113), 1, + sym_comment, + [2331] = 4, ACTIONS(100), 1, anon_sym_SLASH_SLASH, ACTIONS(102), 1, anon_sym_SLASH_STAR, ACTIONS(291), 1, - aux_sym_block_comment_token1, - STATE(114), 2, - sym_line_comment, - sym_block_comment, - [2457] = 4, + aux_sym_comment_token2, + STATE(114), 1, + sym_comment, + [2344] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(293), 1, anon_sym_LPAREN, - STATE(115), 2, - sym_line_comment, - sym_block_comment, - [2471] = 4, + STATE(115), 1, + sym_comment, + [2357] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(217), 1, anon_sym_COMMA, - STATE(116), 2, - sym_line_comment, - sym_block_comment, - [2485] = 4, + STATE(116), 1, + sym_comment, + [2370] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(295), 1, anon_sym_LPAREN, - STATE(117), 2, - sym_line_comment, - sym_block_comment, - [2499] = 4, + STATE(117), 1, + sym_comment, + [2383] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(297), 1, anon_sym_COMMA, - STATE(118), 2, - sym_line_comment, - sym_block_comment, - [2513] = 4, + STATE(118), 1, + sym_comment, + [2396] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(299), 1, anon_sym_COMMA, - STATE(119), 2, - sym_line_comment, - sym_block_comment, - [2527] = 4, + STATE(119), 1, + sym_comment, + [2409] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(301), 1, anon_sym_RPAREN, - STATE(120), 2, - sym_line_comment, - sym_block_comment, - [2541] = 1, + STATE(120), 1, + sym_comment, + [2422] = 1, ACTIONS(303), 1, ts_builtin_sym_end, - [2545] = 1, + [2426] = 1, ACTIONS(305), 1, ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 60, - [SMALL_STATE(4)] = 120, - [SMALL_STATE(5)] = 177, - [SMALL_STATE(6)] = 234, - [SMALL_STATE(7)] = 291, - [SMALL_STATE(8)] = 345, - [SMALL_STATE(9)] = 399, - [SMALL_STATE(10)] = 453, - [SMALL_STATE(11)] = 507, - [SMALL_STATE(12)] = 561, - [SMALL_STATE(13)] = 599, - [SMALL_STATE(14)] = 637, - [SMALL_STATE(15)] = 668, - [SMALL_STATE(16)] = 689, - [SMALL_STATE(17)] = 710, - [SMALL_STATE(18)] = 743, - [SMALL_STATE(19)] = 774, - [SMALL_STATE(20)] = 795, - [SMALL_STATE(21)] = 815, - [SMALL_STATE(22)] = 835, - [SMALL_STATE(23)] = 855, - [SMALL_STATE(24)] = 875, - [SMALL_STATE(25)] = 895, - [SMALL_STATE(26)] = 915, - [SMALL_STATE(27)] = 935, - [SMALL_STATE(28)] = 955, - [SMALL_STATE(29)] = 975, - [SMALL_STATE(30)] = 995, - [SMALL_STATE(31)] = 1015, - [SMALL_STATE(32)] = 1035, - [SMALL_STATE(33)] = 1055, - [SMALL_STATE(34)] = 1075, - [SMALL_STATE(35)] = 1095, - [SMALL_STATE(36)] = 1115, - [SMALL_STATE(37)] = 1138, - [SMALL_STATE(38)] = 1161, - [SMALL_STATE(39)] = 1184, - [SMALL_STATE(40)] = 1207, - [SMALL_STATE(41)] = 1230, - [SMALL_STATE(42)] = 1253, - [SMALL_STATE(43)] = 1276, - [SMALL_STATE(44)] = 1297, - [SMALL_STATE(45)] = 1318, - [SMALL_STATE(46)] = 1335, - [SMALL_STATE(47)] = 1355, - [SMALL_STATE(48)] = 1375, - [SMALL_STATE(49)] = 1395, - [SMALL_STATE(50)] = 1415, - [SMALL_STATE(51)] = 1435, - [SMALL_STATE(52)] = 1455, - [SMALL_STATE(53)] = 1475, - [SMALL_STATE(54)] = 1493, - [SMALL_STATE(55)] = 1513, - [SMALL_STATE(56)] = 1533, - [SMALL_STATE(57)] = 1551, - [SMALL_STATE(58)] = 1571, - [SMALL_STATE(59)] = 1589, - [SMALL_STATE(60)] = 1607, - [SMALL_STATE(61)] = 1627, - [SMALL_STATE(62)] = 1647, - [SMALL_STATE(63)] = 1665, - [SMALL_STATE(64)] = 1685, - [SMALL_STATE(65)] = 1703, - [SMALL_STATE(66)] = 1721, - [SMALL_STATE(67)] = 1741, - [SMALL_STATE(68)] = 1759, - [SMALL_STATE(69)] = 1779, - [SMALL_STATE(70)] = 1799, - [SMALL_STATE(71)] = 1814, - [SMALL_STATE(72)] = 1831, - [SMALL_STATE(73)] = 1846, - [SMALL_STATE(74)] = 1861, - [SMALL_STATE(75)] = 1876, - [SMALL_STATE(76)] = 1893, - [SMALL_STATE(77)] = 1908, - [SMALL_STATE(78)] = 1923, - [SMALL_STATE(79)] = 1938, - [SMALL_STATE(80)] = 1953, - [SMALL_STATE(81)] = 1968, - [SMALL_STATE(82)] = 1985, - [SMALL_STATE(83)] = 2000, - [SMALL_STATE(84)] = 2015, - [SMALL_STATE(85)] = 2030, - [SMALL_STATE(86)] = 2045, - [SMALL_STATE(87)] = 2060, - [SMALL_STATE(88)] = 2075, - [SMALL_STATE(89)] = 2092, - [SMALL_STATE(90)] = 2107, - [SMALL_STATE(91)] = 2121, - [SMALL_STATE(92)] = 2135, - [SMALL_STATE(93)] = 2149, - [SMALL_STATE(94)] = 2163, - [SMALL_STATE(95)] = 2177, - [SMALL_STATE(96)] = 2191, - [SMALL_STATE(97)] = 2205, - [SMALL_STATE(98)] = 2219, - [SMALL_STATE(99)] = 2233, - [SMALL_STATE(100)] = 2247, - [SMALL_STATE(101)] = 2261, - [SMALL_STATE(102)] = 2275, - [SMALL_STATE(103)] = 2289, - [SMALL_STATE(104)] = 2303, - [SMALL_STATE(105)] = 2317, - [SMALL_STATE(106)] = 2331, - [SMALL_STATE(107)] = 2345, - [SMALL_STATE(108)] = 2359, - [SMALL_STATE(109)] = 2373, - [SMALL_STATE(110)] = 2387, - [SMALL_STATE(111)] = 2401, - [SMALL_STATE(112)] = 2415, - [SMALL_STATE(113)] = 2429, - [SMALL_STATE(114)] = 2443, - [SMALL_STATE(115)] = 2457, - [SMALL_STATE(116)] = 2471, - [SMALL_STATE(117)] = 2485, - [SMALL_STATE(118)] = 2499, - [SMALL_STATE(119)] = 2513, - [SMALL_STATE(120)] = 2527, - [SMALL_STATE(121)] = 2541, - [SMALL_STATE(122)] = 2545, + [SMALL_STATE(3)] = 59, + [SMALL_STATE(4)] = 118, + [SMALL_STATE(5)] = 174, + [SMALL_STATE(6)] = 230, + [SMALL_STATE(7)] = 286, + [SMALL_STATE(8)] = 339, + [SMALL_STATE(9)] = 392, + [SMALL_STATE(10)] = 445, + [SMALL_STATE(11)] = 498, + [SMALL_STATE(12)] = 551, + [SMALL_STATE(13)] = 588, + [SMALL_STATE(14)] = 625, + [SMALL_STATE(15)] = 655, + [SMALL_STATE(16)] = 675, + [SMALL_STATE(17)] = 695, + [SMALL_STATE(18)] = 727, + [SMALL_STATE(19)] = 757, + [SMALL_STATE(20)] = 777, + [SMALL_STATE(21)] = 796, + [SMALL_STATE(22)] = 815, + [SMALL_STATE(23)] = 834, + [SMALL_STATE(24)] = 853, + [SMALL_STATE(25)] = 872, + [SMALL_STATE(26)] = 891, + [SMALL_STATE(27)] = 910, + [SMALL_STATE(28)] = 929, + [SMALL_STATE(29)] = 948, + [SMALL_STATE(30)] = 967, + [SMALL_STATE(31)] = 986, + [SMALL_STATE(32)] = 1005, + [SMALL_STATE(33)] = 1024, + [SMALL_STATE(34)] = 1043, + [SMALL_STATE(35)] = 1062, + [SMALL_STATE(36)] = 1081, + [SMALL_STATE(37)] = 1103, + [SMALL_STATE(38)] = 1125, + [SMALL_STATE(39)] = 1147, + [SMALL_STATE(40)] = 1169, + [SMALL_STATE(41)] = 1191, + [SMALL_STATE(42)] = 1213, + [SMALL_STATE(43)] = 1235, + [SMALL_STATE(44)] = 1255, + [SMALL_STATE(45)] = 1275, + [SMALL_STATE(46)] = 1291, + [SMALL_STATE(47)] = 1310, + [SMALL_STATE(48)] = 1329, + [SMALL_STATE(49)] = 1348, + [SMALL_STATE(50)] = 1367, + [SMALL_STATE(51)] = 1386, + [SMALL_STATE(52)] = 1405, + [SMALL_STATE(53)] = 1424, + [SMALL_STATE(54)] = 1441, + [SMALL_STATE(55)] = 1460, + [SMALL_STATE(56)] = 1479, + [SMALL_STATE(57)] = 1496, + [SMALL_STATE(58)] = 1515, + [SMALL_STATE(59)] = 1532, + [SMALL_STATE(60)] = 1549, + [SMALL_STATE(61)] = 1568, + [SMALL_STATE(62)] = 1587, + [SMALL_STATE(63)] = 1604, + [SMALL_STATE(64)] = 1623, + [SMALL_STATE(65)] = 1640, + [SMALL_STATE(66)] = 1657, + [SMALL_STATE(67)] = 1676, + [SMALL_STATE(68)] = 1693, + [SMALL_STATE(69)] = 1712, + [SMALL_STATE(70)] = 1731, + [SMALL_STATE(71)] = 1745, + [SMALL_STATE(72)] = 1761, + [SMALL_STATE(73)] = 1775, + [SMALL_STATE(74)] = 1789, + [SMALL_STATE(75)] = 1803, + [SMALL_STATE(76)] = 1819, + [SMALL_STATE(77)] = 1833, + [SMALL_STATE(78)] = 1847, + [SMALL_STATE(79)] = 1861, + [SMALL_STATE(80)] = 1875, + [SMALL_STATE(81)] = 1889, + [SMALL_STATE(82)] = 1905, + [SMALL_STATE(83)] = 1919, + [SMALL_STATE(84)] = 1933, + [SMALL_STATE(85)] = 1947, + [SMALL_STATE(86)] = 1961, + [SMALL_STATE(87)] = 1975, + [SMALL_STATE(88)] = 1989, + [SMALL_STATE(89)] = 2005, + [SMALL_STATE(90)] = 2019, + [SMALL_STATE(91)] = 2032, + [SMALL_STATE(92)] = 2045, + [SMALL_STATE(93)] = 2058, + [SMALL_STATE(94)] = 2071, + [SMALL_STATE(95)] = 2084, + [SMALL_STATE(96)] = 2097, + [SMALL_STATE(97)] = 2110, + [SMALL_STATE(98)] = 2123, + [SMALL_STATE(99)] = 2136, + [SMALL_STATE(100)] = 2149, + [SMALL_STATE(101)] = 2162, + [SMALL_STATE(102)] = 2175, + [SMALL_STATE(103)] = 2188, + [SMALL_STATE(104)] = 2201, + [SMALL_STATE(105)] = 2214, + [SMALL_STATE(106)] = 2227, + [SMALL_STATE(107)] = 2240, + [SMALL_STATE(108)] = 2253, + [SMALL_STATE(109)] = 2266, + [SMALL_STATE(110)] = 2279, + [SMALL_STATE(111)] = 2292, + [SMALL_STATE(112)] = 2305, + [SMALL_STATE(113)] = 2318, + [SMALL_STATE(114)] = 2331, + [SMALL_STATE(115)] = 2344, + [SMALL_STATE(116)] = 2357, + [SMALL_STATE(117)] = 2370, + [SMALL_STATE(118)] = 2383, + [SMALL_STATE(119)] = 2396, + [SMALL_STATE(120)] = 2409, + [SMALL_STATE(121)] = 2422, + [SMALL_STATE(122)] = 2426, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -7915,8 +7787,8 @@ static const TSParseActionEntry ts_parse_actions[] = { [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_default_case, 3, .production_id = 16), [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_case, 3, .production_id = 16), [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_cases, 4), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_comment, 2), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_comment, 3), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3), }; #ifdef __cplusplus diff --git a/test/corpus/comments.txt b/test/corpus/comments.txt index 6c91a89..a816b3c 100644 --- a/test/corpus/comments.txt +++ b/test/corpus/comments.txt @@ -7,7 +7,7 @@ Empty comment -------------------------------------------------------------------------------- (source_file - (line_comment)) + (comment)) ================================================================================ Single comment @@ -18,7 +18,7 @@ Single comment -------------------------------------------------------------------------------- (source_file - (line_comment)) + (comment)) ================================================================================ Multiple comments @@ -30,8 +30,8 @@ Multiple comments -------------------------------------------------------------------------------- (source_file - (line_comment) - (line_comment)) + (comment) + (comment)) ================================================================================ Empty block comment @@ -42,7 +42,7 @@ Empty block comment -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Whitespace block comment @@ -53,7 +53,7 @@ Whitespace block comment -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Block comment @@ -64,7 +64,7 @@ Block comment -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Block comment with slashes @@ -75,7 +75,7 @@ Block comment with slashes -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Block comment with asterisks @@ -86,7 +86,7 @@ Block comment with asterisks -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Block comment (multiline) @@ -103,7 +103,7 @@ Block comment (multiline) -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Block comment is not recursive @@ -114,7 +114,7 @@ Block comment is not recursive -------------------------------------------------------------------------------- (source_file - (block_comment)) + (comment)) ================================================================================ Unterminated comment From adec624d74d0cbec1ad902cf3e70d16b84dc50d8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:38:14 +0100 Subject: [PATCH 06/20] Tweak comment parsing This is taken verbatim from tree-sitter-c [1], just in case :-). [1]: https://github.com/tree-sitter/tree-sitter-c --- grammar.js | 4 +- src/grammar.json | 2 +- src/parser.c | 924 ++++++++++++++++++++++++----------------------- 3 files changed, 478 insertions(+), 452 deletions(-) diff --git a/grammar.js b/grammar.js index d63d58e..2f4b0e3 100644 --- a/grammar.js +++ b/grammar.js @@ -23,8 +23,8 @@ module.exports = grammar({ ), comment: (_) => choice( - seq("//", /[^\n]*/), - seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, '/'), + seq("//", /(\\+(.|\r?\n)|[^\\\n])*/), + seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, "/"), ), // Definitions {{{ diff --git a/src/grammar.json b/src/grammar.json index 3dc19bc..482f27b 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -33,7 +33,7 @@ }, { "type": "PATTERN", - "value": "[^\\n]*" + "value": "(\\\\+(.|\\r?\\n)|[^\\\\\\n])*" } ] }, diff --git a/src/parser.c b/src/parser.c index 63ff83c..f06de7f 100644 --- a/src/parser.c +++ b/src/parser.c @@ -4578,130 +4578,130 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(86); - if (lookahead == '"') ADVANCE(195); - if (lookahead == '(') ADVANCE(105); - if (lookahead == ')') ADVANCE(106); - if (lookahead == '+') ADVANCE(215); - if (lookahead == ',') ADVANCE(103); - if (lookahead == '-') ADVANCE(188); - if (lookahead == '/') ADVANCE(99); - if (lookahead == ':') ADVANCE(208); - if (lookahead == '=') ADVANCE(100); - if (lookahead == '[') ADVANCE(212); + if (eof) ADVANCE(87); + if (lookahead == '"') ADVANCE(198); + if (lookahead == '(') ADVANCE(108); + if (lookahead == ')') ADVANCE(109); + if (lookahead == '+') ADVANCE(218); + if (lookahead == ',') ADVANCE(106); + if (lookahead == '-') ADVANCE(191); + if (lookahead == '/') ADVANCE(102); + if (lookahead == ':') ADVANCE(211); + if (lookahead == '=') ADVANCE(103); + if (lookahead == '[') ADVANCE(215); if (lookahead == '\\') ADVANCE(11); - if (lookahead == ']') ADVANCE(213); - if (lookahead == '`') ADVANCE(83); - if (lookahead == 'd') ADVANCE(129); - if (lookahead == 'f') ADVANCE(111); - if (lookahead == 'p') ADVANCE(165); - if (lookahead == 'r') ADVANCE(137); - if (lookahead == 's') ADVANCE(139); - if (lookahead == 't') ADVANCE(166); - if (lookahead == 'u') ADVANCE(158); - if (lookahead == 'v') ADVANCE(114); - if (lookahead == '{') ADVANCE(102); - if (lookahead == '}') ADVANCE(104); + if (lookahead == ']') ADVANCE(216); + if (lookahead == '`') ADVANCE(84); + if (lookahead == 'd') ADVANCE(132); + if (lookahead == 'f') ADVANCE(114); + if (lookahead == 'p') ADVANCE(168); + if (lookahead == 'r') ADVANCE(140); + if (lookahead == 's') ADVANCE(142); + if (lookahead == 't') ADVANCE(169); + if (lookahead == 'u') ADVANCE(161); + if (lookahead == 'v') ADVANCE(117); + if (lookahead == '{') ADVANCE(105); + if (lookahead == '}') ADVANCE(107); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(84) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(189); - if (sym_identifier_character_set_1(lookahead)) ADVANCE(185); + lookahead == ' ') SKIP(85) + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(192); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(188); END_STATE(); case 1: if (lookahead == '\n') SKIP(2) - if (lookahead == '"') ADVANCE(195); - if (lookahead == '/') ADVANCE(192); + if (lookahead == '"') ADVANCE(198); + if (lookahead == '/') ADVANCE(195); if (lookahead == '\\') ADVANCE(11); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(193); - if (lookahead != 0) ADVANCE(194); + lookahead == ' ') ADVANCE(196); + if (lookahead != 0) ADVANCE(197); END_STATE(); case 2: if (lookahead == '\n') SKIP(2) - if (lookahead == '/') ADVANCE(192); + if (lookahead == '/') ADVANCE(195); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(193); + lookahead == ' ') ADVANCE(196); if (lookahead != 0 && lookahead != '"' && - lookahead != '\\') ADVANCE(194); + lookahead != '\\') ADVANCE(197); END_STATE(); case 3: - if (lookahead == '"') ADVANCE(191); - if (lookahead == '(') ADVANCE(105); + if (lookahead == '"') ADVANCE(194); + if (lookahead == '(') ADVANCE(108); if (lookahead == '+') ADVANCE(10); - if (lookahead == '-') ADVANCE(188); + if (lookahead == '-') ADVANCE(191); if (lookahead == '/') ADVANCE(6); - if (lookahead == '=') ADVANCE(100); - if (lookahead == '[') ADVANCE(212); - if (lookahead == '`') ADVANCE(83); - if (lookahead == 'f') ADVANCE(111); - if (lookahead == 's') ADVANCE(140); - if (lookahead == 't') ADVANCE(166); - if (lookahead == 'u') ADVANCE(158); - if (lookahead == '{') ADVANCE(102); + if (lookahead == '=') ADVANCE(103); + if (lookahead == '[') ADVANCE(215); + if (lookahead == '`') ADVANCE(84); + if (lookahead == 'f') ADVANCE(114); + if (lookahead == 's') ADVANCE(143); + if (lookahead == 't') ADVANCE(169); + if (lookahead == 'u') ADVANCE(161); + if (lookahead == '{') ADVANCE(105); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(3) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(189); - if (sym_identifier_character_set_1(lookahead)) ADVANCE(185); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(192); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(188); END_STATE(); case 4: - if (lookahead == '"') ADVANCE(191); - if (lookahead == '-') ADVANCE(188); + if (lookahead == '"') ADVANCE(194); + if (lookahead == '-') ADVANCE(191); if (lookahead == '/') ADVANCE(6); - if (lookahead == '[') ADVANCE(212); - if (lookahead == ']') ADVANCE(213); - if (lookahead == '`') ADVANCE(83); - if (lookahead == 'f') ADVANCE(111); - if (lookahead == 's') ADVANCE(140); - if (lookahead == 't') ADVANCE(166); - if (lookahead == '{') ADVANCE(102); + if (lookahead == '[') ADVANCE(215); + if (lookahead == ']') ADVANCE(216); + if (lookahead == '`') ADVANCE(84); + if (lookahead == 'f') ADVANCE(114); + if (lookahead == 's') ADVANCE(143); + if (lookahead == 't') ADVANCE(169); + if (lookahead == '{') ADVANCE(105); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(4) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(189); - if (sym_identifier_character_set_1(lookahead)) ADVANCE(185); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(192); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(188); END_STATE(); case 5: - if (lookahead == '"') ADVANCE(191); + if (lookahead == '"') ADVANCE(194); if (lookahead == '/') ADVANCE(6); - if (lookahead == '`') ADVANCE(83); + if (lookahead == '`') ADVANCE(84); if (lookahead == 'd') ADVANCE(33); if (lookahead == 'p') ADVANCE(62); if (lookahead == 'r') ADVANCE(34); if (lookahead == 's') ADVANCE(59); if (lookahead == 'v') ADVANCE(20); - if (lookahead == '}') ADVANCE(104); + if (lookahead == '}') ADVANCE(107); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(5) END_STATE(); case 6: - if (lookahead == '*') ADVANCE(94); - if (lookahead == '/') ADVANCE(87); + if (lookahead == '*') ADVANCE(97); + if (lookahead == '/') ADVANCE(88); END_STATE(); case 7: - if (lookahead == '*') ADVANCE(98); + if (lookahead == '*') ADVANCE(101); if (lookahead == '/') ADVANCE(9); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') ADVANCE(7); if (lookahead != 0) ADVANCE(8); END_STATE(); case 8: - if (lookahead == '*') ADVANCE(98); + if (lookahead == '*') ADVANCE(101); if (lookahead != 0) ADVANCE(8); END_STATE(); case 9: - if (lookahead == '*') ADVANCE(95); - if (lookahead == '/') ADVANCE(88); + if (lookahead == '*') ADVANCE(98); + if (lookahead == '/') ADVANCE(89); if (lookahead != 0) ADVANCE(8); END_STATE(); case 10: - if (lookahead == '=') ADVANCE(101); + if (lookahead == '=') ADVANCE(104); END_STATE(); case 11: if (lookahead == 'U') ADVANCE(82); if (lookahead == 'u') ADVANCE(78); if (lookahead == 'x') ADVANCE(76); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(198); - if (lookahead != 0) ADVANCE(196); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(201); + if (lookahead != 0) ADVANCE(199); END_STATE(); case 12: if (lookahead == '_') ADVANCE(72); @@ -4716,7 +4716,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == '_') ADVANCE(74); END_STATE(); case 16: - if (lookahead == '`') ADVANCE(190); + if (lookahead == '`') ADVANCE(193); if (lookahead != 0) ADVANCE(16); END_STATE(); case 17: @@ -4774,13 +4774,13 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 'e') ADVANCE(50); END_STATE(); case 35: - if (lookahead == 'e') ADVANCE(200); + if (lookahead == 'e') ADVANCE(203); END_STATE(); case 36: - if (lookahead == 'e') ADVANCE(202); + if (lookahead == 'e') ADVANCE(205); END_STATE(); case 37: - if (lookahead == 'e') ADVANCE(206); + if (lookahead == 'e') ADVANCE(209); END_STATE(); case 38: if (lookahead == 'e') ADVANCE(18); @@ -4870,10 +4870,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 's') ADVANCE(39); END_STATE(); case 67: - if (lookahead == 't') ADVANCE(209); + if (lookahead == 't') ADVANCE(212); END_STATE(); case 68: - if (lookahead == 't') ADVANCE(204); + if (lookahead == 't') ADVANCE(207); END_STATE(); case 69: if (lookahead == 't') ADVANCE(12); @@ -4896,7 +4896,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 75: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(196); + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(199); END_STATE(); case 76: if (('0' <= lookahead && lookahead <= '9') || @@ -4935,664 +4935,690 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 83: if (lookahead != 0 && - lookahead != '`') ADVANCE(16); + lookahead != '\r' && + lookahead != '\\') ADVANCE(94); + if (lookahead == '\r') ADVANCE(96); + if (lookahead == '\\') ADVANCE(95); END_STATE(); case 84: - if (eof) ADVANCE(86); - if (lookahead == '"') ADVANCE(191); - if (lookahead == '(') ADVANCE(105); - if (lookahead == ')') ADVANCE(106); - if (lookahead == '+') ADVANCE(215); - if (lookahead == ',') ADVANCE(103); - if (lookahead == '-') ADVANCE(188); - if (lookahead == '/') ADVANCE(99); - if (lookahead == ':') ADVANCE(208); - if (lookahead == '=') ADVANCE(100); - if (lookahead == '[') ADVANCE(212); - if (lookahead == ']') ADVANCE(213); - if (lookahead == '`') ADVANCE(83); - if (lookahead == 'd') ADVANCE(129); - if (lookahead == 'f') ADVANCE(111); - if (lookahead == 'p') ADVANCE(165); - if (lookahead == 'r') ADVANCE(137); - if (lookahead == 's') ADVANCE(139); - if (lookahead == 't') ADVANCE(166); - if (lookahead == 'u') ADVANCE(158); - if (lookahead == 'v') ADVANCE(114); - if (lookahead == '{') ADVANCE(102); - if (lookahead == '}') ADVANCE(104); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(84) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(189); - if (sym_identifier_character_set_1(lookahead)) ADVANCE(185); + if (lookahead != 0 && + lookahead != '`') ADVANCE(16); END_STATE(); case 85: - if (eof) ADVANCE(86); - if (lookahead == '"') ADVANCE(191); - if (lookahead == ')') ADVANCE(106); - if (lookahead == '+') ADVANCE(214); - if (lookahead == ',') ADVANCE(103); - if (lookahead == '/') ADVANCE(6); - if (lookahead == ':') ADVANCE(208); - if (lookahead == ']') ADVANCE(213); - if (lookahead == '`') ADVANCE(83); - if (lookahead == '}') ADVANCE(104); + if (eof) ADVANCE(87); + if (lookahead == '"') ADVANCE(194); + if (lookahead == '(') ADVANCE(108); + if (lookahead == ')') ADVANCE(109); + if (lookahead == '+') ADVANCE(218); + if (lookahead == ',') ADVANCE(106); + if (lookahead == '-') ADVANCE(191); + if (lookahead == '/') ADVANCE(102); + if (lookahead == ':') ADVANCE(211); + if (lookahead == '=') ADVANCE(103); + if (lookahead == '[') ADVANCE(215); + if (lookahead == ']') ADVANCE(216); + if (lookahead == '`') ADVANCE(84); + if (lookahead == 'd') ADVANCE(132); + if (lookahead == 'f') ADVANCE(114); + if (lookahead == 'p') ADVANCE(168); + if (lookahead == 'r') ADVANCE(140); + if (lookahead == 's') ADVANCE(142); + if (lookahead == 't') ADVANCE(169); + if (lookahead == 'u') ADVANCE(161); + if (lookahead == 'v') ADVANCE(117); + if (lookahead == '{') ADVANCE(105); + if (lookahead == '}') ADVANCE(107); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(85) - if (sym_identifier_character_set_1(lookahead)) ADVANCE(185); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(192); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(188); END_STATE(); case 86: - ACCEPT_TOKEN(ts_builtin_sym_end); + if (eof) ADVANCE(87); + if (lookahead == '"') ADVANCE(194); + if (lookahead == ')') ADVANCE(109); + if (lookahead == '+') ADVANCE(217); + if (lookahead == ',') ADVANCE(106); + if (lookahead == '/') ADVANCE(6); + if (lookahead == ':') ADVANCE(211); + if (lookahead == ']') ADVANCE(216); + if (lookahead == '`') ADVANCE(84); + if (lookahead == '}') ADVANCE(107); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(86) + if (sym_identifier_character_set_1(lookahead)) ADVANCE(188); END_STATE(); case 87: - ACCEPT_TOKEN(anon_sym_SLASH_SLASH); + ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 88: ACCEPT_TOKEN(anon_sym_SLASH_SLASH); - if (lookahead == '*') ADVANCE(98); - if (lookahead != 0) ADVANCE(8); END_STATE(); case 89: ACCEPT_TOKEN(anon_sym_SLASH_SLASH); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(194); + if (lookahead == '*') ADVANCE(101); + if (lookahead != 0) ADVANCE(8); END_STATE(); case 90: ACCEPT_TOKEN(anon_sym_SLASH_SLASH); + if (lookahead == '\\') ADVANCE(83); if (lookahead != 0 && - lookahead != '\n') ADVANCE(93); + lookahead != '\n') ADVANCE(94); END_STATE(); case 91: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead == '*') ADVANCE(97); - if (lookahead == '/') ADVANCE(90); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(93); - END_STATE(); - case 92: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead == '/') ADVANCE(91); - if (lookahead == '\t' || - (11 <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(92); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(93); - END_STATE(); - case 93: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(93); - END_STATE(); - case 94: - ACCEPT_TOKEN(anon_sym_SLASH_STAR); - END_STATE(); - case 95: - ACCEPT_TOKEN(anon_sym_SLASH_STAR); - if (lookahead == '*') ADVANCE(98); - if (lookahead != 0 && - lookahead != '/') ADVANCE(8); - END_STATE(); - case 96: - ACCEPT_TOKEN(anon_sym_SLASH_STAR); + ACCEPT_TOKEN(anon_sym_SLASH_SLASH); if (lookahead != 0 && lookahead != '\n' && lookahead != '"' && - lookahead != '\\') ADVANCE(194); + lookahead != '\\') ADVANCE(197); + END_STATE(); + case 92: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead == '*') ADVANCE(99); + if (lookahead == '/') ADVANCE(90); + if (lookahead == '\\') ADVANCE(83); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); + END_STATE(); + case 93: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead == '/') ADVANCE(92); + if (lookahead == '\\') ADVANCE(83); + if (lookahead == '\t' || + (11 <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(93); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); + END_STATE(); + case 94: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead == '\\') ADVANCE(83); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); + END_STATE(); + case 95: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead != 0 && + lookahead != '\r' && + lookahead != '\\') ADVANCE(94); + if (lookahead == '\r') ADVANCE(96); + if (lookahead == '\\') ADVANCE(95); + END_STATE(); + case 96: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead != 0 && + lookahead != '\\') ADVANCE(94); + if (lookahead == '\\') ADVANCE(83); END_STATE(); case 97: ACCEPT_TOKEN(anon_sym_SLASH_STAR); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(93); END_STATE(); case 98: - ACCEPT_TOKEN(aux_sym_comment_token2); - if (lookahead == '*') ADVANCE(98); + ACCEPT_TOKEN(anon_sym_SLASH_STAR); + if (lookahead == '*') ADVANCE(101); if (lookahead != 0 && lookahead != '/') ADVANCE(8); END_STATE(); case 99: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '*') ADVANCE(94); - if (lookahead == '/') ADVANCE(87); + ACCEPT_TOKEN(anon_sym_SLASH_STAR); + if (lookahead == '\\') ADVANCE(83); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(94); END_STATE(); case 100: - ACCEPT_TOKEN(anon_sym_EQ); + ACCEPT_TOKEN(anon_sym_SLASH_STAR); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(197); END_STATE(); case 101: - ACCEPT_TOKEN(anon_sym_PLUS_EQ); + ACCEPT_TOKEN(aux_sym_comment_token2); + if (lookahead == '*') ADVANCE(101); + if (lookahead != 0 && + lookahead != '/') ADVANCE(8); END_STATE(); case 102: - ACCEPT_TOKEN(anon_sym_LBRACE); + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(97); + if (lookahead == '/') ADVANCE(88); END_STATE(); case 103: - ACCEPT_TOKEN(anon_sym_COMMA); + ACCEPT_TOKEN(anon_sym_EQ); END_STATE(); case 104: - ACCEPT_TOKEN(anon_sym_RBRACE); + ACCEPT_TOKEN(anon_sym_PLUS_EQ); END_STATE(); case 105: - ACCEPT_TOKEN(anon_sym_LPAREN); + ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); case 106: - ACCEPT_TOKEN(anon_sym_RPAREN); + ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); case 107: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(182); - if (sym_identifier_character_set_2(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); case 108: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(126); - if (sym_identifier_character_set_2(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); case 109: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(183); - if (sym_identifier_character_set_2(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); case 110: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(184); - if (sym_identifier_character_set_2(lookahead)) ADVANCE(185); + if (lookahead == '_') ADVANCE(185); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(188); END_STATE(); case 111: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(157); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == '_') ADVANCE(129); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(188); END_STATE(); case 112: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(122); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == '_') ADVANCE(186); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(188); END_STATE(); case 113: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(179); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == '_') ADVANCE(187); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(188); END_STATE(); case 114: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(167); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(160); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 115: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(161); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(125); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 116: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(168); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(182); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 117: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(173); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(170); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 118: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(123); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(164); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 119: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(169); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(171); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 120: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(124); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(176); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 121: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'a') ADVANCE(170); - if (sym_identifier_character_set_3(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(126); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 122: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'b') ADVANCE(154); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(172); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 123: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'b') ADVANCE(155); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(127); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 124: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'b') ADVANCE(156); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'a') ADVANCE(173); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(188); END_STATE(); case 125: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'c') ADVANCE(175); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'b') ADVANCE(157); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 126: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'c') ADVANCE(164); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'b') ADVANCE(158); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 127: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'c') ADVANCE(178); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'b') ADVANCE(159); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 128: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'd') ADVANCE(181); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'c') ADVANCE(178); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 129: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(143); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'c') ADVANCE(167); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 130: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(125); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'c') ADVANCE(181); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 131: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(186); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'd') ADVANCE(184); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 132: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(174); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(146); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 133: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(187); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(128); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 134: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(201); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(189); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 135: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(203); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(177); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 136: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(207); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(190); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 137: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(151); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(204); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 138: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(117); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(206); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 139: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(153); - if (lookahead == 'o') ADVANCE(163); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(210); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 140: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(153); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(154); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 141: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'e') ADVANCE(109); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(120); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 142: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'f') ADVANCE(148); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(156); + if (lookahead == 'o') ADVANCE(166); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 143: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'f') ADVANCE(113); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(156); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 144: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'g') ADVANCE(108); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'e') ADVANCE(112); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 145: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'g') ADVANCE(110); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'f') ADVANCE(151); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 146: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'i') ADVANCE(115); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'f') ADVANCE(116); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 147: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'i') ADVANCE(112); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'g') ADVANCE(111); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 148: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'i') ADVANCE(145); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'g') ADVANCE(113); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 149: ACCEPT_TOKEN(sym_identifier); if (lookahead == 'i') ADVANCE(118); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 150: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'i') ADVANCE(120); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'i') ADVANCE(115); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 151: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(138); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'i') ADVANCE(148); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 152: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(176); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'i') ADVANCE(121); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 153: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(130); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'i') ADVANCE(123); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 154: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(134); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(141); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 155: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(135); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(179); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 156: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(136); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(133); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 157: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'l') ADVANCE(172); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(137); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 158: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'n') ADVANCE(171); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(138); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 159: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'n') ADVANCE(144); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(139); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 160: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'n') ADVANCE(142); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'l') ADVANCE(175); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 161: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'n') ADVANCE(177); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'n') ADVANCE(174); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 162: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'o') ADVANCE(128); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'n') ADVANCE(147); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 163: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'o') ADVANCE(159); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'n') ADVANCE(145); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 164: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'o') ADVANCE(160); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'n') ADVANCE(180); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 165: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(162); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'o') ADVANCE(131); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 166: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(180); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'o') ADVANCE(162); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 167: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(146); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'o') ADVANCE(163); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 168: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(147); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(165); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 169: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(149); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(183); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 170: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'r') ADVANCE(150); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(149); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 171: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 's') ADVANCE(132); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(150); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 172: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 's') ADVANCE(133); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(152); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 173: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 's') ADVANCE(141); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'r') ADVANCE(153); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 174: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(211); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 's') ADVANCE(135); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 175: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(199); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 's') ADVANCE(136); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 176: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(210); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 's') ADVANCE(144); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 177: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(205); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 't') ADVANCE(214); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 178: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(107); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 't') ADVANCE(202); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 179: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'u') ADVANCE(152); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 't') ADVANCE(213); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 180: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'u') ADVANCE(131); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 't') ADVANCE(208); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 181: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'u') ADVANCE(127); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 't') ADVANCE(110); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 182: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'v') ADVANCE(116); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'u') ADVANCE(155); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 183: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'v') ADVANCE(119); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'u') ADVANCE(134); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 184: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'v') ADVANCE(121); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'u') ADVANCE(130); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 185: ACCEPT_TOKEN(sym_identifier); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + if (lookahead == 'v') ADVANCE(119); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 186: - ACCEPT_TOKEN(anon_sym_true); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'v') ADVANCE(122); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 187: - ACCEPT_TOKEN(anon_sym_false); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'v') ADVANCE(124); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 188: - ACCEPT_TOKEN(anon_sym_DASH); + ACCEPT_TOKEN(sym_identifier); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 189: - ACCEPT_TOKEN(aux_sym_integer_literal_token1); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(189); + ACCEPT_TOKEN(anon_sym_true); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 190: - ACCEPT_TOKEN(sym_raw_string_literal); + ACCEPT_TOKEN(anon_sym_false); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 191: - ACCEPT_TOKEN(anon_sym_DQUOTE); + ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); case 192: - ACCEPT_TOKEN(aux_sym_interpreted_string_literal_token1); - if (lookahead == '*') ADVANCE(96); - if (lookahead == '/') ADVANCE(89); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(194); + ACCEPT_TOKEN(aux_sym_integer_literal_token1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(192); END_STATE(); case 193: - ACCEPT_TOKEN(aux_sym_interpreted_string_literal_token1); - if (lookahead == '/') ADVANCE(192); - if (lookahead == '\t' || - (11 <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(193); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(194); + ACCEPT_TOKEN(sym_raw_string_literal); END_STATE(); case 194: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 195: + ACCEPT_TOKEN(aux_sym_interpreted_string_literal_token1); + if (lookahead == '*') ADVANCE(100); + if (lookahead == '/') ADVANCE(91); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(197); + END_STATE(); + case 196: + ACCEPT_TOKEN(aux_sym_interpreted_string_literal_token1); + if (lookahead == '/') ADVANCE(195); + if (lookahead == '\t' || + (11 <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(196); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(197); + END_STATE(); + case 197: ACCEPT_TOKEN(aux_sym_interpreted_string_literal_token1); if (lookahead != 0 && lookahead != '\n' && lookahead != '"' && - lookahead != '\\') ADVANCE(194); - END_STATE(); - case 195: - ACCEPT_TOKEN(anon_sym_DQUOTE2); - END_STATE(); - case 196: - ACCEPT_TOKEN(sym_escape_sequence); - END_STATE(); - case 197: - ACCEPT_TOKEN(sym_escape_sequence); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(196); + lookahead != '\\') ADVANCE(197); END_STATE(); case 198: - ACCEPT_TOKEN(sym_escape_sequence); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(197); + ACCEPT_TOKEN(anon_sym_DQUOTE2); END_STATE(); case 199: - ACCEPT_TOKEN(anon_sym_select); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(sym_escape_sequence); END_STATE(); case 200: - ACCEPT_TOKEN(anon_sym_product_variable); + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(199); END_STATE(); case 201: - ACCEPT_TOKEN(anon_sym_product_variable); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(200); END_STATE(); case 202: - ACCEPT_TOKEN(anon_sym_release_variable); + ACCEPT_TOKEN(anon_sym_select); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 203: - ACCEPT_TOKEN(anon_sym_release_variable); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_product_variable); END_STATE(); case 204: - ACCEPT_TOKEN(anon_sym_variant); + ACCEPT_TOKEN(anon_sym_product_variable); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 205: - ACCEPT_TOKEN(anon_sym_variant); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_release_variable); END_STATE(); case 206: - ACCEPT_TOKEN(anon_sym_soong_config_variable); + ACCEPT_TOKEN(anon_sym_release_variable); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 207: - ACCEPT_TOKEN(anon_sym_soong_config_variable); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_variant); END_STATE(); case 208: - ACCEPT_TOKEN(anon_sym_COLON); + ACCEPT_TOKEN(anon_sym_variant); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 209: - ACCEPT_TOKEN(anon_sym_default); + ACCEPT_TOKEN(anon_sym_soong_config_variable); END_STATE(); case 210: - ACCEPT_TOKEN(anon_sym_default); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_soong_config_variable); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 211: - ACCEPT_TOKEN(anon_sym_unset); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(185); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 212: - ACCEPT_TOKEN(anon_sym_LBRACK); + ACCEPT_TOKEN(anon_sym_default); END_STATE(); case 213: - ACCEPT_TOKEN(anon_sym_RBRACK); + ACCEPT_TOKEN(anon_sym_default); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 214: - ACCEPT_TOKEN(anon_sym_PLUS); + ACCEPT_TOKEN(anon_sym_unset); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 215: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 216: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 217: ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '=') ADVANCE(101); + END_STATE(); + case 218: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '=') ADVANCE(104); END_STATE(); default: return false; @@ -5601,7 +5627,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 85}, + [1] = {.lex_state = 86}, [2] = {.lex_state = 3}, [3] = {.lex_state = 3}, [4] = {.lex_state = 4}, @@ -5615,81 +5641,81 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [12] = {.lex_state = 5}, [13] = {.lex_state = 5}, [14] = {.lex_state = 5}, - [15] = {.lex_state = 85}, - [16] = {.lex_state = 85}, - [17] = {.lex_state = 85}, - [18] = {.lex_state = 85}, - [19] = {.lex_state = 85}, - [20] = {.lex_state = 85}, - [21] = {.lex_state = 85}, - [22] = {.lex_state = 85}, - [23] = {.lex_state = 85}, - [24] = {.lex_state = 85}, - [25] = {.lex_state = 85}, - [26] = {.lex_state = 85}, - [27] = {.lex_state = 85}, - [28] = {.lex_state = 85}, - [29] = {.lex_state = 85}, - [30] = {.lex_state = 85}, - [31] = {.lex_state = 85}, - [32] = {.lex_state = 85}, - [33] = {.lex_state = 85}, - [34] = {.lex_state = 85}, - [35] = {.lex_state = 85}, + [15] = {.lex_state = 86}, + [16] = {.lex_state = 86}, + [17] = {.lex_state = 86}, + [18] = {.lex_state = 86}, + [19] = {.lex_state = 86}, + [20] = {.lex_state = 86}, + [21] = {.lex_state = 86}, + [22] = {.lex_state = 86}, + [23] = {.lex_state = 86}, + [24] = {.lex_state = 86}, + [25] = {.lex_state = 86}, + [26] = {.lex_state = 86}, + [27] = {.lex_state = 86}, + [28] = {.lex_state = 86}, + [29] = {.lex_state = 86}, + [30] = {.lex_state = 86}, + [31] = {.lex_state = 86}, + [32] = {.lex_state = 86}, + [33] = {.lex_state = 86}, + [34] = {.lex_state = 86}, + [35] = {.lex_state = 86}, [36] = {.lex_state = 5}, - [37] = {.lex_state = 85}, - [38] = {.lex_state = 85}, + [37] = {.lex_state = 86}, + [38] = {.lex_state = 86}, [39] = {.lex_state = 1}, - [40] = {.lex_state = 85}, + [40] = {.lex_state = 86}, [41] = {.lex_state = 1}, - [42] = {.lex_state = 85}, + [42] = {.lex_state = 86}, [43] = {.lex_state = 1}, [44] = {.lex_state = 3}, [45] = {.lex_state = 5}, [46] = {.lex_state = 0}, [47] = {.lex_state = 0}, - [48] = {.lex_state = 85}, - [49] = {.lex_state = 85}, - [50] = {.lex_state = 85}, + [48] = {.lex_state = 86}, + [49] = {.lex_state = 86}, + [50] = {.lex_state = 86}, [51] = {.lex_state = 0}, - [52] = {.lex_state = 85}, + [52] = {.lex_state = 86}, [53] = {.lex_state = 1}, [54] = {.lex_state = 0}, [55] = {.lex_state = 0}, - [56] = {.lex_state = 85}, + [56] = {.lex_state = 86}, [57] = {.lex_state = 0}, - [58] = {.lex_state = 85}, + [58] = {.lex_state = 86}, [59] = {.lex_state = 0}, [60] = {.lex_state = 0}, - [61] = {.lex_state = 85}, - [62] = {.lex_state = 85}, - [63] = {.lex_state = 85}, + [61] = {.lex_state = 86}, + [62] = {.lex_state = 86}, + [63] = {.lex_state = 86}, [64] = {.lex_state = 0}, - [65] = {.lex_state = 85}, - [66] = {.lex_state = 85}, + [65] = {.lex_state = 86}, + [66] = {.lex_state = 86}, [67] = {.lex_state = 0}, - [68] = {.lex_state = 85}, - [69] = {.lex_state = 85}, - [70] = {.lex_state = 85}, - [71] = {.lex_state = 85}, + [68] = {.lex_state = 86}, + [69] = {.lex_state = 86}, + [70] = {.lex_state = 86}, + [71] = {.lex_state = 86}, [72] = {.lex_state = 0}, [73] = {.lex_state = 0}, - [74] = {.lex_state = 85}, - [75] = {.lex_state = 85}, - [76] = {.lex_state = 85}, - [77] = {.lex_state = 85}, - [78] = {.lex_state = 85}, - [79] = {.lex_state = 85}, - [80] = {.lex_state = 85}, + [74] = {.lex_state = 86}, + [75] = {.lex_state = 86}, + [76] = {.lex_state = 86}, + [77] = {.lex_state = 86}, + [78] = {.lex_state = 86}, + [79] = {.lex_state = 86}, + [80] = {.lex_state = 86}, [81] = {.lex_state = 0}, - [82] = {.lex_state = 85}, - [83] = {.lex_state = 85}, - [84] = {.lex_state = 85}, - [85] = {.lex_state = 85}, - [86] = {.lex_state = 85}, - [87] = {.lex_state = 85}, - [88] = {.lex_state = 85}, - [89] = {.lex_state = 85}, + [82] = {.lex_state = 86}, + [83] = {.lex_state = 86}, + [84] = {.lex_state = 86}, + [85] = {.lex_state = 86}, + [86] = {.lex_state = 86}, + [87] = {.lex_state = 86}, + [88] = {.lex_state = 86}, + [89] = {.lex_state = 86}, [90] = {.lex_state = 0}, [91] = {.lex_state = 0}, [92] = {.lex_state = 0}, @@ -5709,7 +5735,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [106] = {.lex_state = 0}, [107] = {.lex_state = 0}, [108] = {.lex_state = 0}, - [109] = {.lex_state = 92}, + [109] = {.lex_state = 93}, [110] = {.lex_state = 0}, [111] = {.lex_state = 0}, [112] = {.lex_state = 0}, From 9457caf3a223b8fc2831ce96d9a53113d83304ea Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:44:13 +0100 Subject: [PATCH 07/20] Fix typo in a comment --- test/highlight/comments.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/highlight/comments.bp b/test/highlight/comments.bp index 6e93dc9..a355353 100644 --- a/test/highlight/comments.bp +++ b/test/highlight/comments.bp @@ -1,4 +1,4 @@ -/* This is comment */ +/* This is a comment */ /* <- comment ^ comment ^ comment From 615bb266cc7fe1f1826dfded0f77b50492c6c5f4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 18:58:33 +0100 Subject: [PATCH 08/20] Add folding query --- queries/folds.scm | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 queries/folds.scm diff --git a/queries/folds.scm b/queries/folds.scm new file mode 100644 index 0000000..6f39fe9 --- /dev/null +++ b/queries/folds.scm @@ -0,0 +1,8 @@ +[ + (list_expression) + (map_expression) + (module) + (select_expression) +] @fold + +; vim: sw=2 foldmethod=marker From 9e9fde6c77ac79a9709c4148b3ff505e77538182 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 19:04:09 +0100 Subject: [PATCH 09/20] Add 'comment' injection --- queries/injections.scm | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 queries/injections.scm diff --git a/queries/injections.scm b/queries/injections.scm new file mode 100644 index 0000000..9735c59 --- /dev/null +++ b/queries/injections.scm @@ -0,0 +1,4 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +; vim: sw=2 foldmethod=marker From 6bd28f2b6be399d6537953fdc64ab2c1539d237e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 19:42:25 +0100 Subject: [PATCH 10/20] Add NeoVim test runner For the queries that can't be tested with `tree-sitter` itself. --- Makefile | 2 ++ flake.nix | 28 +++++++++++++++++++++++ scripts/dummy_plugin/queries/bp | 1 + scripts/minimal_init.lua | 40 +++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 120000 scripts/dummy_plugin/queries/bp create mode 100644 scripts/minimal_init.lua diff --git a/Makefile b/Makefile index 4d5ad28..d60784a 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,12 @@ all: .PHONY: test test: all tree-sitter test --apply-all-captures + nvim-test-runner .PHONY: update-tests update-tests: all tree-sitter test -u --apply-all-captures + nvim-test-runner .PHONY: playground playground: diff --git a/flake.nix b/flake.nix index 2ac4027..77fba0a 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ }: let inherit (flake-utils.lib) eachDefaultSystem; + inherit (nixpkgs) lib; in eachDefaultSystem (system: @@ -46,6 +47,25 @@ overlays = [ self.overlays.default ]; }; + nvim-test-runner = pkgs.writeShellApplication { + name = "nvim-test-runner"; + + runtimeInputs = with pkgs; [ + highlight-assertions + neovim + ]; + + text = '' + export NVIM_PLENARY='${pkgs.vimPlugins.plenary-nvim}' + export NVIM_TREESITTER='${pkgs.vimPlugins.nvim-treesitter}' + export NVIM_TREESITTER_TEXTOBJECTS='${pkgs.vimPlugins.nvim-treesitter-textobjects}' + export NVIM_TREESITTER_PARSER='${pkgs.vimPlugins.nvim-treesitter.grammarToPlugin self.packages.${system}.tree-sitter-bp}' + + nvim --headless --noplugin -u ${scripts/minimal_init.lua} \ + -c "PlenaryBustedDirectory test/ { minimal_init = '${./scripts/minimal_init.lua}' }" + ''; + }; + bump-version = pkgs.writeShellScriptBin "bump-version" '' set -eu @@ -90,6 +110,13 @@ enable = true; }; + nvim-test-runner = { + enable = true; + name = "nvim tests"; + entry = "${lib.getExe nvim-test-runner}"; + pass_filenames = false; + }; + tree-sitter = { enable = true; name = "tree-sitter tests"; @@ -112,6 +139,7 @@ nativeBuildInputs = with pkgs; [ bump-version nodejs + nvim-test-runner # FIXME: waiting on #301336 # (tree-sitter.override { webUISupport = true; }) tree-sitter diff --git a/scripts/dummy_plugin/queries/bp b/scripts/dummy_plugin/queries/bp new file mode 120000 index 0000000..4578310 --- /dev/null +++ b/scripts/dummy_plugin/queries/bp @@ -0,0 +1 @@ +../../../queries \ No newline at end of file diff --git a/scripts/minimal_init.lua b/scripts/minimal_init.lua new file mode 100644 index 0000000..3813249 --- /dev/null +++ b/scripts/minimal_init.lua @@ -0,0 +1,40 @@ +vim.opt.runtimepath:append(vim.env.NVIM_PLENARY) +vim.opt.runtimepath:append(vim.env.NVIM_TREESITTER) +vim.opt.runtimepath:append(vim.env.NVIM_TREESITTER_TEXTOBJECTS) +vim.opt.runtimepath:append(vim.env.NVIM_TREESITTER_PARSER) + +vim.cmd.runtime({ "plugin/plenary.vim", bang = true }) +vim.cmd.runtime({ "plugin/nvim-treesitter.lua", bang = true }) +vim.cmd.runtime({ "plugin/nvim-treesitter-textobjects.lua", bang = true }) + +local Path = require("plenary.path") + +local project_root = Path:new(".") -- FIXME: relies on current working directory + +vim.filetype.add({ + extension = { + bp = "bp", + }, +}) + +vim.o.swapfile = false +vim.bo.swapfile = false + +local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +parser_config.bp = { + install_info = { + url = project_root.filename, + files = {"src/parser.c"}, + }, +} + +require("nvim-treesitter.configs").setup({ + indent = { enable = true }, + highlight = { enable = true }, +}) + +-- We need a hierarchy of `queries/bp/*.scm` in the runtimepath, otherwise +-- `nvim-treesitter` doesn't enable some of its features (e.g: folding). +-- The dummy plugin has a symlink following that format for our queries. +local dummy_plugin_path = project_root / "scripts" / "dummy_plugin" +vim.opt.runtimepath:append(dummy_plugin_path.filename) From 98891912458274857da85ce10ba7c2f5db9ed3c2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 22:05:33 +0100 Subject: [PATCH 11/20] Fix indentation in test files --- test/highlight/comments.bp | 15 +++++++-------- test/highlight/modules.bp | 8 ++++---- test/highlight/properties.bp | 4 ++-- test/highlight/punctuation.bp | 1 - 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/test/highlight/comments.bp b/test/highlight/comments.bp index a355353..5bc50a2 100644 --- a/test/highlight/comments.bp +++ b/test/highlight/comments.bp @@ -1,10 +1,9 @@ /* This is a comment */ -/* <- comment - ^ comment - ^ comment - */ +// <- comment +// ^ comment +// ^ comment + // And another comment -/* <- comment - ^ comment - ^ comment - */ +// <- comment +// ^ comment +// ^ comment diff --git a/test/highlight/modules.bp b/test/highlight/modules.bp index e115e6a..51ab058 100644 --- a/test/highlight/modules.bp +++ b/test/highlight/modules.bp @@ -4,16 +4,16 @@ foo {} foo () // <- function.call -foo { -// <- function.call +some_module { + // ^ function.call field: 12, // <- variable.parameter another_field: 27, // <- variable.parameter } -foo ( -// <- function.call +some_module ( + // ^ function.call field = 42, // <- variable.parameter done = false, diff --git a/test/highlight/properties.bp b/test/highlight/properties.bp index 8ad2c55..666ad20 100644 --- a/test/highlight/properties.bp +++ b/test/highlight/properties.bp @@ -1,6 +1,6 @@ foo { - field: { - // <- variable.parameter + some_field: { + // ^ variable.parameter key: 42, // <- property }, diff --git a/test/highlight/punctuation.bp b/test/highlight/punctuation.bp index bc00194..ae3ba64 100644 --- a/test/highlight/punctuation.bp +++ b/test/highlight/punctuation.bp @@ -3,7 +3,6 @@ foo ( bar = [ //^ punctuation.bracket { - // <- punctuation.bracket key: "value", // ^ punctuation.delimiter // ^ punctuation.delimiter From 9ee889d7ad0d2acf1fd4dcfefbdc5d59d385cac5 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 13 Apr 2024 16:14:46 +0100 Subject: [PATCH 12/20] Make 'punctuation' highlight test more exhaustive --- test/highlight/punctuation.bp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/highlight/punctuation.bp b/test/highlight/punctuation.bp index ae3ba64..72deda4 100644 --- a/test/highlight/punctuation.bp +++ b/test/highlight/punctuation.bp @@ -6,9 +6,21 @@ foo ( key: "value", // ^ punctuation.delimiter // ^ punctuation.delimiter + another: {}, + // ^ punctuation.bracket + // ^ punctuation.bracket }, // <- punctuation.bracket - ] + ], + // <- punctuation.bracket + baz = { + //^ punctuation.bracket + key: [], + // ^ punctuation.delimiter + // ^ punctuation.bracket + // ^ punctuation.bracket + // ^ punctuation.delimiter + }, // <- punctuation.bracket ) // <- punctuation.bracket From f8f328fa174b24ca5a8e2d6d78590d463ee035d9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 11 Apr 2024 19:42:25 +0100 Subject: [PATCH 13/20] Add indentation queries --- queries/indents.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 queries/indents.scm diff --git a/queries/indents.scm b/queries/indents.scm new file mode 100644 index 0000000..9e63d1e --- /dev/null +++ b/queries/indents.scm @@ -0,0 +1,27 @@ +; Expressions {{{ +(list_expression) @indent.begin +(list_expression + "]" @indent.branch) + +(map_expression) @indent.begin +(map_expression + "}" @indent.branch) + +(select_expression) @indent.begin +(select_expression + ")" @indent.branch) + +(select_cases) @indent.begin +(select_cases + "}" @indent.branch) +; }}} + +; Declarations {{{ +(module) @indent.begin +(module + ")" @indent.branch) +(module + "}" @indent.branch) +; }}} + +; vim: sw=2 foldmethod=marker From 0ca28eb2e9b276bae4417f240c39efcb58bf79ad Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 13 Apr 2024 17:04:55 +0100 Subject: [PATCH 14/20] Add indentation tests --- test/indent/expressions.bp | 22 ++++++++++++++++++ test/indent/select.bp | 28 +++++++++++++++++++++++ test/indent_spec.lua | 47 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 test/indent/expressions.bp create mode 100644 test/indent/select.bp create mode 100644 test/indent_spec.lua diff --git a/test/indent/expressions.bp b/test/indent/expressions.bp new file mode 100644 index 0000000..a65ce9a --- /dev/null +++ b/test/indent/expressions.bp @@ -0,0 +1,22 @@ +foo = 1 + 2 + +foo = [ + 1, + 2, + 3, +] + +foo = { + foo: [ + "bar", + ], +}, + +foo = { + foo: [ + "bar", + { + key: "value", + }, + ], +}, diff --git a/test/indent/select.bp b/test/indent/select.bp new file mode 100644 index 0000000..6d95b2c --- /dev/null +++ b/test/indent/select.bp @@ -0,0 +1,28 @@ +foo = select(variant("VARIANT"), { + "x86": "my_x86", + "x86_64": [ + "x86", + "x64", + ], + "arm": { + some: "aarch", + value: "aarch64", + }, + default: 0, +}) + +foo = select( + variant("VARIANT"), + { + "x86": "my_x86", + "x86_64": [ + "x86", + "x64", + ], + "arm": { + some: "aarch", + value: "aarch64", + }, + default: 0, + } +) diff --git a/test/indent_spec.lua b/test/indent_spec.lua new file mode 100644 index 0000000..f36145d --- /dev/null +++ b/test/indent_spec.lua @@ -0,0 +1,47 @@ +package.path = package.path .. ";" .. vim.env.NVIM_TREESITTER .. "/?.lua" + +local Runner = require("tests.indent.common").Runner + +-- FIXME: path to root +local runner = Runner:new(it, ".", { + tabstop = 4, + shiftwidth = 4, + softtabstop = 0, + expandtab = true, +}) + +describe("indent Blueprint:", function() + describe("whole file:", function() + runner:whole_file("test/highlight/", { + expected_failures = { + -- NOTE: none for now + }, + }) + runner:whole_file("test/indent/", { + expected_failures = { + -- NOTE: none for now + }, + }) + end) + + describe("new line:", function() + runner:new_line("test/indent/expressions.bp", { on_line = 2, text = "foo = 42", indent = 0 }, "variable declaration") + runner:new_line("test/indent/expressions.bp", { on_line = 4, text = "0,", indent = 4 }, "list element") + runner:new_line("test/indent/expressions.bp", { on_line = 6, text = "]", indent = 0 }, "list closing delimiter") + runner:new_line("test/indent/expressions.bp", { on_line = 9, text = "key: 42", indent = 4 }, "map property") + runner:new_line("test/indent/expressions.bp", { on_line = 12, text = "key: 42", indent = 4 }, "map property, trailing") + runner:new_line("test/indent/expressions.bp", { on_line = 9, text = "}", indent = 0 }, "map closing delimiter") + runner:new_line("test/indent/expressions.bp", { on_line = 11, text = "]", indent = 4 }, "nested list closing delimiter") + runner:new_line("test/indent/expressions.bp", { on_line = 18, text = "key: 42", indent = 12 }, "nested map property") + runner:new_line("test/indent/expressions.bp", { on_line = 19, text = "key: 42", indent = 12 }, "nested map property, trailing") + + runner:new_line("test/indent/select.bp", { on_line = 1, text = '"case": "value"', indent = 4 }, "select case") + runner:new_line("test/indent/select.bp", { on_line = 1, text = 'default: "value"', indent = 4 }, "default case") + runner:new_line("test/indent/select.bp", { on_line = 11, text = '"case": "value"', indent = 4 }, "select case, trailing") + runner:new_line("test/indent/select.bp", { on_line = 11, text = 'default: "value"', indent = 4 }, "default case, trailing") + runner:new_line("test/indent/select.bp", { on_line = 16, text = '"case": "value"', indent = 8 }, "select case, alternate formatting") + runner:new_line("test/indent/select.bp", { on_line = 16, text = 'default: "value"', indent = 8 }, "default case, alternate formatting") + runner:new_line("test/indent/select.bp", { on_line = 26, text = '"case": "value"', indent = 8 }, "select case, trailing, alternate formattingg") + runner:new_line("test/indent/select.bp", { on_line = 26, text = 'default: "value"', indent = 8 }, "default case, trailing, alternate formattingn") + end) +end) From cc84a43055afcd7230b2c61cdca604d7edd40b41 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 13 Apr 2024 17:11:41 +0100 Subject: [PATCH 15/20] Release 0.2.0 --- Cargo.toml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 28da48a..4707f77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-bp" description = "Blueprint grammar for the tree-sitter parsing library" -version = "0.1.0" +version = "0.2.0" keywords = ["incremental", "parsing", "android", "blueprint"] categories = ["parsing", "text-editors"] repository = "https://git.belanyi.fr/ambroisie/tree-sitter-bp" diff --git a/package.json b/package.json index 5b2c53d..3c864d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tree-sitter-bp", - "version": "0.1.0", + "version": "0.2.0", "description": "Blueprint grammar for tree-sitter", "main": "bindings/node", "keywords": [ From bb8a48812c2fa258d0d8bc303218043f425a8e90 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Apr 2024 12:49:36 +0100 Subject: [PATCH 16/20] WIP(tests): Hide 'select_cases' rule It doesn't provide any more information to expose it. --- grammar.js | 4 +- queries/indents.scm | 8 ++-- src/grammar.json | 4 +- src/node-types.json | 25 +++-------- src/parser.c | 40 +++++++++--------- test/corpus/select.txt | 94 ++++++++++++++++++++---------------------- 6 files changed, 78 insertions(+), 97 deletions(-) diff --git a/grammar.js b/grammar.js index 2f4b0e3..edafd3d 100644 --- a/grammar.js +++ b/grammar.js @@ -123,7 +123,7 @@ module.exports = grammar({ "(", choice($.select_value, $.soong_config_variable), ",", - $.select_cases, + $._select_cases, ")", ), @@ -151,7 +151,7 @@ module.exports = grammar({ ")", ), - select_cases: ($) => seq( + _select_cases: ($) => seq( "{", optional(trailingCommaSeparated($.select_case)), // default *must* be the last one, enforced at parse-time... diff --git a/queries/indents.scm b/queries/indents.scm index 9e63d1e..2797122 100644 --- a/queries/indents.scm +++ b/queries/indents.scm @@ -11,9 +11,11 @@ (select_expression ")" @indent.branch) -(select_cases) @indent.begin -(select_cases - "}" @indent.branch) +; FIXME: how to fix this +; (select_expression +; "{" @indent.begin) +; (select_expression +; "}" @indent.branch) ; }}} ; Declarations {{{ diff --git a/src/grammar.json b/src/grammar.json index 482f27b..bd1e9e4 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -487,7 +487,7 @@ }, { "type": "SYMBOL", - "name": "select_cases" + "name": "_select_cases" }, { "type": "STRING", @@ -597,7 +597,7 @@ } ] }, - "select_cases": { + "_select_cases": { "type": "SEQ", "members": [ { diff --git a/src/node-types.json b/src/node-types.json index 1db28a2..3871787 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -473,25 +473,6 @@ } } }, - { - "type": "select_cases", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "default_case", - "named": true - }, - { - "type": "select_case", - "named": true - } - ] - } - }, { "type": "select_expression", "named": true, @@ -501,7 +482,11 @@ "required": true, "types": [ { - "type": "select_cases", + "type": "default_case", + "named": true + }, + { + "type": "select_case", "named": true }, { diff --git a/src/parser.c b/src/parser.c index f06de7f..7aa7d3a 100644 --- a/src/parser.c +++ b/src/parser.c @@ -65,7 +65,7 @@ enum ts_symbol_identifiers { sym_select_expression = 46, sym_select_value = 47, sym_soong_config_variable = 48, - sym_select_cases = 49, + sym__select_cases = 49, sym_select_case = 50, sym_default_case = 51, sym__case_value = 52, @@ -78,7 +78,7 @@ enum ts_symbol_identifiers { aux_sym__old_module_repeat1 = 59, aux_sym__new_module_repeat1 = 60, aux_sym_interpreted_string_literal_repeat1 = 61, - aux_sym_select_cases_repeat1 = 62, + aux_sym__select_cases_repeat1 = 62, aux_sym_list_expression_repeat1 = 63, }; @@ -132,7 +132,7 @@ static const char * const ts_symbol_names[] = { [sym_select_expression] = "select_expression", [sym_select_value] = "select_value", [sym_soong_config_variable] = "soong_config_variable", - [sym_select_cases] = "select_cases", + [sym__select_cases] = "_select_cases", [sym_select_case] = "select_case", [sym_default_case] = "default_case", [sym__case_value] = "_case_value", @@ -145,7 +145,7 @@ static const char * const ts_symbol_names[] = { [aux_sym__old_module_repeat1] = "_old_module_repeat1", [aux_sym__new_module_repeat1] = "_new_module_repeat1", [aux_sym_interpreted_string_literal_repeat1] = "interpreted_string_literal_repeat1", - [aux_sym_select_cases_repeat1] = "select_cases_repeat1", + [aux_sym__select_cases_repeat1] = "_select_cases_repeat1", [aux_sym_list_expression_repeat1] = "list_expression_repeat1", }; @@ -199,7 +199,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_select_expression] = sym_select_expression, [sym_select_value] = sym_select_value, [sym_soong_config_variable] = sym_soong_config_variable, - [sym_select_cases] = sym_select_cases, + [sym__select_cases] = sym__select_cases, [sym_select_case] = sym_select_case, [sym_default_case] = sym_default_case, [sym__case_value] = sym__case_value, @@ -212,7 +212,7 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym__old_module_repeat1] = aux_sym__old_module_repeat1, [aux_sym__new_module_repeat1] = aux_sym__new_module_repeat1, [aux_sym_interpreted_string_literal_repeat1] = aux_sym_interpreted_string_literal_repeat1, - [aux_sym_select_cases_repeat1] = aux_sym_select_cases_repeat1, + [aux_sym__select_cases_repeat1] = aux_sym__select_cases_repeat1, [aux_sym_list_expression_repeat1] = aux_sym_list_expression_repeat1, }; @@ -413,8 +413,8 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_select_cases] = { - .visible = true, + [sym__select_cases] = { + .visible = false, .named = true, }, [sym_select_case] = { @@ -465,7 +465,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_select_cases_repeat1] = { + [aux_sym__select_cases_repeat1] = { .visible = false, .named = false, }, @@ -6213,7 +6213,7 @@ static const uint16_t ts_small_parse_table[] = { STATE(12), 1, sym_comment, STATE(14), 1, - aux_sym_select_cases_repeat1, + aux_sym__select_cases_repeat1, STATE(19), 1, sym_interpreted_string_literal, STATE(102), 1, @@ -6236,7 +6236,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(41), 1, anon_sym_RBRACE, STATE(12), 1, - aux_sym_select_cases_repeat1, + aux_sym__select_cases_repeat1, STATE(13), 1, sym_comment, STATE(19), 1, @@ -6267,7 +6267,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_default, STATE(14), 2, sym_comment, - aux_sym_select_cases_repeat1, + aux_sym__select_cases_repeat1, [655] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, @@ -7171,7 +7171,7 @@ static const uint16_t ts_small_parse_table[] = { STATE(81), 1, sym_comment, STATE(95), 1, - sym_select_cases, + sym__select_cases, [1905] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, @@ -7687,9 +7687,9 @@ static const TSParseActionEntry ts_parse_actions[] = { [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_select_cases_repeat1, 2), - [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_select_cases_repeat1, 2), SHIFT_REPEAT(19), - [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_select_cases_repeat1, 2), SHIFT_REPEAT(41), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), + [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(19), + [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(41), [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 2), [53] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 3), [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), @@ -7789,11 +7789,11 @@ static const TSParseActionEntry ts_parse_actions[] = { [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_cases, 5), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 5), [257] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_cases, 2), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 2), [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), @@ -7805,14 +7805,14 @@ static const TSParseActionEntry ts_parse_actions[] = { [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), [283] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_cases, 3), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 3), [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), [291] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_default_case, 3, .production_id = 16), [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_case, 3, .production_id = 16), - [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_cases, 4), + [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 4), [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3), }; diff --git a/test/corpus/select.txt b/test/corpus/select.txt index fb76530..63395e9 100644 --- a/test/corpus/select.txt +++ b/test/corpus/select.txt @@ -17,12 +17,11 @@ foo = select(release_variable("RELEASE_TEST"), { (select_value (selection_type) (interpreted_string_literal)) - (select_cases - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (default_case - (unset)))))) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (default_case + (unset))))) ================================================================================ Select (soong config variable) @@ -44,13 +43,12 @@ foo = select(soong_config_variable("my_namespace", "my_var"), { (selection_type) (interpreted_string_literal) (interpreted_string_literal)) - (select_cases - (select_case - (interpreted_string_literal) - (unset)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)))))) + (select_case + (interpreted_string_literal) + (unset)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal))))) ================================================================================ Select (no default) @@ -73,19 +71,18 @@ foo = select(variant("arch"), { (select_value (selection_type) (interpreted_string_literal)) - (select_cases - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)))))) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal))))) ================================================================================ Select (no values) @@ -102,8 +99,7 @@ foo = select(variant("VARIANT"), {}) (select_expression (select_value (selection_type) - (interpreted_string_literal)) - (select_cases)))) + (interpreted_string_literal))))) ================================================================================ Select (default in wrong order) @@ -127,22 +123,21 @@ foo = select(variant("VARIANT"), { (select_value (selection_type) (interpreted_string_literal)) - (select_cases - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (ERROR - (default_case - (unset))) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)) - (select_case - (interpreted_string_literal) - (interpreted_string_literal)))))) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (ERROR + (default_case + (unset))) + (select_case + (interpreted_string_literal) + (interpreted_string_literal)) + (select_case + (interpreted_string_literal) + (interpreted_string_literal))))) ================================================================================ Select (no condition) @@ -163,12 +158,11 @@ foo = select(variant(), { (select_value (selection_type) (MISSING raw_string_literal)) - (select_cases - (select_case - (interpreted_string_literal) - (unset)) - (default_case - (interpreted_string_literal)))))) + (select_case + (interpreted_string_literal) + (unset)) + (default_case + (interpreted_string_literal))))) ================================================================================ Select (invalid type) From 69000556d4025db4ee2fae51783c89ddd6806577 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Apr 2024 13:08:02 +0100 Subject: [PATCH 17/20] Add 'default' alias This makes it appear in the tree as a named node. --- grammar.js | 2 +- queries/highlights.scm | 2 +- src/grammar.json | 7 ++++++- src/node-types.json | 4 ++-- src/parser.c | 2 +- test/corpus/select.txt | 6 +++++- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/grammar.js b/grammar.js index edafd3d..facfde5 100644 --- a/grammar.js +++ b/grammar.js @@ -166,7 +166,7 @@ module.exports = grammar({ ), default_case: ($) => seq( - field("pattern", "default"), + field("pattern", alias("default", $.default)), ":", field("value", $._case_value), ), diff --git a/queries/highlights.scm b/queries/highlights.scm index e548e18..4209180 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -49,7 +49,7 @@ ; Built-ins {{{ [ (unset) - "default" + (default) ] @variable.builtin (selection_type) @function.builtin ; }}} diff --git a/src/grammar.json b/src/grammar.json index bd1e9e4..c3b8ea2 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -687,7 +687,12 @@ "type": "FIELD", "name": "pattern", "content": { - "type": "STRING", + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "default" + }, + "named": true, "value": "default" } }, diff --git a/src/node-types.json b/src/node-types.json index 3871787..804a8ca 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -187,7 +187,7 @@ "types": [ { "type": "default", - "named": false + "named": true } ] }, @@ -653,7 +653,7 @@ }, { "type": "default", - "named": false + "named": true }, { "type": "escape_sequence", diff --git a/src/parser.c b/src/parser.c index 7aa7d3a..3861c15 100644 --- a/src/parser.c +++ b/src/parser.c @@ -335,7 +335,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }, [anon_sym_default] = { .visible = true, - .named = false, + .named = true, }, [anon_sym_unset] = { .visible = true, diff --git a/test/corpus/select.txt b/test/corpus/select.txt index 63395e9..ddaa8f2 100644 --- a/test/corpus/select.txt +++ b/test/corpus/select.txt @@ -21,6 +21,7 @@ foo = select(release_variable("RELEASE_TEST"), { (interpreted_string_literal) (interpreted_string_literal)) (default_case + (default) (unset))))) ================================================================================ @@ -131,6 +132,7 @@ foo = select(variant("VARIANT"), { (interpreted_string_literal)) (ERROR (default_case + (default) (unset))) (select_case (interpreted_string_literal) @@ -162,6 +164,7 @@ foo = select(variant(), { (interpreted_string_literal) (unset)) (default_case + (default) (interpreted_string_literal))))) ================================================================================ @@ -183,7 +186,8 @@ foo = select(some_unknown_type("CONDITION"), { (identifier) (identifier) (interpreted_string_literal) - (interpreted_string_literal)) + (interpreted_string_literal) + (default)) (interpreted_string_literal)) (ERROR)) From 387dc2d3ad7b8d2d9fd8412bc56899dfd45dbc31 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Apr 2024 13:09:48 +0100 Subject: [PATCH 18/20] Alias 'default_case' to 'select_case' There's not much use in the node being a different name. --- grammar.js | 2 +- src/grammar.json | 9 ++++-- src/node-types.json | 70 +++--------------------------------------- src/parser.c | 4 +-- test/corpus/select.txt | 6 ++-- 5 files changed, 17 insertions(+), 74 deletions(-) diff --git a/grammar.js b/grammar.js index facfde5..0b56000 100644 --- a/grammar.js +++ b/grammar.js @@ -155,7 +155,7 @@ module.exports = grammar({ "{", optional(trailingCommaSeparated($.select_case)), // default *must* be the last one, enforced at parse-time... - optional(seq($.default_case, ",")), + optional(seq(alias($.default_case, $.select_case), ",")), "}", ), diff --git a/src/grammar.json b/src/grammar.json index c3b8ea2..0400043 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -635,8 +635,13 @@ "type": "SEQ", "members": [ { - "type": "SYMBOL", - "name": "default_case" + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "default_case" + }, + "named": true, + "value": "select_case" }, { "type": "STRING", diff --git a/src/node-types.json b/src/node-types.json index 804a8ca..24a3425 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -177,68 +177,6 @@ "named": true, "fields": {} }, - { - "type": "default_case", - "named": true, - "fields": { - "pattern": { - "multiple": false, - "required": true, - "types": [ - { - "type": "default", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "boolean_literal", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "integer_literal", - "named": true - }, - { - "type": "interpreted_string_literal", - "named": true - }, - { - "type": "list_expression", - "named": true - }, - { - "type": "map_expression", - "named": true - }, - { - "type": "raw_string_literal", - "named": true - }, - { - "type": "select_expression", - "named": true - }, - { - "type": "unset", - "named": true - } - ] - } - } - }, { "type": "integer_literal", "named": true, @@ -415,6 +353,10 @@ "multiple": false, "required": true, "types": [ + { + "type": "default", + "named": true + }, { "type": "interpreted_string_literal", "named": true @@ -481,10 +423,6 @@ "multiple": true, "required": true, "types": [ - { - "type": "default_case", - "named": true - }, { "type": "select_case", "named": true diff --git a/src/parser.c b/src/parser.c index 3861c15..b10080e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -134,7 +134,7 @@ static const char * const ts_symbol_names[] = { [sym_soong_config_variable] = "soong_config_variable", [sym__select_cases] = "_select_cases", [sym_select_case] = "select_case", - [sym_default_case] = "default_case", + [sym_default_case] = "select_case", [sym__case_value] = "_case_value", [sym_list_expression] = "list_expression", [sym_map_expression] = "map_expression", @@ -201,7 +201,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_soong_config_variable] = sym_soong_config_variable, [sym__select_cases] = sym__select_cases, [sym_select_case] = sym_select_case, - [sym_default_case] = sym_default_case, + [sym_default_case] = sym_select_case, [sym__case_value] = sym__case_value, [sym_list_expression] = sym_list_expression, [sym_map_expression] = sym_map_expression, diff --git a/test/corpus/select.txt b/test/corpus/select.txt index ddaa8f2..205e13e 100644 --- a/test/corpus/select.txt +++ b/test/corpus/select.txt @@ -20,7 +20,7 @@ foo = select(release_variable("RELEASE_TEST"), { (select_case (interpreted_string_literal) (interpreted_string_literal)) - (default_case + (select_case (default) (unset))))) @@ -131,7 +131,7 @@ foo = select(variant("VARIANT"), { (interpreted_string_literal) (interpreted_string_literal)) (ERROR - (default_case + (select_case (default) (unset))) (select_case @@ -163,7 +163,7 @@ foo = select(variant(), { (select_case (interpreted_string_literal) (unset)) - (default_case + (select_case (default) (interpreted_string_literal))))) From 8f4af134e3cbefa282bf330756b86677618b80d6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Apr 2024 13:01:49 +0100 Subject: [PATCH 19/20] WIP: Merge 'select_case' and 'default_case' Not sure whether I like this change or not... IMO this might be too lax. --- grammar.js | 16 +- src/grammar.json | 74 +- src/parser.c | 2182 +++++++++++++++++++--------------------- test/corpus/select.txt | 7 +- 4 files changed, 1033 insertions(+), 1246 deletions(-) diff --git a/grammar.js b/grammar.js index 0b56000..848ec83 100644 --- a/grammar.js +++ b/grammar.js @@ -2,10 +2,6 @@ function commaSeparated(elem) { return seq(elem, repeat(seq(",", elem)), optional(",")) } -function trailingCommaSeparated(elem) { - return repeat(seq(elem, ",")) -} - module.exports = grammar({ name: "bp", @@ -153,24 +149,16 @@ module.exports = grammar({ _select_cases: ($) => seq( "{", - optional(trailingCommaSeparated($.select_case)), - // default *must* be the last one, enforced at parse-time... - optional(seq(alias($.default_case, $.select_case), ",")), + optional(repeat(seq($.select_case, ","))), "}", ), select_case: ($) => seq( - field("pattern", $._string_literal), + field("pattern", choice(alias("default", $.default), $._string_literal)), ":", field("value", $._case_value) ), - default_case: ($) => seq( - field("pattern", alias("default", $.default)), - ":", - field("value", $._case_value), - ), - _case_value: ($) => choice( alias("unset", $.unset), $._expr, diff --git a/src/grammar.json b/src/grammar.json index 0400043..0a90627 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -628,32 +628,6 @@ } ] }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "default_case" - }, - "named": true, - "value": "select_case" - }, - { - "type": "STRING", - "value": "," - } - ] - }, - { - "type": "BLANK" - } - ] - }, { "type": "STRING", "value": "}" @@ -667,38 +641,22 @@ "type": "FIELD", "name": "pattern", "content": { - "type": "SYMBOL", - "name": "_string_literal" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "_case_value" - } - } - ] - }, - "default_case": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "pattern", - "content": { - "type": "ALIAS", - "content": { - "type": "STRING", - "value": "default" - }, - "named": true, - "value": "default" + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "default" + }, + "named": true, + "value": "default" + }, + { + "type": "SYMBOL", + "name": "_string_literal" + } + ] } }, { diff --git a/src/parser.c b/src/parser.c index b10080e..0586e8d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,9 +6,9 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 123 +#define STATE_COUNT 114 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 64 +#define SYMBOL_COUNT 63 #define ALIAS_COUNT 0 #define TOKEN_COUNT 34 #define EXTERNAL_TOKEN_COUNT 0 @@ -44,8 +44,8 @@ enum ts_symbol_identifiers { anon_sym_release_variable = 25, anon_sym_variant = 26, anon_sym_soong_config_variable = 27, - anon_sym_COLON = 28, - anon_sym_default = 29, + anon_sym_default = 28, + anon_sym_COLON = 29, anon_sym_unset = 30, anon_sym_LBRACK = 31, anon_sym_RBRACK = 32, @@ -67,19 +67,18 @@ enum ts_symbol_identifiers { sym_soong_config_variable = 48, sym__select_cases = 49, sym_select_case = 50, - sym_default_case = 51, - sym__case_value = 52, - sym_list_expression = 53, - sym_map_expression = 54, - sym_binary_expression = 55, - sym__colon_property = 56, - sym__equal_property = 57, - aux_sym_source_file_repeat1 = 58, - aux_sym__old_module_repeat1 = 59, - aux_sym__new_module_repeat1 = 60, - aux_sym_interpreted_string_literal_repeat1 = 61, - aux_sym__select_cases_repeat1 = 62, - aux_sym_list_expression_repeat1 = 63, + sym__case_value = 51, + sym_list_expression = 52, + sym_map_expression = 53, + sym_binary_expression = 54, + sym__colon_property = 55, + sym__equal_property = 56, + aux_sym_source_file_repeat1 = 57, + aux_sym__old_module_repeat1 = 58, + aux_sym__new_module_repeat1 = 59, + aux_sym_interpreted_string_literal_repeat1 = 60, + aux_sym__select_cases_repeat1 = 61, + aux_sym_list_expression_repeat1 = 62, }; static const char * const ts_symbol_names[] = { @@ -111,8 +110,8 @@ static const char * const ts_symbol_names[] = { [anon_sym_release_variable] = "selection_type", [anon_sym_variant] = "selection_type", [anon_sym_soong_config_variable] = "selection_type", - [anon_sym_COLON] = ":", [anon_sym_default] = "default", + [anon_sym_COLON] = ":", [anon_sym_unset] = "unset", [anon_sym_LBRACK] = "[", [anon_sym_RBRACK] = "]", @@ -134,7 +133,6 @@ static const char * const ts_symbol_names[] = { [sym_soong_config_variable] = "soong_config_variable", [sym__select_cases] = "_select_cases", [sym_select_case] = "select_case", - [sym_default_case] = "select_case", [sym__case_value] = "_case_value", [sym_list_expression] = "list_expression", [sym_map_expression] = "map_expression", @@ -178,8 +176,8 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_release_variable] = anon_sym_product_variable, [anon_sym_variant] = anon_sym_product_variable, [anon_sym_soong_config_variable] = anon_sym_product_variable, - [anon_sym_COLON] = anon_sym_COLON, [anon_sym_default] = anon_sym_default, + [anon_sym_COLON] = anon_sym_COLON, [anon_sym_unset] = anon_sym_unset, [anon_sym_LBRACK] = anon_sym_LBRACK, [anon_sym_RBRACK] = anon_sym_RBRACK, @@ -201,7 +199,6 @@ static const TSSymbol ts_symbol_map[] = { [sym_soong_config_variable] = sym_soong_config_variable, [sym__select_cases] = sym__select_cases, [sym_select_case] = sym_select_case, - [sym_default_case] = sym_select_case, [sym__case_value] = sym__case_value, [sym_list_expression] = sym_list_expression, [sym_map_expression] = sym_map_expression, @@ -329,14 +326,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [anon_sym_COLON] = { - .visible = true, - .named = false, - }, [anon_sym_default] = { .visible = true, .named = true, }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, [anon_sym_unset] = { .visible = true, .named = true, @@ -421,10 +418,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_default_case] = { - .visible = true, - .named = true, - }, [sym__case_value] = { .visible = false, .named = true, @@ -708,15 +701,6 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [111] = 111, [112] = 112, [113] = 113, - [114] = 114, - [115] = 115, - [116] = 116, - [117] = 117, - [118] = 118, - [119] = 119, - [120] = 120, - [121] = 121, - [122] = 122, }; static inline bool sym_identifier_character_set_1(int32_t c) { @@ -4586,7 +4570,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == ',') ADVANCE(106); if (lookahead == '-') ADVANCE(191); if (lookahead == '/') ADVANCE(102); - if (lookahead == ':') ADVANCE(211); + if (lookahead == ':') ADVANCE(213); if (lookahead == '=') ADVANCE(103); if (lookahead == '[') ADVANCE(215); if (lookahead == '\\') ADVANCE(11); @@ -4870,7 +4854,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 's') ADVANCE(39); END_STATE(); case 67: - if (lookahead == 't') ADVANCE(212); + if (lookahead == 't') ADVANCE(211); END_STATE(); case 68: if (lookahead == 't') ADVANCE(207); @@ -4953,7 +4937,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == ',') ADVANCE(106); if (lookahead == '-') ADVANCE(191); if (lookahead == '/') ADVANCE(102); - if (lookahead == ':') ADVANCE(211); + if (lookahead == ':') ADVANCE(213); if (lookahead == '=') ADVANCE(103); if (lookahead == '[') ADVANCE(215); if (lookahead == ']') ADVANCE(216); @@ -4980,7 +4964,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == '+') ADVANCE(217); if (lookahead == ',') ADVANCE(106); if (lookahead == '/') ADVANCE(6); - if (lookahead == ':') ADVANCE(211); + if (lookahead == ':') ADVANCE(213); if (lookahead == ']') ADVANCE(216); if (lookahead == '`') ADVANCE(84); if (lookahead == '}') ADVANCE(107); @@ -5452,7 +5436,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 179: ACCEPT_TOKEN(sym_identifier); - if (lookahead == 't') ADVANCE(213); + if (lookahead == 't') ADVANCE(212); if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 180: @@ -5594,14 +5578,14 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 211: - ACCEPT_TOKEN(anon_sym_COLON); + ACCEPT_TOKEN(anon_sym_default); END_STATE(); case 212: ACCEPT_TOKEN(anon_sym_default); + if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); END_STATE(); case 213: - ACCEPT_TOKEN(anon_sym_default); - if (sym_identifier_character_set_4(lookahead)) ADVANCE(188); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 214: ACCEPT_TOKEN(anon_sym_unset); @@ -5629,7 +5613,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, [1] = {.lex_state = 86}, [2] = {.lex_state = 3}, - [3] = {.lex_state = 3}, + [3] = {.lex_state = 4}, [4] = {.lex_state = 4}, [5] = {.lex_state = 4}, [6] = {.lex_state = 4}, @@ -5637,7 +5621,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [8] = {.lex_state = 4}, [9] = {.lex_state = 4}, [10] = {.lex_state = 4}, - [11] = {.lex_state = 4}, + [11] = {.lex_state = 86}, [12] = {.lex_state = 5}, [13] = {.lex_state = 5}, [14] = {.lex_state = 5}, @@ -5661,53 +5645,53 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [32] = {.lex_state = 86}, [33] = {.lex_state = 86}, [34] = {.lex_state = 86}, - [35] = {.lex_state = 86}, - [36] = {.lex_state = 5}, - [37] = {.lex_state = 86}, + [35] = {.lex_state = 5}, + [36] = {.lex_state = 1}, + [37] = {.lex_state = 3}, [38] = {.lex_state = 86}, - [39] = {.lex_state = 1}, - [40] = {.lex_state = 86}, - [41] = {.lex_state = 1}, - [42] = {.lex_state = 86}, + [39] = {.lex_state = 86}, + [40] = {.lex_state = 1}, + [41] = {.lex_state = 86}, + [42] = {.lex_state = 5}, [43] = {.lex_state = 1}, - [44] = {.lex_state = 3}, - [45] = {.lex_state = 5}, - [46] = {.lex_state = 0}, + [44] = {.lex_state = 86}, + [45] = {.lex_state = 86}, + [46] = {.lex_state = 86}, [47] = {.lex_state = 0}, - [48] = {.lex_state = 86}, + [48] = {.lex_state = 1}, [49] = {.lex_state = 86}, - [50] = {.lex_state = 86}, + [50] = {.lex_state = 0}, [51] = {.lex_state = 0}, [52] = {.lex_state = 86}, - [53] = {.lex_state = 1}, + [53] = {.lex_state = 86}, [54] = {.lex_state = 0}, - [55] = {.lex_state = 0}, - [56] = {.lex_state = 86}, - [57] = {.lex_state = 0}, + [55] = {.lex_state = 86}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 86}, [58] = {.lex_state = 86}, - [59] = {.lex_state = 0}, + [59] = {.lex_state = 86}, [60] = {.lex_state = 0}, [61] = {.lex_state = 86}, - [62] = {.lex_state = 86}, - [63] = {.lex_state = 86}, + [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, [64] = {.lex_state = 0}, [65] = {.lex_state = 86}, [66] = {.lex_state = 86}, - [67] = {.lex_state = 0}, - [68] = {.lex_state = 86}, + [67] = {.lex_state = 86}, + [68] = {.lex_state = 0}, [69] = {.lex_state = 86}, - [70] = {.lex_state = 86}, + [70] = {.lex_state = 0}, [71] = {.lex_state = 86}, [72] = {.lex_state = 0}, - [73] = {.lex_state = 0}, + [73] = {.lex_state = 86}, [74] = {.lex_state = 86}, [75] = {.lex_state = 86}, [76] = {.lex_state = 86}, [77] = {.lex_state = 86}, [78] = {.lex_state = 86}, [79] = {.lex_state = 86}, - [80] = {.lex_state = 86}, - [81] = {.lex_state = 0}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 86}, [82] = {.lex_state = 86}, [83] = {.lex_state = 86}, [84] = {.lex_state = 86}, @@ -5715,7 +5699,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [86] = {.lex_state = 86}, [87] = {.lex_state = 86}, [88] = {.lex_state = 86}, - [89] = {.lex_state = 86}, + [89] = {.lex_state = 93}, [90] = {.lex_state = 0}, [91] = {.lex_state = 0}, [92] = {.lex_state = 0}, @@ -5735,20 +5719,11 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [106] = {.lex_state = 0}, [107] = {.lex_state = 0}, [108] = {.lex_state = 0}, - [109] = {.lex_state = 93}, + [109] = {.lex_state = 7}, [110] = {.lex_state = 0}, [111] = {.lex_state = 0}, - [112] = {.lex_state = 0}, - [113] = {.lex_state = 0}, - [114] = {.lex_state = 7}, - [115] = {.lex_state = 0}, - [116] = {.lex_state = 0}, - [117] = {.lex_state = 0}, - [118] = {.lex_state = 0}, - [119] = {.lex_state = 0}, - [120] = {.lex_state = 0}, - [121] = {(TSStateId)(-1)}, - [122] = {(TSStateId)(-1)}, + [112] = {(TSStateId)(-1)}, + [113] = {(TSStateId)(-1)}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -5779,22 +5754,22 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_release_variable] = ACTIONS(1), [anon_sym_variant] = ACTIONS(1), [anon_sym_soong_config_variable] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), [anon_sym_default] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), [anon_sym_unset] = ACTIONS(1), [anon_sym_LBRACK] = ACTIONS(1), [anon_sym_RBRACK] = ACTIONS(1), [anon_sym_PLUS] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(110), - [sym__definition] = STATE(77), + [sym_source_file] = STATE(104), + [sym__definition] = STATE(82), [sym_comment] = STATE(1), - [sym_assignment] = STATE(79), - [sym_module] = STATE(79), - [sym__old_module] = STATE(80), - [sym__new_module] = STATE(84), - [aux_sym_source_file_repeat1] = STATE(17), + [sym_assignment] = STATE(78), + [sym_module] = STATE(78), + [sym__old_module] = STATE(76), + [sym__new_module] = STATE(75), + [aux_sym_source_file_repeat1] = STATE(16), [ts_builtin_sym_end] = ACTIONS(7), [anon_sym_SLASH_SLASH] = ACTIONS(3), [anon_sym_SLASH_STAR] = ACTIONS(5), @@ -5828,16 +5803,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(2), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(75), 1, + STATE(79), 1, sym__expr, - STATE(119), 1, + STATE(91), 1, sym__case_value, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -5845,49 +5820,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [59] = 17, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(11), 1, - anon_sym_LBRACE, - ACTIONS(13), 1, - sym_identifier, - ACTIONS(17), 1, - anon_sym_DASH, - ACTIONS(19), 1, - aux_sym_integer_literal_token1, - ACTIONS(21), 1, - sym_raw_string_literal, - ACTIONS(23), 1, - anon_sym_DQUOTE, - ACTIONS(25), 1, - anon_sym_select, - ACTIONS(27), 1, - anon_sym_unset, - ACTIONS(29), 1, - anon_sym_LBRACK, - STATE(3), 1, - sym_comment, - STATE(19), 1, - sym_interpreted_string_literal, - STATE(75), 1, - sym__expr, - STATE(118), 1, - sym__case_value, - ACTIONS(15), 2, - anon_sym_true, - anon_sym_false, - STATE(26), 7, - sym_boolean_literal, - sym_integer_literal, - sym__string_literal, - sym_select_expression, - sym_list_expression, - sym_map_expression, - sym_binary_expression, - [118] = 16, + [59] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5910,16 +5843,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_RBRACK, - STATE(4), 1, + STATE(3), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(56), 1, + STATE(58), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -5927,7 +5860,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [174] = 16, + [115] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5950,16 +5883,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(33), 1, anon_sym_RBRACK, - STATE(5), 1, + STATE(4), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(42), 1, + STATE(44), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -5967,7 +5900,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [230] = 16, + [171] = 16, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -5990,16 +5923,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(35), 1, anon_sym_RBRACK, - STATE(6), 1, + STATE(5), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(56), 1, + STATE(58), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -6007,7 +5940,45 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [286] = 15, + [227] = 15, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(11), 1, + anon_sym_LBRACE, + ACTIONS(13), 1, + sym_identifier, + ACTIONS(17), 1, + anon_sym_DASH, + ACTIONS(19), 1, + aux_sym_integer_literal_token1, + ACTIONS(21), 1, + sym_raw_string_literal, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + anon_sym_select, + ACTIONS(29), 1, + anon_sym_LBRACK, + STATE(6), 1, + sym_comment, + STATE(11), 1, + sym_interpreted_string_literal, + STATE(45), 1, + sym__expr, + ACTIONS(15), 2, + anon_sym_true, + anon_sym_false, + STATE(24), 7, + sym_boolean_literal, + sym_integer_literal, + sym__string_literal, + sym_select_expression, + sym_list_expression, + sym_map_expression, + sym_binary_expression, + [280] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6030,14 +6001,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(7), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(65), 1, + STATE(58), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -6045,7 +6016,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [339] = 15, + [333] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6068,14 +6039,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(8), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(62), 1, + STATE(25), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -6083,7 +6054,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [392] = 15, + [386] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6106,14 +6077,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(9), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(28), 1, + STATE(57), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -6121,7 +6092,7 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [445] = 15, + [439] = 15, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6144,14 +6115,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(10), 1, sym_comment, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, - STATE(56), 1, + STATE(66), 1, sym__expr, ACTIONS(15), 2, anon_sym_true, anon_sym_false, - STATE(26), 7, + STATE(24), 7, sym_boolean_literal, sym_integer_literal, sym__string_literal, @@ -6159,123 +6130,98 @@ static const uint16_t ts_small_parse_table[] = { sym_list_expression, sym_map_expression, sym_binary_expression, - [498] = 15, + [492] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(11), 1, - anon_sym_LBRACE, - ACTIONS(13), 1, - sym_identifier, - ACTIONS(17), 1, - anon_sym_DASH, - ACTIONS(19), 1, - aux_sym_integer_literal_token1, - ACTIONS(21), 1, - sym_raw_string_literal, - ACTIONS(23), 1, - anon_sym_DQUOTE, - ACTIONS(25), 1, - anon_sym_select, - ACTIONS(29), 1, - anon_sym_LBRACK, STATE(11), 1, sym_comment, - STATE(19), 1, - sym_interpreted_string_literal, - STATE(58), 1, - sym__expr, - ACTIONS(15), 2, - anon_sym_true, - anon_sym_false, - STATE(26), 7, - sym_boolean_literal, - sym_integer_literal, - sym__string_literal, - sym_select_expression, - sym_list_expression, - sym_map_expression, - sym_binary_expression, - [551] = 12, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(21), 1, - sym_raw_string_literal, - ACTIONS(23), 1, - anon_sym_DQUOTE, - ACTIONS(37), 1, + ACTIONS(37), 8, + ts_builtin_sym_end, + anon_sym_COMMA, anon_sym_RBRACE, - ACTIONS(39), 1, - anon_sym_default, - STATE(12), 1, - sym_comment, - STATE(14), 1, - aux_sym__select_cases_repeat1, - STATE(19), 1, - sym_interpreted_string_literal, - STATE(102), 1, - sym__string_literal, - STATE(103), 1, - sym_select_case, - STATE(113), 1, - sym_default_case, - [588] = 12, + anon_sym_RPAREN, + sym_identifier, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_PLUS, + [512] = 10, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(21), 1, - sym_raw_string_literal, - ACTIONS(23), 1, - anon_sym_DQUOTE, ACTIONS(39), 1, - anon_sym_default, + anon_sym_RBRACE, ACTIONS(41), 1, + sym_raw_string_literal, + ACTIONS(44), 1, + anon_sym_DQUOTE, + ACTIONS(47), 1, + anon_sym_default, + STATE(11), 1, + sym_interpreted_string_literal, + STATE(90), 1, + sym_select_case, + STATE(101), 1, + sym__string_literal, + STATE(12), 2, + sym_comment, + aux_sym__select_cases_repeat1, + [544] = 11, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(21), 1, + sym_raw_string_literal, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(50), 1, anon_sym_RBRACE, + ACTIONS(52), 1, + anon_sym_default, + STATE(11), 1, + sym_interpreted_string_literal, STATE(12), 1, aux_sym__select_cases_repeat1, STATE(13), 1, sym_comment, - STATE(19), 1, - sym_interpreted_string_literal, - STATE(102), 1, - sym__string_literal, - STATE(103), 1, + STATE(90), 1, sym_select_case, - STATE(104), 1, - sym_default_case, - [625] = 9, + STATE(101), 1, + sym__string_literal, + [578] = 11, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(45), 1, + ACTIONS(21), 1, sym_raw_string_literal, - ACTIONS(48), 1, + ACTIONS(23), 1, anon_sym_DQUOTE, - STATE(19), 1, - sym_interpreted_string_literal, - STATE(102), 1, - sym__string_literal, - STATE(103), 1, - sym_select_case, - ACTIONS(43), 2, - anon_sym_RBRACE, + ACTIONS(52), 1, anon_sym_default, - STATE(14), 2, - sym_comment, + ACTIONS(54), 1, + anon_sym_RBRACE, + STATE(11), 1, + sym_interpreted_string_literal, + STATE(13), 1, aux_sym__select_cases_repeat1, - [655] = 4, + STATE(14), 1, + sym_comment, + STATE(90), 1, + sym_select_case, + STATE(101), 1, + sym__string_literal, + [612] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(15), 1, sym_comment, - ACTIONS(51), 8, + ACTIONS(56), 8, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6284,73 +6230,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON, anon_sym_RBRACK, anon_sym_PLUS, - [675] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - STATE(16), 1, - sym_comment, - ACTIONS(53), 8, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_RBRACE, - anon_sym_RPAREN, - sym_identifier, - anon_sym_COLON, - anon_sym_RBRACK, - anon_sym_PLUS, - [695] = 10, + [632] = 10, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(9), 1, sym_identifier, - ACTIONS(55), 1, + ACTIONS(58), 1, ts_builtin_sym_end, - STATE(17), 1, + STATE(16), 1, sym_comment, STATE(18), 1, aux_sym_source_file_repeat1, - STATE(77), 1, - sym__definition, - STATE(80), 1, - sym__old_module, - STATE(84), 1, + STATE(75), 1, sym__new_module, - STATE(79), 2, + STATE(76), 1, + sym__old_module, + STATE(82), 1, + sym__definition, + STATE(78), 2, sym_assignment, sym_module, - [727] = 9, + [664] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(57), 1, - ts_builtin_sym_end, - ACTIONS(59), 1, - sym_identifier, - STATE(77), 1, - sym__definition, - STATE(80), 1, - sym__old_module, - STATE(84), 1, - sym__new_module, - STATE(18), 2, + STATE(17), 1, sym_comment, - aux_sym_source_file_repeat1, - STATE(79), 2, - sym_assignment, - sym_module, - [757] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - STATE(19), 1, - sym_comment, - ACTIONS(62), 8, + ACTIONS(60), 8, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6359,14 +6268,50 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON, anon_sym_RBRACK, anon_sym_PLUS, - [777] = 4, + [684] = 9, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(62), 1, + ts_builtin_sym_end, + ACTIONS(64), 1, + sym_identifier, + STATE(75), 1, + sym__new_module, + STATE(76), 1, + sym__old_module, + STATE(82), 1, + sym__definition, + STATE(18), 2, + sym_comment, + aux_sym_source_file_repeat1, + STATE(78), 2, + sym_assignment, + sym_module, + [714] = 4, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + STATE(19), 1, + sym_comment, + ACTIONS(67), 7, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_RPAREN, + sym_identifier, + anon_sym_RBRACK, + anon_sym_PLUS, + [733] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(20), 1, sym_comment, - ACTIONS(64), 7, + ACTIONS(69), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6374,14 +6319,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [796] = 4, + [752] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(21), 1, sym_comment, - ACTIONS(66), 7, + ACTIONS(71), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6389,14 +6334,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [815] = 4, + [771] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(22), 1, sym_comment, - ACTIONS(68), 7, + ACTIONS(73), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6404,14 +6349,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [834] = 4, + [790] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(23), 1, sym_comment, - ACTIONS(70), 7, + ACTIONS(75), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6419,14 +6364,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [853] = 4, + [809] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(24), 1, sym_comment, - ACTIONS(72), 7, + ACTIONS(77), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6434,14 +6379,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [872] = 4, + [828] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(25), 1, sym_comment, - ACTIONS(74), 7, + ACTIONS(79), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6449,14 +6394,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [891] = 4, + [847] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(26), 1, sym_comment, - ACTIONS(76), 7, + ACTIONS(81), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6464,14 +6409,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [910] = 4, + [866] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(27), 1, sym_comment, - ACTIONS(78), 7, + ACTIONS(83), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6479,14 +6424,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [929] = 4, + [885] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(28), 1, sym_comment, - ACTIONS(80), 7, + ACTIONS(85), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6494,14 +6439,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [948] = 4, + [904] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(29), 1, sym_comment, - ACTIONS(82), 7, + ACTIONS(87), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6509,14 +6454,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [967] = 4, + [923] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(30), 1, sym_comment, - ACTIONS(84), 7, + ACTIONS(89), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6524,14 +6469,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [986] = 4, + [942] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(31), 1, sym_comment, - ACTIONS(86), 7, + ACTIONS(91), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6539,14 +6484,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1005] = 4, + [961] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(32), 1, sym_comment, - ACTIONS(88), 7, + ACTIONS(93), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6554,14 +6499,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1024] = 4, + [980] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(33), 1, sym_comment, - ACTIONS(90), 7, + ACTIONS(95), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6569,14 +6514,14 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1043] = 4, + [999] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(34), 1, sym_comment, - ACTIONS(92), 7, + ACTIONS(97), 7, ts_builtin_sym_end, anon_sym_COMMA, anon_sym_RBRACE, @@ -6584,53 +6529,51 @@ static const uint16_t ts_small_parse_table[] = { sym_identifier, anon_sym_RBRACK, anon_sym_PLUS, - [1062] = 4, + [1018] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + ACTIONS(101), 1, + anon_sym_soong_config_variable, STATE(35), 1, sym_comment, - ACTIONS(94), 7, - ts_builtin_sym_end, - anon_sym_COMMA, - anon_sym_RBRACE, - anon_sym_RPAREN, - sym_identifier, - anon_sym_RBRACK, - anon_sym_PLUS, - [1081] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(98), 1, - anon_sym_soong_config_variable, - STATE(36), 1, - sym_comment, - STATE(98), 2, + STATE(103), 2, sym_select_value, sym_soong_config_variable, - ACTIONS(96), 3, + ACTIONS(99), 3, anon_sym_product_variable, anon_sym_release_variable, anon_sym_variant, - [1103] = 7, + [1040] = 6, + ACTIONS(103), 1, + anon_sym_SLASH_SLASH, + ACTIONS(105), 1, + anon_sym_SLASH_STAR, + ACTIONS(107), 1, + aux_sym_interpreted_string_literal_token1, + ACTIONS(110), 1, + anon_sym_DQUOTE2, + ACTIONS(112), 1, + sym_escape_sequence, + STATE(36), 2, + sym_comment, + aux_sym_interpreted_string_literal_repeat1, + [1060] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(21), 1, - sym_raw_string_literal, - ACTIONS(23), 1, - anon_sym_DQUOTE, - STATE(19), 1, - sym_interpreted_string_literal, + ACTIONS(117), 1, + anon_sym_LBRACE, + ACTIONS(119), 1, + anon_sym_LPAREN, STATE(37), 1, sym_comment, - STATE(92), 1, - sym__string_literal, - [1125] = 7, + ACTIONS(115), 2, + anon_sym_EQ, + anon_sym_PLUS_EQ, + [1080] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6639,28 +6582,13 @@ static const uint16_t ts_small_parse_table[] = { sym_raw_string_literal, ACTIONS(23), 1, anon_sym_DQUOTE, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, STATE(38), 1, sym_comment, - STATE(107), 1, + STATE(93), 1, sym__string_literal, - [1147] = 7, - ACTIONS(100), 1, - anon_sym_SLASH_SLASH, - ACTIONS(102), 1, - anon_sym_SLASH_STAR, - ACTIONS(104), 1, - aux_sym_interpreted_string_literal_token1, - ACTIONS(106), 1, - anon_sym_DQUOTE2, - ACTIONS(108), 1, - sym_escape_sequence, - STATE(39), 1, - sym_comment, - STATE(43), 1, - aux_sym_interpreted_string_literal_repeat1, - [1169] = 7, + [1102] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, @@ -6669,1152 +6597,1066 @@ static const uint16_t ts_small_parse_table[] = { sym_raw_string_literal, ACTIONS(23), 1, anon_sym_DQUOTE, - STATE(19), 1, + STATE(11), 1, sym_interpreted_string_literal, + STATE(39), 1, + sym_comment, + STATE(92), 1, + sym__string_literal, + [1124] = 7, + ACTIONS(103), 1, + anon_sym_SLASH_SLASH, + ACTIONS(105), 1, + anon_sym_SLASH_STAR, + ACTIONS(121), 1, + aux_sym_interpreted_string_literal_token1, + ACTIONS(123), 1, + anon_sym_DQUOTE2, + ACTIONS(125), 1, + sym_escape_sequence, STATE(40), 1, sym_comment, - STATE(93), 1, - sym__string_literal, - [1191] = 7, - ACTIONS(100), 1, - anon_sym_SLASH_SLASH, - ACTIONS(102), 1, - anon_sym_SLASH_STAR, - ACTIONS(104), 1, - aux_sym_interpreted_string_literal_token1, - ACTIONS(108), 1, - sym_escape_sequence, - ACTIONS(110), 1, - anon_sym_DQUOTE2, - STATE(39), 1, + STATE(43), 1, aux_sym_interpreted_string_literal_repeat1, + [1146] = 7, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(21), 1, + sym_raw_string_literal, + ACTIONS(23), 1, + anon_sym_DQUOTE, + STATE(11), 1, + sym_interpreted_string_literal, STATE(41), 1, sym_comment, - [1213] = 7, + STATE(105), 1, + sym__string_literal, + [1168] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(112), 1, - anon_sym_COMMA, - ACTIONS(114), 1, - anon_sym_RBRACK, - ACTIONS(116), 1, - anon_sym_PLUS, STATE(42), 1, sym_comment, - STATE(60), 1, - aux_sym_list_expression_repeat1, - [1235] = 6, - ACTIONS(100), 1, - anon_sym_SLASH_SLASH, - ACTIONS(102), 1, - anon_sym_SLASH_STAR, - ACTIONS(118), 1, - aux_sym_interpreted_string_literal_token1, - ACTIONS(121), 1, - anon_sym_DQUOTE2, - ACTIONS(123), 1, - sym_escape_sequence, - STATE(43), 2, - sym_comment, - aux_sym_interpreted_string_literal_repeat1, - [1255] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(128), 1, - anon_sym_LBRACE, - ACTIONS(130), 1, - anon_sym_LPAREN, - STATE(44), 1, - sym_comment, - ACTIONS(126), 2, - anon_sym_EQ, - anon_sym_PLUS_EQ, - [1275] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - STATE(45), 1, - sym_comment, - ACTIONS(43), 4, + ACTIONS(39), 4, anon_sym_RBRACE, sym_raw_string_literal, anon_sym_DQUOTE, anon_sym_default, - [1291] = 6, + [1184] = 7, + ACTIONS(103), 1, + anon_sym_SLASH_SLASH, + ACTIONS(105), 1, + anon_sym_SLASH_STAR, + ACTIONS(121), 1, + aux_sym_interpreted_string_literal_token1, + ACTIONS(125), 1, + sym_escape_sequence, + ACTIONS(127), 1, + anon_sym_DQUOTE2, + STATE(36), 1, + aux_sym_interpreted_string_literal_repeat1, + STATE(43), 1, + sym_comment, + [1206] = 7, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(132), 1, + ACTIONS(129), 1, anon_sym_COMMA, - ACTIONS(134), 1, - anon_sym_RPAREN, + ACTIONS(131), 1, + anon_sym_RBRACK, + ACTIONS(133), 1, + anon_sym_PLUS, + STATE(44), 1, + sym_comment, + STATE(62), 1, + aux_sym_list_expression_repeat1, + [1228] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(133), 1, + anon_sym_PLUS, + STATE(45), 1, + sym_comment, + ACTIONS(135), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [1245] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(137), 1, + anon_sym_RBRACE, + ACTIONS(139), 1, + sym_identifier, STATE(46), 1, sym_comment, - STATE(51), 1, - aux_sym__new_module_repeat1, - [1310] = 6, + STATE(47), 1, + sym__colon_property, + [1264] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(136), 1, + ACTIONS(141), 1, anon_sym_COMMA, - ACTIONS(138), 1, + ACTIONS(143), 1, anon_sym_RBRACE, STATE(47), 1, sym_comment, - STATE(64), 1, + STATE(56), 1, aux_sym__old_module_repeat1, - [1329] = 6, - ACTIONS(3), 1, + [1283] = 5, + ACTIONS(103), 1, anon_sym_SLASH_SLASH, - ACTIONS(5), 1, + ACTIONS(105), 1, anon_sym_SLASH_STAR, - ACTIONS(140), 1, - anon_sym_RBRACE, - ACTIONS(142), 1, - sym_identifier, + ACTIONS(145), 1, + aux_sym_interpreted_string_literal_token1, STATE(48), 1, sym_comment, - STATE(73), 1, - sym__colon_property, - [1348] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(144), 1, - anon_sym_RPAREN, - ACTIONS(146), 1, - sym_identifier, - STATE(49), 1, - sym_comment, - STATE(72), 1, - sym__equal_property, - [1367] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(142), 1, - sym_identifier, - ACTIONS(148), 1, - anon_sym_RBRACE, - STATE(50), 1, - sym_comment, - STATE(57), 1, - sym__colon_property, - [1386] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(150), 1, - anon_sym_COMMA, - ACTIONS(152), 1, - anon_sym_RPAREN, - STATE(51), 1, - sym_comment, - STATE(67), 1, - aux_sym__new_module_repeat1, - [1405] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(142), 1, - sym_identifier, - ACTIONS(154), 1, - anon_sym_RBRACE, - STATE(52), 1, - sym_comment, - STATE(73), 1, - sym__colon_property, - [1424] = 5, - ACTIONS(100), 1, - anon_sym_SLASH_SLASH, - ACTIONS(102), 1, - anon_sym_SLASH_STAR, - ACTIONS(156), 1, - aux_sym_interpreted_string_literal_token1, - STATE(53), 1, - sym_comment, - ACTIONS(158), 2, + ACTIONS(147), 2, anon_sym_DQUOTE2, sym_escape_sequence, - [1441] = 6, + [1300] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(139), 1, + sym_identifier, + ACTIONS(149), 1, + anon_sym_RBRACE, + STATE(49), 1, + sym_comment, + STATE(70), 1, + sym__colon_property, + [1319] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(151), 1, + anon_sym_COMMA, + ACTIONS(154), 1, + anon_sym_RBRACK, + STATE(50), 2, + sym_comment, + aux_sym_list_expression_repeat1, + [1336] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(156), 1, + anon_sym_COMMA, + ACTIONS(158), 1, + anon_sym_RBRACE, + STATE(51), 1, + sym_comment, + STATE(68), 1, + aux_sym__old_module_repeat1, + [1355] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, ACTIONS(160), 1, - anon_sym_COMMA, + anon_sym_RPAREN, ACTIONS(162), 1, - anon_sym_RBRACE, - STATE(54), 1, - sym_comment, - STATE(64), 1, - aux_sym__old_module_repeat1, - [1460] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(164), 1, - anon_sym_COMMA, - ACTIONS(166), 1, - anon_sym_RBRACE, - STATE(54), 1, - aux_sym__old_module_repeat1, - STATE(55), 1, - sym_comment, - [1479] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(116), 1, - anon_sym_PLUS, - STATE(56), 1, - sym_comment, - ACTIONS(168), 2, - anon_sym_COMMA, - anon_sym_RBRACK, - [1496] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(170), 1, - anon_sym_COMMA, - ACTIONS(172), 1, - anon_sym_RBRACE, - STATE(47), 1, - aux_sym__old_module_repeat1, - STATE(57), 1, - sym_comment, - [1515] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(116), 1, - anon_sym_PLUS, - STATE(58), 1, - sym_comment, - ACTIONS(174), 2, - ts_builtin_sym_end, sym_identifier, - [1532] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(176), 1, - anon_sym_COMMA, - ACTIONS(179), 1, - anon_sym_RBRACK, - STATE(59), 2, - sym_comment, - aux_sym_list_expression_repeat1, - [1549] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(181), 1, - anon_sym_COMMA, - ACTIONS(183), 1, - anon_sym_RBRACK, - STATE(59), 1, - aux_sym_list_expression_repeat1, - STATE(60), 1, - sym_comment, - [1568] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(142), 1, - sym_identifier, - ACTIONS(185), 1, - anon_sym_RBRACE, - STATE(55), 1, - sym__colon_property, - STATE(61), 1, - sym_comment, - [1587] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(116), 1, - anon_sym_PLUS, - STATE(62), 1, - sym_comment, - ACTIONS(187), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [1604] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(142), 1, - sym_identifier, - ACTIONS(189), 1, - anon_sym_RBRACE, - STATE(63), 1, - sym_comment, - STATE(73), 1, - sym__colon_property, - [1623] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(191), 1, - anon_sym_COMMA, - ACTIONS(194), 1, - anon_sym_RBRACE, - STATE(64), 2, - sym_comment, - aux_sym__old_module_repeat1, - [1640] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(116), 1, - anon_sym_PLUS, - STATE(65), 1, - sym_comment, - ACTIONS(196), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [1657] = 6, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(146), 1, - sym_identifier, - ACTIONS(198), 1, - anon_sym_RPAREN, - STATE(66), 1, + STATE(52), 1, sym_comment, STATE(72), 1, sym__equal_property, - [1676] = 5, + [1374] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(200), 1, + ACTIONS(139), 1, + sym_identifier, + ACTIONS(164), 1, + anon_sym_RBRACE, + STATE(53), 1, + sym_comment, + STATE(60), 1, + sym__colon_property, + [1393] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(166), 1, anon_sym_COMMA, - ACTIONS(203), 1, + ACTIONS(168), 1, anon_sym_RPAREN, - STATE(67), 2, + STATE(54), 1, + sym_comment, + STATE(64), 1, + aux_sym__new_module_repeat1, + [1412] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(139), 1, + sym_identifier, + ACTIONS(170), 1, + anon_sym_RBRACE, + STATE(55), 1, + sym_comment, + STATE(70), 1, + sym__colon_property, + [1431] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(172), 1, + anon_sym_COMMA, + ACTIONS(174), 1, + anon_sym_RBRACE, + STATE(56), 1, + sym_comment, + STATE(68), 1, + aux_sym__old_module_repeat1, + [1450] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(133), 1, + anon_sym_PLUS, + STATE(57), 1, + sym_comment, + ACTIONS(176), 2, + ts_builtin_sym_end, + sym_identifier, + [1467] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(133), 1, + anon_sym_PLUS, + STATE(58), 1, + sym_comment, + ACTIONS(178), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [1484] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(162), 1, + sym_identifier, + ACTIONS(180), 1, + anon_sym_RPAREN, + STATE(59), 1, + sym_comment, + STATE(63), 1, + sym__equal_property, + [1503] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(182), 1, + anon_sym_COMMA, + ACTIONS(184), 1, + anon_sym_RBRACE, + STATE(51), 1, + aux_sym__old_module_repeat1, + STATE(60), 1, + sym_comment, + [1522] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(139), 1, + sym_identifier, + ACTIONS(186), 1, + anon_sym_RBRACE, + STATE(61), 1, + sym_comment, + STATE(70), 1, + sym__colon_property, + [1541] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(188), 1, + anon_sym_COMMA, + ACTIONS(190), 1, + anon_sym_RBRACK, + STATE(50), 1, + aux_sym_list_expression_repeat1, + STATE(62), 1, + sym_comment, + [1560] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(192), 1, + anon_sym_COMMA, + ACTIONS(194), 1, + anon_sym_RPAREN, + STATE(54), 1, + aux_sym__new_module_repeat1, + STATE(63), 1, + sym_comment, + [1579] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(196), 1, + anon_sym_COMMA, + ACTIONS(199), 1, + anon_sym_RPAREN, + STATE(64), 2, sym_comment, aux_sym__new_module_repeat1, - [1693] = 6, + [1596] = 6, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(146), 1, + ACTIONS(162), 1, + sym_identifier, + ACTIONS(201), 1, + anon_sym_RPAREN, + STATE(65), 1, + sym_comment, + STATE(72), 1, + sym__equal_property, + [1615] = 5, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(133), 1, + anon_sym_PLUS, + STATE(66), 1, + sym_comment, + ACTIONS(203), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [1632] = 6, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + ACTIONS(139), 1, sym_identifier, ACTIONS(205), 1, - anon_sym_RPAREN, - STATE(46), 1, - sym__equal_property, - STATE(68), 1, + anon_sym_RBRACE, + STATE(67), 1, sym_comment, - [1712] = 6, + STATE(70), 1, + sym__colon_property, + [1651] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(142), 1, - sym_identifier, ACTIONS(207), 1, + anon_sym_COMMA, + ACTIONS(210), 1, anon_sym_RBRACE, + STATE(68), 2, + sym_comment, + aux_sym__old_module_repeat1, + [1668] = 4, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, STATE(69), 1, sym_comment, - STATE(73), 1, - sym__colon_property, - [1731] = 4, + ACTIONS(212), 2, + ts_builtin_sym_end, + sym_identifier, + [1682] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(70), 1, sym_comment, - ACTIONS(209), 2, - ts_builtin_sym_end, - sym_identifier, - [1745] = 5, + ACTIONS(214), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [1696] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(146), 1, - sym_identifier, STATE(71), 1, sym_comment, - STATE(72), 1, - sym__equal_property, - [1761] = 4, + ACTIONS(216), 2, + ts_builtin_sym_end, + sym_identifier, + [1710] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(72), 1, sym_comment, - ACTIONS(211), 2, + ACTIONS(218), 2, anon_sym_COMMA, anon_sym_RPAREN, - [1775] = 4, + [1724] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(73), 1, sym_comment, - ACTIONS(213), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [1789] = 4, + ACTIONS(220), 2, + ts_builtin_sym_end, + sym_identifier, + [1738] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(74), 1, sym_comment, - ACTIONS(215), 2, + ACTIONS(222), 2, ts_builtin_sym_end, sym_identifier, - [1803] = 5, + [1752] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(116), 1, - anon_sym_PLUS, - ACTIONS(217), 1, - anon_sym_COMMA, STATE(75), 1, sym_comment, - [1819] = 4, + ACTIONS(224), 2, + ts_builtin_sym_end, + sym_identifier, + [1766] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(76), 1, sym_comment, - ACTIONS(219), 2, + ACTIONS(224), 2, ts_builtin_sym_end, sym_identifier, - [1833] = 4, + [1780] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(77), 1, sym_comment, - ACTIONS(221), 2, + ACTIONS(226), 2, ts_builtin_sym_end, sym_identifier, - [1847] = 4, + [1794] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(78), 1, sym_comment, - ACTIONS(223), 2, + ACTIONS(228), 2, ts_builtin_sym_end, sym_identifier, - [1861] = 4, + [1808] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + ACTIONS(133), 1, + anon_sym_PLUS, + ACTIONS(230), 1, + anon_sym_COMMA, STATE(79), 1, sym_comment, - ACTIONS(225), 2, - ts_builtin_sym_end, - sym_identifier, - [1875] = 4, + [1824] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - STATE(80), 1, - sym_comment, - ACTIONS(227), 2, - ts_builtin_sym_end, - sym_identifier, - [1889] = 5, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(229), 1, + ACTIONS(232), 1, anon_sym_LBRACE, - STATE(81), 1, + STATE(80), 1, sym_comment, STATE(95), 1, sym__select_cases, - [1905] = 4, + [1840] = 4, + ACTIONS(3), 1, + anon_sym_SLASH_SLASH, + ACTIONS(5), 1, + anon_sym_SLASH_STAR, + STATE(81), 1, + sym_comment, + ACTIONS(234), 2, + ts_builtin_sym_end, + sym_identifier, + [1854] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(82), 1, sym_comment, - ACTIONS(231), 2, + ACTIONS(236), 2, ts_builtin_sym_end, sym_identifier, - [1919] = 4, + [1868] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(83), 1, sym_comment, - ACTIONS(233), 2, + ACTIONS(238), 2, ts_builtin_sym_end, sym_identifier, - [1933] = 4, + [1882] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(84), 1, sym_comment, - ACTIONS(227), 2, + ACTIONS(240), 2, ts_builtin_sym_end, sym_identifier, - [1947] = 4, + [1896] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(85), 1, sym_comment, - ACTIONS(235), 2, + ACTIONS(242), 2, ts_builtin_sym_end, sym_identifier, - [1961] = 4, + [1910] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, + ACTIONS(139), 1, + sym_identifier, + STATE(70), 1, + sym__colon_property, STATE(86), 1, sym_comment, - ACTIONS(237), 2, - ts_builtin_sym_end, - sym_identifier, - [1975] = 4, + [1926] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(87), 1, sym_comment, - ACTIONS(239), 2, + ACTIONS(244), 2, ts_builtin_sym_end, sym_identifier, - [1989] = 5, + [1940] = 5, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(142), 1, + ACTIONS(162), 1, sym_identifier, - STATE(73), 1, - sym__colon_property, + STATE(72), 1, + sym__equal_property, STATE(88), 1, sym_comment, - [2005] = 4, - ACTIONS(3), 1, + [1956] = 4, + ACTIONS(103), 1, anon_sym_SLASH_SLASH, - ACTIONS(5), 1, + ACTIONS(105), 1, anon_sym_SLASH_STAR, + ACTIONS(246), 1, + aux_sym_comment_token1, STATE(89), 1, sym_comment, - ACTIONS(241), 2, - ts_builtin_sym_end, - sym_identifier, - [2019] = 4, + [1969] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(243), 1, + ACTIONS(248), 1, anon_sym_COMMA, STATE(90), 1, sym_comment, - [2032] = 4, + [1982] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(245), 1, + ACTIONS(250), 1, anon_sym_COMMA, STATE(91), 1, sym_comment, - [2045] = 4, + [1995] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(247), 1, + ACTIONS(252), 1, anon_sym_RPAREN, STATE(92), 1, sym_comment, - [2058] = 4, + [2008] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(249), 1, + ACTIONS(254), 1, anon_sym_COMMA, STATE(93), 1, sym_comment, - [2071] = 4, + [2021] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(251), 1, - aux_sym_integer_literal_token1, + ACTIONS(256), 1, + anon_sym_SLASH, STATE(94), 1, sym_comment, - [2084] = 4, + [2034] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(253), 1, + ACTIONS(258), 1, anon_sym_RPAREN, STATE(95), 1, sym_comment, - [2097] = 4, + [2047] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(255), 1, - anon_sym_RPAREN, + ACTIONS(260), 1, + anon_sym_COLON, STATE(96), 1, sym_comment, - [2110] = 4, + [2060] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(257), 1, - anon_sym_SLASH, + ACTIONS(262), 1, + aux_sym_integer_literal_token1, STATE(97), 1, sym_comment, - [2123] = 4, + [2073] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(259), 1, + ACTIONS(264), 1, anon_sym_COMMA, STATE(98), 1, sym_comment, - [2136] = 4, + [2086] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(261), 1, - anon_sym_RBRACE, + ACTIONS(266), 1, + anon_sym_LPAREN, STATE(99), 1, sym_comment, - [2149] = 4, + [2099] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(263), 1, + ACTIONS(268), 1, anon_sym_RPAREN, STATE(100), 1, sym_comment, - [2162] = 4, + [2112] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(265), 1, + ACTIONS(270), 1, anon_sym_COLON, STATE(101), 1, sym_comment, - [2175] = 4, + [2125] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(267), 1, - anon_sym_COLON, + ACTIONS(272), 1, + anon_sym_EQ, STATE(102), 1, sym_comment, - [2188] = 4, + [2138] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(269), 1, + ACTIONS(274), 1, anon_sym_COMMA, STATE(103), 1, sym_comment, - [2201] = 4, + [2151] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(271), 1, - anon_sym_COMMA, + ACTIONS(276), 1, + ts_builtin_sym_end, STATE(104), 1, sym_comment, - [2214] = 4, + [2164] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(273), 1, - anon_sym_COLON, + ACTIONS(278), 1, + anon_sym_RPAREN, STATE(105), 1, sym_comment, - [2227] = 4, + [2177] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(275), 1, - anon_sym_EQ, + ACTIONS(280), 1, + anon_sym_LPAREN, STATE(106), 1, sym_comment, - [2240] = 4, + [2190] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(277), 1, - anon_sym_RPAREN, + ACTIONS(282), 1, + anon_sym_LPAREN, STATE(107), 1, sym_comment, - [2253] = 4, + [2203] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(279), 1, - anon_sym_LPAREN, + ACTIONS(284), 1, + anon_sym_RPAREN, STATE(108), 1, sym_comment, - [2266] = 4, - ACTIONS(100), 1, + [2216] = 4, + ACTIONS(103), 1, anon_sym_SLASH_SLASH, - ACTIONS(102), 1, + ACTIONS(105), 1, anon_sym_SLASH_STAR, - ACTIONS(281), 1, - aux_sym_comment_token1, + ACTIONS(286), 1, + aux_sym_comment_token2, STATE(109), 1, sym_comment, - [2279] = 4, + [2229] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(283), 1, - ts_builtin_sym_end, + ACTIONS(288), 1, + anon_sym_COMMA, STATE(110), 1, sym_comment, - [2292] = 4, + [2242] = 4, ACTIONS(3), 1, anon_sym_SLASH_SLASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, - ACTIONS(285), 1, - anon_sym_RBRACE, + ACTIONS(230), 1, + anon_sym_COMMA, STATE(111), 1, sym_comment, - [2305] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(287), 1, - anon_sym_RPAREN, - STATE(112), 1, - sym_comment, - [2318] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(289), 1, - anon_sym_COMMA, - STATE(113), 1, - sym_comment, - [2331] = 4, - ACTIONS(100), 1, - anon_sym_SLASH_SLASH, - ACTIONS(102), 1, - anon_sym_SLASH_STAR, - ACTIONS(291), 1, - aux_sym_comment_token2, - STATE(114), 1, - sym_comment, - [2344] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(293), 1, - anon_sym_LPAREN, - STATE(115), 1, - sym_comment, - [2357] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(217), 1, - anon_sym_COMMA, - STATE(116), 1, - sym_comment, - [2370] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(295), 1, - anon_sym_LPAREN, - STATE(117), 1, - sym_comment, - [2383] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(297), 1, - anon_sym_COMMA, - STATE(118), 1, - sym_comment, - [2396] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(299), 1, - anon_sym_COMMA, - STATE(119), 1, - sym_comment, - [2409] = 4, - ACTIONS(3), 1, - anon_sym_SLASH_SLASH, - ACTIONS(5), 1, - anon_sym_SLASH_STAR, - ACTIONS(301), 1, - anon_sym_RPAREN, - STATE(120), 1, - sym_comment, - [2422] = 1, - ACTIONS(303), 1, + [2255] = 1, + ACTIONS(290), 1, ts_builtin_sym_end, - [2426] = 1, - ACTIONS(305), 1, + [2259] = 1, + ACTIONS(292), 1, ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, [SMALL_STATE(3)] = 59, - [SMALL_STATE(4)] = 118, - [SMALL_STATE(5)] = 174, - [SMALL_STATE(6)] = 230, - [SMALL_STATE(7)] = 286, - [SMALL_STATE(8)] = 339, - [SMALL_STATE(9)] = 392, - [SMALL_STATE(10)] = 445, - [SMALL_STATE(11)] = 498, - [SMALL_STATE(12)] = 551, - [SMALL_STATE(13)] = 588, - [SMALL_STATE(14)] = 625, - [SMALL_STATE(15)] = 655, - [SMALL_STATE(16)] = 675, - [SMALL_STATE(17)] = 695, - [SMALL_STATE(18)] = 727, - [SMALL_STATE(19)] = 757, - [SMALL_STATE(20)] = 777, - [SMALL_STATE(21)] = 796, - [SMALL_STATE(22)] = 815, - [SMALL_STATE(23)] = 834, - [SMALL_STATE(24)] = 853, - [SMALL_STATE(25)] = 872, - [SMALL_STATE(26)] = 891, - [SMALL_STATE(27)] = 910, - [SMALL_STATE(28)] = 929, - [SMALL_STATE(29)] = 948, - [SMALL_STATE(30)] = 967, - [SMALL_STATE(31)] = 986, - [SMALL_STATE(32)] = 1005, - [SMALL_STATE(33)] = 1024, - [SMALL_STATE(34)] = 1043, - [SMALL_STATE(35)] = 1062, - [SMALL_STATE(36)] = 1081, - [SMALL_STATE(37)] = 1103, - [SMALL_STATE(38)] = 1125, - [SMALL_STATE(39)] = 1147, - [SMALL_STATE(40)] = 1169, - [SMALL_STATE(41)] = 1191, - [SMALL_STATE(42)] = 1213, - [SMALL_STATE(43)] = 1235, - [SMALL_STATE(44)] = 1255, - [SMALL_STATE(45)] = 1275, - [SMALL_STATE(46)] = 1291, - [SMALL_STATE(47)] = 1310, - [SMALL_STATE(48)] = 1329, - [SMALL_STATE(49)] = 1348, - [SMALL_STATE(50)] = 1367, - [SMALL_STATE(51)] = 1386, - [SMALL_STATE(52)] = 1405, - [SMALL_STATE(53)] = 1424, - [SMALL_STATE(54)] = 1441, - [SMALL_STATE(55)] = 1460, - [SMALL_STATE(56)] = 1479, - [SMALL_STATE(57)] = 1496, - [SMALL_STATE(58)] = 1515, - [SMALL_STATE(59)] = 1532, - [SMALL_STATE(60)] = 1549, - [SMALL_STATE(61)] = 1568, - [SMALL_STATE(62)] = 1587, - [SMALL_STATE(63)] = 1604, - [SMALL_STATE(64)] = 1623, - [SMALL_STATE(65)] = 1640, - [SMALL_STATE(66)] = 1657, - [SMALL_STATE(67)] = 1676, - [SMALL_STATE(68)] = 1693, - [SMALL_STATE(69)] = 1712, - [SMALL_STATE(70)] = 1731, - [SMALL_STATE(71)] = 1745, - [SMALL_STATE(72)] = 1761, - [SMALL_STATE(73)] = 1775, - [SMALL_STATE(74)] = 1789, - [SMALL_STATE(75)] = 1803, - [SMALL_STATE(76)] = 1819, - [SMALL_STATE(77)] = 1833, - [SMALL_STATE(78)] = 1847, - [SMALL_STATE(79)] = 1861, - [SMALL_STATE(80)] = 1875, - [SMALL_STATE(81)] = 1889, - [SMALL_STATE(82)] = 1905, - [SMALL_STATE(83)] = 1919, - [SMALL_STATE(84)] = 1933, - [SMALL_STATE(85)] = 1947, - [SMALL_STATE(86)] = 1961, - [SMALL_STATE(87)] = 1975, - [SMALL_STATE(88)] = 1989, - [SMALL_STATE(89)] = 2005, - [SMALL_STATE(90)] = 2019, - [SMALL_STATE(91)] = 2032, - [SMALL_STATE(92)] = 2045, - [SMALL_STATE(93)] = 2058, - [SMALL_STATE(94)] = 2071, - [SMALL_STATE(95)] = 2084, - [SMALL_STATE(96)] = 2097, - [SMALL_STATE(97)] = 2110, - [SMALL_STATE(98)] = 2123, - [SMALL_STATE(99)] = 2136, - [SMALL_STATE(100)] = 2149, - [SMALL_STATE(101)] = 2162, - [SMALL_STATE(102)] = 2175, - [SMALL_STATE(103)] = 2188, - [SMALL_STATE(104)] = 2201, - [SMALL_STATE(105)] = 2214, - [SMALL_STATE(106)] = 2227, - [SMALL_STATE(107)] = 2240, - [SMALL_STATE(108)] = 2253, - [SMALL_STATE(109)] = 2266, - [SMALL_STATE(110)] = 2279, - [SMALL_STATE(111)] = 2292, - [SMALL_STATE(112)] = 2305, - [SMALL_STATE(113)] = 2318, - [SMALL_STATE(114)] = 2331, - [SMALL_STATE(115)] = 2344, - [SMALL_STATE(116)] = 2357, - [SMALL_STATE(117)] = 2370, - [SMALL_STATE(118)] = 2383, - [SMALL_STATE(119)] = 2396, - [SMALL_STATE(120)] = 2409, - [SMALL_STATE(121)] = 2422, - [SMALL_STATE(122)] = 2426, + [SMALL_STATE(4)] = 115, + [SMALL_STATE(5)] = 171, + [SMALL_STATE(6)] = 227, + [SMALL_STATE(7)] = 280, + [SMALL_STATE(8)] = 333, + [SMALL_STATE(9)] = 386, + [SMALL_STATE(10)] = 439, + [SMALL_STATE(11)] = 492, + [SMALL_STATE(12)] = 512, + [SMALL_STATE(13)] = 544, + [SMALL_STATE(14)] = 578, + [SMALL_STATE(15)] = 612, + [SMALL_STATE(16)] = 632, + [SMALL_STATE(17)] = 664, + [SMALL_STATE(18)] = 684, + [SMALL_STATE(19)] = 714, + [SMALL_STATE(20)] = 733, + [SMALL_STATE(21)] = 752, + [SMALL_STATE(22)] = 771, + [SMALL_STATE(23)] = 790, + [SMALL_STATE(24)] = 809, + [SMALL_STATE(25)] = 828, + [SMALL_STATE(26)] = 847, + [SMALL_STATE(27)] = 866, + [SMALL_STATE(28)] = 885, + [SMALL_STATE(29)] = 904, + [SMALL_STATE(30)] = 923, + [SMALL_STATE(31)] = 942, + [SMALL_STATE(32)] = 961, + [SMALL_STATE(33)] = 980, + [SMALL_STATE(34)] = 999, + [SMALL_STATE(35)] = 1018, + [SMALL_STATE(36)] = 1040, + [SMALL_STATE(37)] = 1060, + [SMALL_STATE(38)] = 1080, + [SMALL_STATE(39)] = 1102, + [SMALL_STATE(40)] = 1124, + [SMALL_STATE(41)] = 1146, + [SMALL_STATE(42)] = 1168, + [SMALL_STATE(43)] = 1184, + [SMALL_STATE(44)] = 1206, + [SMALL_STATE(45)] = 1228, + [SMALL_STATE(46)] = 1245, + [SMALL_STATE(47)] = 1264, + [SMALL_STATE(48)] = 1283, + [SMALL_STATE(49)] = 1300, + [SMALL_STATE(50)] = 1319, + [SMALL_STATE(51)] = 1336, + [SMALL_STATE(52)] = 1355, + [SMALL_STATE(53)] = 1374, + [SMALL_STATE(54)] = 1393, + [SMALL_STATE(55)] = 1412, + [SMALL_STATE(56)] = 1431, + [SMALL_STATE(57)] = 1450, + [SMALL_STATE(58)] = 1467, + [SMALL_STATE(59)] = 1484, + [SMALL_STATE(60)] = 1503, + [SMALL_STATE(61)] = 1522, + [SMALL_STATE(62)] = 1541, + [SMALL_STATE(63)] = 1560, + [SMALL_STATE(64)] = 1579, + [SMALL_STATE(65)] = 1596, + [SMALL_STATE(66)] = 1615, + [SMALL_STATE(67)] = 1632, + [SMALL_STATE(68)] = 1651, + [SMALL_STATE(69)] = 1668, + [SMALL_STATE(70)] = 1682, + [SMALL_STATE(71)] = 1696, + [SMALL_STATE(72)] = 1710, + [SMALL_STATE(73)] = 1724, + [SMALL_STATE(74)] = 1738, + [SMALL_STATE(75)] = 1752, + [SMALL_STATE(76)] = 1766, + [SMALL_STATE(77)] = 1780, + [SMALL_STATE(78)] = 1794, + [SMALL_STATE(79)] = 1808, + [SMALL_STATE(80)] = 1824, + [SMALL_STATE(81)] = 1840, + [SMALL_STATE(82)] = 1854, + [SMALL_STATE(83)] = 1868, + [SMALL_STATE(84)] = 1882, + [SMALL_STATE(85)] = 1896, + [SMALL_STATE(86)] = 1910, + [SMALL_STATE(87)] = 1926, + [SMALL_STATE(88)] = 1940, + [SMALL_STATE(89)] = 1956, + [SMALL_STATE(90)] = 1969, + [SMALL_STATE(91)] = 1982, + [SMALL_STATE(92)] = 1995, + [SMALL_STATE(93)] = 2008, + [SMALL_STATE(94)] = 2021, + [SMALL_STATE(95)] = 2034, + [SMALL_STATE(96)] = 2047, + [SMALL_STATE(97)] = 2060, + [SMALL_STATE(98)] = 2073, + [SMALL_STATE(99)] = 2086, + [SMALL_STATE(100)] = 2099, + [SMALL_STATE(101)] = 2112, + [SMALL_STATE(102)] = 2125, + [SMALL_STATE(103)] = 2138, + [SMALL_STATE(104)] = 2151, + [SMALL_STATE(105)] = 2164, + [SMALL_STATE(106)] = 2177, + [SMALL_STATE(107)] = 2190, + [SMALL_STATE(108)] = 2203, + [SMALL_STATE(109)] = 2216, + [SMALL_STATE(110)] = 2229, + [SMALL_STATE(111)] = 2242, + [SMALL_STATE(112)] = 2255, + [SMALL_STATE(113)] = 2259, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(115), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(116), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), - [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(19), - [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(41), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 2), - [53] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 3), - [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), - [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(44), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__string_literal, 1), - [64] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer_literal, 1), - [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean_literal, 1), - [68] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 5, .production_id = 11), - [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 4, .production_id = 6), - [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_expression, 6), - [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 3, .production_id = 6), - [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 4, .production_id = 12), - [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), - [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 2), - [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 4, .production_id = 5), - [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 5, .production_id = 12), - [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 4, .production_id = 11), - [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 2), - [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 3, .production_id = 5), - [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer_literal, 2), - [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), - [102] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), - [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [114] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [116] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [118] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), SHIFT_REPEAT(53), - [121] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), - [123] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), SHIFT_REPEAT(53), - [126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [132] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), - [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), - [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 1), - [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 1), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 6), - [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 2), - [176] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 13), SHIFT_REPEAT(10), - [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 13), - [181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__colon_property, 3, .production_id = 8), - [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [191] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 10), SHIFT_REPEAT(88), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 10), - [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equal_property, 3, .production_id = 8), - [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 10), SHIFT_REPEAT(71), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 10), - [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 3, .production_id = 3), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 5), - [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 5), - [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 5, .production_id = 9), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__case_value, 1), - [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 5, .production_id = 9), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 1), - [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 5, .production_id = 4), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__definition, 1), - [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 1, .production_id = 1), - [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 4, .production_id = 4), - [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 4, .production_id = 4), - [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 5, .production_id = 4), - [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 3, .production_id = 3), - [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 6, .production_id = 9), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 6, .production_id = 9), - [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_value, 4, .production_id = 14), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_soong_config_variable, 6, .production_id = 15), - [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 5), - [257] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 2), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), - [283] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 3), - [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [291] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), - [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_default_case, 3, .production_id = 16), - [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_case, 3, .production_id = 16), - [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 4), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__string_literal, 1), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), + [41] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(11), + [44] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(40), + [47] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_cases_repeat1, 2), SHIFT_REPEAT(101), + [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [56] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 3), + [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [60] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpreted_string_literal, 2), + [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), + [64] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(37), + [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 5, .production_id = 11), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean_literal, 1), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 3, .production_id = 6), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer_literal, 1), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_expression, 6), + [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 4, .production_id = 5), + [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 4, .production_id = 11), + [85] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 4, .production_id = 6), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 3, .production_id = 5), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 2), + [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 4, .production_id = 12), + [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer_literal, 2), + [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_expression, 2), + [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 5, .production_id = 12), + [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [103] = {.entry = {.count = 1, .reusable = false}}, SHIFT(89), + [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), + [107] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), SHIFT_REPEAT(48), + [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), + [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 2), SHIFT_REPEAT(48), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__colon_property, 3, .production_id = 8), + [137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [145] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 1), + [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_interpreted_string_literal_repeat1, 1), + [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [151] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 13), SHIFT_REPEAT(7), + [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 13), + [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 2), + [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, .production_id = 6), + [180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [186] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [190] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [194] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [196] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 10), SHIFT_REPEAT(88), + [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 10), + [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equal_property, 3, .production_id = 8), + [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [207] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 10), SHIFT_REPEAT(86), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 10), + [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 5, .production_id = 9), + [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__old_module_repeat1, 2, .production_id = 5), + [216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 5, .production_id = 4), + [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__new_module_repeat1, 2, .production_id = 5), + [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 5, .production_id = 4), + [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 5, .production_id = 9), + [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 1, .production_id = 1), + [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 3, .production_id = 3), + [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__definition, 1), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__case_value, 1), + [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 3, .production_id = 3), + [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 1), + [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 4, .production_id = 4), + [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 4, .production_id = 4), + [242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__old_module, 6, .production_id = 9), + [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__new_module, 6, .production_id = 9), + [246] = {.entry = {.count = 1, .reusable = false}}, SHIFT(113), + [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_case, 3, .production_id = 16), + [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [256] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_value, 4, .production_id = 14), + [266] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [268] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 2), + [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [276] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [280] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [282] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_cases, 3), + [286] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [288] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_soong_config_variable, 6, .production_id = 15), + [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3), + [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), }; #ifdef __cplusplus diff --git a/test/corpus/select.txt b/test/corpus/select.txt index 205e13e..6cffe57 100644 --- a/test/corpus/select.txt +++ b/test/corpus/select.txt @@ -130,10 +130,9 @@ foo = select(variant("VARIANT"), { (select_case (interpreted_string_literal) (interpreted_string_literal)) - (ERROR - (select_case - (default) - (unset))) + (select_case + (default) + (unset)) (select_case (interpreted_string_literal) (interpreted_string_literal)) From 629a7cd5a7bc24c2b9469307ea966857c4e65984 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 9 Apr 2024 13:05:27 +0100 Subject: [PATCH 20/20] WIP --- grammar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grammar.js b/grammar.js index 848ec83..6d16c74 100644 --- a/grammar.js +++ b/grammar.js @@ -123,6 +123,7 @@ module.exports = grammar({ ")", ), + // FIXME: simplify with 'soong_config_variable'? select_value: ($) => seq( field("type", alias( choice("product_variable", "release_variable", "variant"), @@ -133,6 +134,7 @@ module.exports = grammar({ ")", ), + // FIXME soong_config_variable: ($) => seq( field("type", alias("soong_config_variable", $.selection_type)), "(",