From fdf4c4df5b07fca35eba397de4b15c1bb592a454 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 4 Nov 2024 17:54:29 +0300 Subject: [PATCH] feat: better labels & code blocks --- grammar.js | 10 +- package.json | 25 +- src/grammar.json | 56 +- src/node-types.json | 13 +- src/parser.c | 2491 +++++++++-------- src/tree_sitter/alloc.h | 8 +- .../docs/special_objects/icons_and_images.txt | 100 + .../docs/special_objects/text_and_code.txt | 18 + tree-sitter.json | 30 + 9 files changed, 1541 insertions(+), 1210 deletions(-) create mode 100644 test/corpus/docs/special_objects/text_and_code.txt create mode 100644 tree-sitter.json diff --git a/grammar.js b/grammar.js index e89a4a9..2be75ce 100644 --- a/grammar.js +++ b/grammar.js @@ -63,16 +63,18 @@ module.exports = grammar({ block: $ => seq("{", repeat($.declaration), "}"), label: $ => choice( + $._label_codeblock, repeat1($._label_base), token(seq('"', /.*/, '"')), ), + _label_codeblock: _ => choice( + seq(repeat1("|"), /[^\|]+/, repeat1("|")), + ), + _label_base: $ => choice( $._ident_base, - "\\", - ":", - ".", - "-" + token(prec(PREC.label, /[\\\:\.\-\%\_#&]+/)) // idk how to make it better ), connection_refference: $ => seq( diff --git a/package.json b/package.json index bf52810..3f2146e 100644 --- a/package.json +++ b/package.json @@ -21,21 +21,6 @@ "prebuildify": "^6.0.1" }, "repository": "https://github.com/ravsii/tree-sitter-d2", - "tree-sitter": [ - { - "scope": "source.d2", - "file-types": [ - "d2" - ], - "injection-regex": "d2" - } - ], - "scripts": { - "install": "node-gyp-build", - "prestart": "tree-sitter build --wasm", - "start": "tree-sitter playground", - "test": "node --test bindings/node/*_test.js" - }, "files": [ "grammar.js", "binding.gyp", @@ -44,5 +29,11 @@ "queries/*", "src/**", "*.wasm" - ] -} + ], + "scripts": { + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm", + "start": "tree-sitter playground", + "test": "node --test bindings/node/*_test.js" + } +} \ No newline at end of file diff --git a/src/grammar.json b/src/grammar.json index 56a0579..ed629be 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,4 +1,5 @@ { + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", "name": "d2", "word": "_ident_base", "rules": { @@ -197,6 +198,10 @@ "label": { "type": "CHOICE", "members": [ + { + "type": "SYMBOL", + "name": "_label_codeblock" + }, { "type": "REPEAT1", "content": { @@ -226,6 +231,34 @@ } ] }, + "_label_codeblock": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "PATTERN", + "value": "[^\\|]+" + }, + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": "|" + } + } + ] + } + ] + }, "_label_base": { "type": "CHOICE", "members": [ @@ -234,20 +267,15 @@ "name": "_ident_base" }, { - "type": "STRING", - "value": "\\" - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "STRING", - "value": "." - }, - { - "type": "STRING", - "value": "-" + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 10, + "content": { + "type": "PATTERN", + "value": "[\\\\\\:\\.\\-\\%\\_#&]+" + } + } } ] }, diff --git a/src/node-types.json b/src/node-types.json index ed3c244..ecbfaa0 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -140,6 +140,7 @@ { "type": "source_file", "named": true, + "root": true, "fields": {}, "children": { "multiple": true, @@ -164,10 +165,6 @@ "type": ")", "named": false }, - { - "type": "-", - "named": false - }, { "type": ".", "named": false @@ -176,10 +173,6 @@ "type": ":", "named": false }, - { - "type": "\\", - "named": false - }, { "type": "_", "named": false @@ -200,6 +193,10 @@ "type": "{", "named": false }, + { + "type": "|", + "named": false + }, { "type": "}", "named": false diff --git a/src/parser.c b/src/parser.c index 4f3f2f3..01b8351 100644 --- a/src/parser.c +++ b/src/parser.c @@ -5,11 +5,11 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 107 +#define STATE_COUNT 112 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 32 +#define SYMBOL_COUNT 35 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 17 +#define TOKEN_COUNT 18 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 6 #define MAX_ALIAS_SEQUENCE_LENGTH 5 @@ -23,30 +23,33 @@ enum ts_symbol_identifiers { anon_sym_LBRACE = 5, anon_sym_RBRACE = 6, aux_sym_label_token1 = 7, - anon_sym_BSLASH = 8, - anon_sym_DOT = 9, - anon_sym_DASH = 10, + anon_sym_PIPE = 8, + aux_sym__label_codeblock_token1 = 9, + aux_sym__label_base_token1 = 10, anon_sym_LPAREN = 11, anon_sym_RPAREN = 12, sym_connection_identifier = 13, - aux_sym__ident_token1 = 14, - anon_sym__ = 15, - sym_comment = 16, - sym_source_file = 17, - sym_declaration = 18, - sym__expr = 19, - sym_block = 20, - sym_label = 21, - sym__label_base = 22, - sym_connection_refference = 23, - sym_identifier = 24, - aux_sym__fields = 25, - sym__ident = 26, - aux_sym_source_file_repeat1 = 27, - aux_sym__expr_repeat1 = 28, - aux_sym_block_repeat1 = 29, - aux_sym_label_repeat1 = 30, - aux_sym__ident_repeat1 = 31, + anon_sym_DOT = 14, + aux_sym__ident_token1 = 15, + anon_sym__ = 16, + sym_comment = 17, + sym_source_file = 18, + sym_declaration = 19, + sym__expr = 20, + sym_block = 21, + sym_label = 22, + sym__label_codeblock = 23, + sym__label_base = 24, + sym_connection_refference = 25, + sym_identifier = 26, + aux_sym__fields = 27, + sym__ident = 28, + aux_sym_source_file_repeat1 = 29, + aux_sym__expr_repeat1 = 30, + aux_sym_block_repeat1 = 31, + aux_sym_label_repeat1 = 32, + aux_sym__label_codeblock_repeat1 = 33, + aux_sym__ident_repeat1 = 34, }; static const char * const ts_symbol_names[] = { @@ -58,12 +61,13 @@ static const char * const ts_symbol_names[] = { [anon_sym_LBRACE] = "{", [anon_sym_RBRACE] = "}", [aux_sym_label_token1] = "label_token1", - [anon_sym_BSLASH] = "\\", - [anon_sym_DOT] = ".", - [anon_sym_DASH] = "-", + [anon_sym_PIPE] = "|", + [aux_sym__label_codeblock_token1] = "_label_codeblock_token1", + [aux_sym__label_base_token1] = "_label_base_token1", [anon_sym_LPAREN] = "(", [anon_sym_RPAREN] = ")", [sym_connection_identifier] = "connection_identifier", + [anon_sym_DOT] = ".", [aux_sym__ident_token1] = "_ident_token1", [anon_sym__] = "_", [sym_comment] = "comment", @@ -72,6 +76,7 @@ static const char * const ts_symbol_names[] = { [sym__expr] = "_expr", [sym_block] = "block", [sym_label] = "label", + [sym__label_codeblock] = "_label_codeblock", [sym__label_base] = "_label_base", [sym_connection_refference] = "connection_refference", [sym_identifier] = "identifier", @@ -81,6 +86,7 @@ static const char * const ts_symbol_names[] = { [aux_sym__expr_repeat1] = "_expr_repeat1", [aux_sym_block_repeat1] = "block_repeat1", [aux_sym_label_repeat1] = "label_repeat1", + [aux_sym__label_codeblock_repeat1] = "_label_codeblock_repeat1", [aux_sym__ident_repeat1] = "_ident_repeat1", }; @@ -93,12 +99,13 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_LBRACE] = anon_sym_LBRACE, [anon_sym_RBRACE] = anon_sym_RBRACE, [aux_sym_label_token1] = aux_sym_label_token1, - [anon_sym_BSLASH] = anon_sym_BSLASH, - [anon_sym_DOT] = anon_sym_DOT, - [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_PIPE] = anon_sym_PIPE, + [aux_sym__label_codeblock_token1] = aux_sym__label_codeblock_token1, + [aux_sym__label_base_token1] = aux_sym__label_base_token1, [anon_sym_LPAREN] = anon_sym_LPAREN, [anon_sym_RPAREN] = anon_sym_RPAREN, [sym_connection_identifier] = sym_connection_identifier, + [anon_sym_DOT] = anon_sym_DOT, [aux_sym__ident_token1] = aux_sym__ident_token1, [anon_sym__] = anon_sym__, [sym_comment] = sym_comment, @@ -107,6 +114,7 @@ static const TSSymbol ts_symbol_map[] = { [sym__expr] = sym__expr, [sym_block] = sym_block, [sym_label] = sym_label, + [sym__label_codeblock] = sym__label_codeblock, [sym__label_base] = sym__label_base, [sym_connection_refference] = sym_connection_refference, [sym_identifier] = sym_identifier, @@ -116,6 +124,7 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym__expr_repeat1] = aux_sym__expr_repeat1, [aux_sym_block_repeat1] = aux_sym_block_repeat1, [aux_sym_label_repeat1] = aux_sym_label_repeat1, + [aux_sym__label_codeblock_repeat1] = aux_sym__label_codeblock_repeat1, [aux_sym__ident_repeat1] = aux_sym__ident_repeat1, }; @@ -152,16 +161,16 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [anon_sym_BSLASH] = { + [anon_sym_PIPE] = { .visible = true, .named = false, }, - [anon_sym_DOT] = { - .visible = true, + [aux_sym__label_codeblock_token1] = { + .visible = false, .named = false, }, - [anon_sym_DASH] = { - .visible = true, + [aux_sym__label_base_token1] = { + .visible = false, .named = false, }, [anon_sym_LPAREN] = { @@ -176,6 +185,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, [aux_sym__ident_token1] = { .visible = false, .named = false, @@ -208,6 +221,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym__label_codeblock] = { + .visible = false, + .named = true, + }, [sym__label_base] = { .visible = false, .named = true, @@ -244,6 +261,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, + [aux_sym__label_codeblock_repeat1] = { + .visible = false, + .named = false, + }, [aux_sym__ident_repeat1] = { .visible = false, .named = false, @@ -378,96 +399,101 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [14] = 14, [15] = 15, [16] = 16, - [17] = 13, - [18] = 15, + [17] = 17, + [18] = 18, [19] = 19, - [20] = 14, - [21] = 21, - [22] = 19, - [23] = 23, - [24] = 21, + [20] = 12, + [21] = 11, + [22] = 13, + [23] = 14, + [24] = 24, [25] = 25, - [26] = 14, - [27] = 23, - [28] = 15, + [26] = 26, + [27] = 27, + [28] = 28, [29] = 29, - [30] = 30, - [31] = 31, - [32] = 32, - [33] = 33, - [34] = 19, - [35] = 13, - [36] = 36, - [37] = 16, + [30] = 11, + [31] = 13, + [32] = 12, + [33] = 17, + [34] = 34, + [35] = 15, + [36] = 16, + [37] = 14, [38] = 38, - [39] = 19, + [39] = 39, [40] = 40, [41] = 41, - [42] = 41, + [42] = 42, [43] = 43, [44] = 44, - [45] = 40, + [45] = 45, [46] = 46, [47] = 47, [48] = 48, [49] = 49, [50] = 50, - [51] = 51, + [51] = 14, [52] = 52, - [53] = 53, - [54] = 54, - [55] = 55, - [56] = 56, - [57] = 52, - [58] = 56, - [59] = 19, + [53] = 52, + [54] = 40, + [55] = 41, + [56] = 44, + [57] = 15, + [58] = 58, + [59] = 38, [60] = 60, - [61] = 46, - [62] = 51, - [63] = 54, - [64] = 55, - [65] = 52, - [66] = 23, - [67] = 16, - [68] = 38, - [69] = 60, - [70] = 43, - [71] = 44, - [72] = 47, - [73] = 53, - [74] = 50, - [75] = 49, - [76] = 21, - [77] = 77, - [78] = 31, - [79] = 77, - [80] = 30, - [81] = 32, - [82] = 82, - [83] = 33, - [84] = 82, - [85] = 48, - [86] = 86, - [87] = 87, - [88] = 88, + [61] = 61, + [62] = 62, + [63] = 58, + [64] = 16, + [65] = 42, + [66] = 43, + [67] = 67, + [68] = 45, + [69] = 46, + [70] = 48, + [71] = 50, + [72] = 60, + [73] = 44, + [74] = 14, + [75] = 47, + [76] = 61, + [77] = 62, + [78] = 17, + [79] = 79, + [80] = 80, + [81] = 24, + [82] = 67, + [83] = 25, + [84] = 84, + [85] = 26, + [86] = 27, + [87] = 80, + [88] = 79, [89] = 89, [90] = 90, - [91] = 91, + [91] = 39, [92] = 92, [93] = 93, - [94] = 90, + [94] = 94, [95] = 95, - [96] = 89, + [96] = 96, [97] = 97, [98] = 98, [99] = 99, - [100] = 98, - [101] = 92, - [102] = 102, - [103] = 88, - [104] = 87, - [105] = 99, - [106] = 90, + [100] = 100, + [101] = 101, + [102] = 97, + [103] = 93, + [104] = 96, + [105] = 105, + [106] = 106, + [107] = 99, + [108] = 101, + [109] = 98, + [110] = 106, + [111] = 97, }; static TSCharacterRange sym__ident_base_character_set_1[] = { @@ -532,242 +558,306 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(12); + if (eof) ADVANCE(13); ADVANCE_MAP( '"', 5, - '#', 34, - '(', 24, - ')', 25, - '-', 23, - '.', 22, - ':', 13, + '#', 27, + '(', 28, + ')', 29, + '-', 26, + '.', 27, + ':', 27, + '<', 8, '[', 11, - '\\', 21, - '_', 32, - '{', 18, - '}', 19, + '_', 27, + '{', 19, + '|', 22, + '}', 20, + '%', 27, + '&', 27, + '\\', 27, ); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(0); - if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(33); + if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(38); END_STATE(); case 1: - ADVANCE_MAP( - '\n', 15, - '"', 5, - '#', 34, - '-', 23, - '.', 22, - ':', 13, - '\\', 21, - '{', 18, - 0, 14, - ';', 14, - ); + if (lookahead == '\n') ADVANCE(16); + if (lookahead == '"') ADVANCE(5); + if (lookahead == '#') ADVANCE(27); + if (lookahead == '{') ADVANCE(19); + if (lookahead == '|') ADVANCE(22); + if ((!eof && lookahead == 00) || + lookahead == ';') ADVANCE(15); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(1); - if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(33); + if (lookahead == '%' || + lookahead == '&' || + lookahead == '-' || + lookahead == '.' || + lookahead == ':' || + lookahead == '\\' || + lookahead == '_') ADVANCE(27); + if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(38); END_STATE(); case 2: ADVANCE_MAP( - '\n', 15, - '#', 34, - '-', 30, - '.', 22, - ':', 13, + '\n', 16, + '#', 39, + '-', 9, + '.', 31, + ':', 14, '<', 8, - '{', 18, - 0, 14, - ';', 14, - '\'', 31, - '_', 31, + '{', 19, + '|', 22, + 0, 15, + ';', 15, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(27); + lookahead == ' ') SKIP(2); END_STATE(); case 3: ADVANCE_MAP( - '\n', 15, - '#', 34, - '-', 9, - '.', 22, - ':', 13, + '\n', 16, + '#', 39, + '-', 34, + '.', 31, + ':', 14, '<', 8, - '{', 18, - 0, 14, - ';', 14, + '{', 19, + 0, 15, + ';', 15, + '\'', 36, + '_', 36, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(3); + lookahead == ' ') ADVANCE(32); END_STATE(); case 4: ADVANCE_MAP( - '\n', 15, - '#', 34, - '.', 22, - ':', 13, - '{', 18, - 0, 14, - ';', 14, - '\'', 31, - '-', 31, - '_', 31, + '\n', 16, + '#', 39, + '.', 31, + ':', 14, + '{', 19, + 0, 15, + ';', 15, + '\'', 36, + '-', 36, + '_', 36, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(28); + lookahead == ' ') ADVANCE(33); END_STATE(); case 5: - if (lookahead == '"') ADVANCE(20); + if (lookahead == '"') ADVANCE(21); if (lookahead != 0 && lookahead != '\n') ADVANCE(5); END_STATE(); case 6: - if (lookahead == '#') ADVANCE(34); - if (lookahead == ')') ADVANCE(25); - if (lookahead == '-') ADVANCE(30); - if (lookahead == '.') ADVANCE(22); + if (lookahead == '#') ADVANCE(39); + if (lookahead == ')') ADVANCE(29); + if (lookahead == '-') ADVANCE(34); + if (lookahead == '.') ADVANCE(31); if (lookahead == '<') ADVANCE(8); if (lookahead == '\'' || - lookahead == '_') ADVANCE(31); + lookahead == '_') ADVANCE(36); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(29); + lookahead == ' ') ADVANCE(35); END_STATE(); case 7: - if (lookahead == '#') ADVANCE(34); - if (lookahead == ')') ADVANCE(25); - if (lookahead == '-') ADVANCE(9); - if (lookahead == '.') ADVANCE(22); - if (lookahead == '<') ADVANCE(8); + if (lookahead == '#') ADVANCE(23); + if (lookahead == '|') ADVANCE(22); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(7); + lookahead == ' ') ADVANCE(24); + if (lookahead != 0) ADVANCE(25); END_STATE(); case 8: - if (lookahead == '-') ADVANCE(17); + if (lookahead == '-') ADVANCE(18); END_STATE(); case 9: - if (lookahead == '-') ADVANCE(17); - if (lookahead == '>') ADVANCE(16); + if (lookahead == '-') ADVANCE(18); + if (lookahead == '>') ADVANCE(17); END_STATE(); case 10: - if (lookahead == ']') ADVANCE(26); + if (lookahead == ']') ADVANCE(30); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(10); END_STATE(); case 11: if (('0' <= lookahead && lookahead <= '9')) ADVANCE(10); END_STATE(); case 12: - ACCEPT_TOKEN(ts_builtin_sym_end); + if (eof) ADVANCE(13); + ADVANCE_MAP( + '#', 39, + '(', 28, + ')', 29, + '-', 9, + '.', 31, + '<', 8, + '[', 11, + '_', 37, + '|', 22, + '}', 20, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(12); + if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(38); END_STATE(); case 13: - ACCEPT_TOKEN(anon_sym_COLON); + ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 14: - ACCEPT_TOKEN(aux_sym_declaration_token1); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 15: ACCEPT_TOKEN(aux_sym_declaration_token1); - if (lookahead == '\n') ADVANCE(15); - if ((!eof && lookahead == 00) || - lookahead == ';') ADVANCE(14); END_STATE(); case 16: - ACCEPT_TOKEN(sym_connection); + ACCEPT_TOKEN(aux_sym_declaration_token1); + if (lookahead == '\n') ADVANCE(16); + if ((!eof && lookahead == 00) || + lookahead == ';') ADVANCE(15); END_STATE(); case 17: ACCEPT_TOKEN(sym_connection); - if (lookahead == '-') ADVANCE(17); - if (lookahead == '>') ADVANCE(16); END_STATE(); case 18: - ACCEPT_TOKEN(anon_sym_LBRACE); + ACCEPT_TOKEN(sym_connection); + if (lookahead == '-') ADVANCE(18); + if (lookahead == '>') ADVANCE(17); END_STATE(); case 19: - ACCEPT_TOKEN(anon_sym_RBRACE); + ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); case 20: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 21: ACCEPT_TOKEN(aux_sym_label_token1); - if (lookahead == '"') ADVANCE(20); + if (lookahead == '"') ADVANCE(21); if (lookahead != 0 && lookahead != '\n') ADVANCE(5); END_STATE(); - case 21: - ACCEPT_TOKEN(anon_sym_BSLASH); - END_STATE(); case 22: - ACCEPT_TOKEN(anon_sym_DOT); + ACCEPT_TOKEN(anon_sym_PIPE); END_STATE(); case 23: - ACCEPT_TOKEN(anon_sym_DASH); + ACCEPT_TOKEN(aux_sym__label_codeblock_token1); + if (lookahead == '\n') ADVANCE(25); + if (lookahead == '|') ADVANCE(39); + if (lookahead != 0) ADVANCE(23); END_STATE(); case 24: - ACCEPT_TOKEN(anon_sym_LPAREN); + ACCEPT_TOKEN(aux_sym__label_codeblock_token1); + if (lookahead == '#') ADVANCE(23); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(24); + if (lookahead != 0 && + lookahead != '|') ADVANCE(25); END_STATE(); case 25: - ACCEPT_TOKEN(anon_sym_RPAREN); + ACCEPT_TOKEN(aux_sym__label_codeblock_token1); + if (lookahead != 0 && + lookahead != '|') ADVANCE(25); END_STATE(); case 26: - ACCEPT_TOKEN(sym_connection_identifier); + ACCEPT_TOKEN(aux_sym__label_base_token1); + ADVANCE_MAP( + '-', 18, + '>', 17, + '#', 27, + '%', 27, + '&', 27, + '.', 27, + ':', 27, + '\\', 27, + '_', 27, + ); END_STATE(); case 27: + ACCEPT_TOKEN(aux_sym__label_base_token1); + if (lookahead == '#' || + lookahead == '%' || + lookahead == '&' || + lookahead == '-' || + lookahead == '.' || + lookahead == ':' || + lookahead == '\\' || + lookahead == '_') ADVANCE(27); + END_STATE(); + case 28: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 30: + ACCEPT_TOKEN(sym_connection_identifier); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 32: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '\n') ADVANCE(15); - if (lookahead == '-') ADVANCE(30); + if (lookahead == '\n') ADVANCE(16); + if (lookahead == '-') ADVANCE(34); if (lookahead == '<') ADVANCE(8); if ((!eof && lookahead == 00) || - lookahead == ';') ADVANCE(14); + lookahead == ';') ADVANCE(15); if (lookahead == '\'' || - lookahead == '_') ADVANCE(31); + lookahead == '_') ADVANCE(36); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(27); + lookahead == ' ') ADVANCE(32); END_STATE(); - case 28: + case 33: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '\n') ADVANCE(15); + if (lookahead == '\n') ADVANCE(16); if ((!eof && lookahead == 00) || - lookahead == ';') ADVANCE(14); + lookahead == ';') ADVANCE(15); if (lookahead == '\'' || lookahead == '-' || - lookahead == '_') ADVANCE(31); + lookahead == '_') ADVANCE(36); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(28); + lookahead == ' ') ADVANCE(33); END_STATE(); - case 29: + case 34: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '-') ADVANCE(30); - if (lookahead == '<') ADVANCE(8); - if (lookahead == '\'' || - lookahead == '_') ADVANCE(31); + if (lookahead == '-') ADVANCE(18); + if (lookahead == '>') ADVANCE(17); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(29); + lookahead == ' ' || + lookahead == '\'' || + lookahead == '_') ADVANCE(36); END_STATE(); - case 30: + case 35: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '-') ADVANCE(17); - if (lookahead == '>') ADVANCE(16); + if (lookahead == '-') ADVANCE(34); + if (lookahead == '<') ADVANCE(8); + if (lookahead == '\'' || + lookahead == '_') ADVANCE(36); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ' || - lookahead == '\'' || - lookahead == '_') ADVANCE(31); + lookahead == ' ') ADVANCE(35); END_STATE(); - case 31: + case 36: ACCEPT_TOKEN(aux_sym__ident_token1); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ' || lookahead == '\'' || lookahead == '-' || - lookahead == '_') ADVANCE(31); + lookahead == '_') ADVANCE(36); END_STATE(); - case 32: + case 37: ACCEPT_TOKEN(anon_sym__); END_STATE(); - case 33: + case 38: ACCEPT_TOKEN(sym__ident_base); - if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(33); + if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(38); END_STATE(); - case 34: + case 39: ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(34); + lookahead != '\n') ADVANCE(39); END_STATE(); default: return false; @@ -788,112 +878,117 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 0}, + [1] = {.lex_state = 12}, [2] = {.lex_state = 1}, [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, [5] = {.lex_state = 1}, - [6] = {.lex_state = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 0}, - [9] = {.lex_state = 0}, - [10] = {.lex_state = 0}, - [11] = {.lex_state = 1}, - [12] = {.lex_state = 1}, - [13] = {.lex_state = 2}, + [6] = {.lex_state = 12}, + [7] = {.lex_state = 12}, + [8] = {.lex_state = 12}, + [9] = {.lex_state = 12}, + [10] = {.lex_state = 12}, + [11] = {.lex_state = 3}, + [12] = {.lex_state = 3}, + [13] = {.lex_state = 3}, [14] = {.lex_state = 2}, [15] = {.lex_state = 2}, [16] = {.lex_state = 2}, - [17] = {.lex_state = 4}, - [18] = {.lex_state = 4}, - [19] = {.lex_state = 3}, + [17] = {.lex_state = 3}, + [18] = {.lex_state = 1}, + [19] = {.lex_state = 1}, [20] = {.lex_state = 4}, - [21] = {.lex_state = 3}, - [22] = {.lex_state = 3}, - [23] = {.lex_state = 3}, - [24] = {.lex_state = 1}, - [25] = {.lex_state = 0}, - [26] = {.lex_state = 6}, - [27] = {.lex_state = 1}, - [28] = {.lex_state = 6}, - [29] = {.lex_state = 1}, - [30] = {.lex_state = 3}, - [31] = {.lex_state = 3}, - [32] = {.lex_state = 3}, - [33] = {.lex_state = 3}, - [34] = {.lex_state = 1}, - [35] = {.lex_state = 6}, - [36] = {.lex_state = 1}, - [37] = {.lex_state = 4}, - [38] = {.lex_state = 0}, - [39] = {.lex_state = 7}, - [40] = {.lex_state = 1}, - [41] = {.lex_state = 1}, - [42] = {.lex_state = 1}, - [43] = {.lex_state = 0}, - [44] = {.lex_state = 0}, - [45] = {.lex_state = 1}, - [46] = {.lex_state = 0}, - [47] = {.lex_state = 0}, - [48] = {.lex_state = 3}, - [49] = {.lex_state = 0}, - [50] = {.lex_state = 0}, - [51] = {.lex_state = 0}, - [52] = {.lex_state = 0}, - [53] = {.lex_state = 0}, - [54] = {.lex_state = 0}, - [55] = {.lex_state = 0}, - [56] = {.lex_state = 0}, - [57] = {.lex_state = 0}, - [58] = {.lex_state = 0}, - [59] = {.lex_state = 7}, - [60] = {.lex_state = 0}, - [61] = {.lex_state = 0}, - [62] = {.lex_state = 0}, - [63] = {.lex_state = 0}, - [64] = {.lex_state = 0}, - [65] = {.lex_state = 0}, - [66] = {.lex_state = 7}, - [67] = {.lex_state = 6}, - [68] = {.lex_state = 0}, - [69] = {.lex_state = 0}, - [70] = {.lex_state = 0}, - [71] = {.lex_state = 0}, - [72] = {.lex_state = 0}, - [73] = {.lex_state = 0}, - [74] = {.lex_state = 0}, - [75] = {.lex_state = 0}, - [76] = {.lex_state = 7}, - [77] = {.lex_state = 1}, - [78] = {.lex_state = 7}, - [79] = {.lex_state = 1}, - [80] = {.lex_state = 7}, - [81] = {.lex_state = 7}, - [82] = {.lex_state = 1}, - [83] = {.lex_state = 7}, - [84] = {.lex_state = 1}, - [85] = {.lex_state = 7}, - [86] = {.lex_state = 1}, - [87] = {.lex_state = 1}, - [88] = {.lex_state = 1}, - [89] = {.lex_state = 1}, - [90] = {.lex_state = 0}, - [91] = {.lex_state = 0}, - [92] = {.lex_state = 1}, - [93] = {.lex_state = 1}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 0}, - [96] = {.lex_state = 1}, - [97] = {.lex_state = 1}, - [98] = {.lex_state = 1}, - [99] = {.lex_state = 1}, - [100] = {.lex_state = 1}, - [101] = {.lex_state = 1}, - [102] = {.lex_state = 0}, - [103] = {.lex_state = 1}, - [104] = {.lex_state = 1}, - [105] = {.lex_state = 1}, - [106] = {.lex_state = 0}, + [21] = {.lex_state = 4}, + [22] = {.lex_state = 4}, + [23] = {.lex_state = 2}, + [24] = {.lex_state = 2}, + [25] = {.lex_state = 2}, + [26] = {.lex_state = 2}, + [27] = {.lex_state = 2}, + [28] = {.lex_state = 12}, + [29] = {.lex_state = 2}, + [30] = {.lex_state = 6}, + [31] = {.lex_state = 6}, + [32] = {.lex_state = 6}, + [33] = {.lex_state = 4}, + [34] = {.lex_state = 2}, + [35] = {.lex_state = 2}, + [36] = {.lex_state = 2}, + [37] = {.lex_state = 2}, + [38] = {.lex_state = 2}, + [39] = {.lex_state = 2}, + [40] = {.lex_state = 12}, + [41] = {.lex_state = 12}, + [42] = {.lex_state = 12}, + [43] = {.lex_state = 12}, + [44] = {.lex_state = 12}, + [45] = {.lex_state = 12}, + [46] = {.lex_state = 12}, + [47] = {.lex_state = 2}, + [48] = {.lex_state = 12}, + [49] = {.lex_state = 2}, + [50] = {.lex_state = 12}, + [51] = {.lex_state = 12}, + [52] = {.lex_state = 12}, + [53] = {.lex_state = 12}, + [54] = {.lex_state = 12}, + [55] = {.lex_state = 12}, + [56] = {.lex_state = 12}, + [57] = {.lex_state = 12}, + [58] = {.lex_state = 12}, + [59] = {.lex_state = 2}, + [60] = {.lex_state = 12}, + [61] = {.lex_state = 12}, + [62] = {.lex_state = 12}, + [63] = {.lex_state = 12}, + [64] = {.lex_state = 12}, + [65] = {.lex_state = 12}, + [66] = {.lex_state = 12}, + [67] = {.lex_state = 2}, + [68] = {.lex_state = 12}, + [69] = {.lex_state = 12}, + [70] = {.lex_state = 12}, + [71] = {.lex_state = 12}, + [72] = {.lex_state = 12}, + [73] = {.lex_state = 12}, + [74] = {.lex_state = 12}, + [75] = {.lex_state = 2}, + [76] = {.lex_state = 12}, + [77] = {.lex_state = 12}, + [78] = {.lex_state = 6}, + [79] = {.lex_state = 2}, + [80] = {.lex_state = 2}, + [81] = {.lex_state = 12}, + [82] = {.lex_state = 7}, + [83] = {.lex_state = 12}, + [84] = {.lex_state = 7}, + [85] = {.lex_state = 12}, + [86] = {.lex_state = 12}, + [87] = {.lex_state = 2}, + [88] = {.lex_state = 2}, + [89] = {.lex_state = 2}, + [90] = {.lex_state = 12}, + [91] = {.lex_state = 12}, + [92] = {.lex_state = 12}, + [93] = {.lex_state = 2}, + [94] = {.lex_state = 12}, + [95] = {.lex_state = 2}, + [96] = {.lex_state = 2}, + [97] = {.lex_state = 12}, + [98] = {.lex_state = 2}, + [99] = {.lex_state = 2}, + [100] = {.lex_state = 2}, + [101] = {.lex_state = 2}, + [102] = {.lex_state = 12}, + [103] = {.lex_state = 2}, + [104] = {.lex_state = 2}, + [105] = {.lex_state = 12}, + [106] = {.lex_state = 2}, + [107] = {.lex_state = 2}, + [108] = {.lex_state = 2}, + [109] = {.lex_state = 2}, + [110] = {.lex_state = 2}, + [111] = {.lex_state = 12}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -901,26 +996,27 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [ts_builtin_sym_end] = ACTIONS(1), [sym__ident_base] = ACTIONS(1), [anon_sym_COLON] = ACTIONS(1), + [sym_connection] = ACTIONS(1), [anon_sym_LBRACE] = ACTIONS(1), [anon_sym_RBRACE] = ACTIONS(1), [aux_sym_label_token1] = ACTIONS(1), - [anon_sym_BSLASH] = ACTIONS(1), - [anon_sym_DOT] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [aux_sym__label_base_token1] = ACTIONS(1), [anon_sym_LPAREN] = ACTIONS(1), [anon_sym_RPAREN] = ACTIONS(1), [sym_connection_identifier] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), [anon_sym__] = ACTIONS(1), [sym_comment] = ACTIONS(3), }, [1] = { - [sym_source_file] = STATE(102), - [sym_declaration] = STATE(8), - [sym__expr] = STATE(40), - [sym_connection_refference] = STATE(41), - [sym_identifier] = STATE(32), - [sym__ident] = STATE(22), - [aux_sym_source_file_repeat1] = STATE(8), + [sym_source_file] = STATE(94), + [sym_declaration] = STATE(10), + [sym__expr] = STATE(47), + [sym_connection_refference] = STATE(59), + [sym_identifier] = STATE(25), + [sym__ident] = STATE(14), + [aux_sym_source_file_repeat1] = STATE(10), [ts_builtin_sym_end] = ACTIONS(5), [sym__ident_base] = ACTIONS(7), [anon_sym_LPAREN] = ACTIONS(9), @@ -930,7 +1026,9 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }; static const uint16_t ts_small_parse_table[] = { - [0] = 8, + [0] = 11, + ACTIONS(3), 1, + sym_comment, ACTIONS(17), 1, aux_sym_declaration_token1, ACTIONS(19), 1, @@ -938,89 +1036,97 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(21), 1, aux_sym_label_token1, ACTIONS(23), 1, - sym_comment, + anon_sym_PIPE, STATE(84), 1, + aux_sym__label_codeblock_repeat1, + STATE(88), 1, sym_label, - STATE(105), 1, + STATE(89), 1, + sym__label_codeblock, + STATE(106), 1, sym_block, - STATE(11), 2, + ACTIONS(15), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(18), 2, sym__label_base, aux_sym_label_repeat1, - ACTIONS(15), 5, - anon_sym_COLON, - anon_sym_BSLASH, - anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [30] = 8, + [36] = 11, + ACTIONS(3), 1, + sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, ACTIONS(21), 1, aux_sym_label_token1, ACTIONS(23), 1, - sym_comment, + anon_sym_PIPE, ACTIONS(25), 1, aux_sym_declaration_token1, - STATE(79), 1, + STATE(80), 1, sym_label, - STATE(101), 1, + STATE(84), 1, + aux_sym__label_codeblock_repeat1, + STATE(89), 1, + sym__label_codeblock, + STATE(96), 1, sym_block, - STATE(11), 2, + ACTIONS(15), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(18), 2, sym__label_base, aux_sym_label_repeat1, - ACTIONS(15), 5, - anon_sym_COLON, - anon_sym_BSLASH, - anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [60] = 8, + [72] = 11, + ACTIONS(3), 1, + sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, ACTIONS(21), 1, aux_sym_label_token1, ACTIONS(23), 1, - sym_comment, + anon_sym_PIPE, ACTIONS(27), 1, aux_sym_declaration_token1, - STATE(82), 1, + STATE(79), 1, sym_label, - STATE(99), 1, + STATE(84), 1, + aux_sym__label_codeblock_repeat1, + STATE(89), 1, + sym__label_codeblock, + STATE(110), 1, sym_block, - STATE(11), 2, + ACTIONS(15), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(18), 2, sym__label_base, aux_sym_label_repeat1, - ACTIONS(15), 5, - anon_sym_COLON, - anon_sym_BSLASH, - anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [90] = 8, + [108] = 11, + ACTIONS(3), 1, + sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, ACTIONS(21), 1, aux_sym_label_token1, ACTIONS(23), 1, - sym_comment, + anon_sym_PIPE, ACTIONS(29), 1, aux_sym_declaration_token1, - STATE(77), 1, + STATE(84), 1, + aux_sym__label_codeblock_repeat1, + STATE(87), 1, sym_label, - STATE(92), 1, + STATE(89), 1, + sym__label_codeblock, + STATE(104), 1, sym_block, - STATE(11), 2, + ACTIONS(15), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(18), 2, sym__label_base, aux_sym_label_repeat1, - ACTIONS(15), 5, - anon_sym_COLON, - anon_sym_BSLASH, - anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [120] = 10, - ACTIONS(3), 1, - sym_comment, + [144] = 10, ACTIONS(7), 1, sym__ident_base, ACTIONS(9), 1, @@ -1029,86 +1135,86 @@ static const uint16_t ts_small_parse_table[] = { anon_sym__, ACTIONS(31), 1, anon_sym_RBRACE, - STATE(22), 1, + ACTIONS(33), 1, + sym_comment, + STATE(14), 1, sym__ident, - STATE(32), 1, + STATE(25), 1, sym_identifier, - STATE(42), 1, + STATE(38), 1, sym_connection_refference, - STATE(45), 1, + STATE(75), 1, sym__expr, - STATE(7), 2, + STATE(9), 2, sym_declaration, aux_sym_block_repeat1, - [152] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, + [176] = 10, + ACTIONS(35), 1, + ts_builtin_sym_end, + ACTIONS(37), 1, sym__ident_base, - ACTIONS(36), 1, - anon_sym_RBRACE, - ACTIONS(38), 1, + ACTIONS(40), 1, anon_sym_LPAREN, - ACTIONS(41), 1, + ACTIONS(43), 1, anon_sym__, - STATE(22), 1, + ACTIONS(46), 1, + sym_comment, + STATE(14), 1, sym__ident, - STATE(32), 1, + STATE(25), 1, sym_identifier, - STATE(42), 1, - sym_connection_refference, - STATE(45), 1, + STATE(47), 1, sym__expr, + STATE(59), 1, + sym_connection_refference, STATE(7), 2, sym_declaration, - aux_sym_block_repeat1, - [184] = 10, + aux_sym_source_file_repeat1, + [208] = 10, ACTIONS(7), 1, sym__ident_base, ACTIONS(9), 1, anon_sym_LPAREN, ACTIONS(11), 1, anon_sym__, - ACTIONS(44), 1, - ts_builtin_sym_end, - ACTIONS(46), 1, + ACTIONS(33), 1, sym_comment, - STATE(22), 1, + ACTIONS(49), 1, + anon_sym_RBRACE, + STATE(14), 1, sym__ident, - STATE(32), 1, + STATE(25), 1, sym_identifier, - STATE(40), 1, - sym__expr, - STATE(41), 1, + STATE(38), 1, sym_connection_refference, - STATE(9), 2, + STATE(75), 1, + sym__expr, + STATE(6), 2, sym_declaration, - aux_sym_source_file_repeat1, - [216] = 10, - ACTIONS(48), 1, - ts_builtin_sym_end, - ACTIONS(50), 1, + aux_sym_block_repeat1, + [240] = 10, + ACTIONS(33), 1, + sym_comment, + ACTIONS(51), 1, sym__ident_base, - ACTIONS(53), 1, - anon_sym_LPAREN, + ACTIONS(54), 1, + anon_sym_RBRACE, ACTIONS(56), 1, - anon_sym__, + anon_sym_LPAREN, ACTIONS(59), 1, - sym_comment, - STATE(22), 1, + anon_sym__, + STATE(14), 1, sym__ident, - STATE(32), 1, + STATE(25), 1, sym_identifier, - STATE(40), 1, - sym__expr, - STATE(41), 1, + STATE(38), 1, sym_connection_refference, + STATE(75), 1, + sym__expr, STATE(9), 2, sym_declaration, - aux_sym_source_file_repeat1, - [248] = 10, - ACTIONS(3), 1, - sym_comment, + aux_sym_block_repeat1, + [272] = 10, ACTIONS(7), 1, sym__ident_base, ACTIONS(9), 1, @@ -1116,1099 +1222,1158 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(11), 1, anon_sym__, ACTIONS(62), 1, - anon_sym_RBRACE, - STATE(22), 1, + ts_builtin_sym_end, + ACTIONS(64), 1, + sym_comment, + STATE(14), 1, sym__ident, - STATE(32), 1, + STATE(25), 1, sym_identifier, - STATE(42), 1, - sym_connection_refference, - STATE(45), 1, + STATE(47), 1, sym__expr, - STATE(6), 2, + STATE(59), 1, + sym_connection_refference, + STATE(7), 2, sym_declaration, - aux_sym_block_repeat1, - [280] = 5, - ACTIONS(23), 1, + aux_sym_source_file_repeat1, + [304] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(66), 1, - aux_sym_declaration_token1, ACTIONS(68), 1, - anon_sym_LBRACE, - STATE(12), 2, - sym__label_base, - aux_sym_label_repeat1, - ACTIONS(64), 5, + aux_sym__ident_token1, + STATE(11), 1, + aux_sym__ident_repeat1, + ACTIONS(66), 5, anon_sym_COLON, - anon_sym_BSLASH, - anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [301] = 5, - ACTIONS(23), 1, - sym_comment, - ACTIONS(73), 1, aux_sym_declaration_token1, - ACTIONS(75), 1, + sym_connection, anon_sym_LBRACE, - STATE(12), 2, - sym__label_base, - aux_sym_label_repeat1, - ACTIONS(70), 5, - anon_sym_COLON, - anon_sym_BSLASH, anon_sym_DOT, - anon_sym_DASH, - sym__ident_base, - [322] = 4, - ACTIONS(23), 1, + [321] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(79), 1, + ACTIONS(73), 1, aux_sym__ident_token1, - STATE(13), 1, + STATE(11), 1, aux_sym__ident_repeat1, - ACTIONS(77), 5, + ACTIONS(71), 5, anon_sym_COLON, aux_sym_declaration_token1, sym_connection, anon_sym_LBRACE, anon_sym_DOT, - [339] = 4, - ACTIONS(23), 1, + [338] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(84), 1, + ACTIONS(73), 1, aux_sym__ident_token1, - STATE(15), 1, + STATE(12), 1, aux_sym__ident_repeat1, - ACTIONS(82), 5, + ACTIONS(75), 5, anon_sym_COLON, aux_sym_declaration_token1, sym_connection, anon_sym_LBRACE, anon_sym_DOT, - [356] = 4, - ACTIONS(23), 1, + [355] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(84), 1, - aux_sym__ident_token1, - STATE(13), 1, - aux_sym__ident_repeat1, - ACTIONS(86), 5, + ACTIONS(79), 1, + aux_sym_declaration_token1, + ACTIONS(81), 1, + anon_sym_DOT, + STATE(15), 1, + aux_sym__fields, + ACTIONS(77), 3, anon_sym_COLON, + sym_connection, + anon_sym_LBRACE, + [373] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(81), 1, + anon_sym_DOT, + ACTIONS(85), 1, aux_sym_declaration_token1, + STATE(16), 1, + aux_sym__fields, + ACTIONS(83), 3, + anon_sym_COLON, sym_connection, anon_sym_LBRACE, + [391] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(89), 1, + aux_sym_declaration_token1, + ACTIONS(91), 1, anon_sym_DOT, - [373] = 2, - ACTIONS(23), 1, + STATE(16), 1, + aux_sym__fields, + ACTIONS(87), 3, + anon_sym_COLON, + sym_connection, + anon_sym_LBRACE, + [409] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(77), 6, + ACTIONS(66), 6, anon_sym_COLON, aux_sym_declaration_token1, sym_connection, anon_sym_LBRACE, anon_sym_DOT, aux_sym__ident_token1, - [385] = 4, - ACTIONS(23), 1, + [421] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(88), 1, - aux_sym__ident_token1, - STATE(17), 1, - aux_sym__ident_repeat1, - ACTIONS(77), 4, - anon_sym_COLON, + ACTIONS(96), 1, aux_sym_declaration_token1, + ACTIONS(98), 1, anon_sym_LBRACE, - anon_sym_DOT, - [401] = 4, - ACTIONS(23), 1, + ACTIONS(94), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(19), 2, + sym__label_base, + aux_sym_label_repeat1, + [439] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(91), 1, + ACTIONS(103), 1, + aux_sym_declaration_token1, + ACTIONS(105), 1, + anon_sym_LBRACE, + ACTIONS(100), 2, + aux_sym__label_base_token1, + sym__ident_base, + STATE(19), 2, + sym__label_base, + aux_sym_label_repeat1, + [457] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(107), 1, aux_sym__ident_token1, - STATE(17), 1, + STATE(21), 1, aux_sym__ident_repeat1, - ACTIONS(86), 4, + ACTIONS(71), 4, anon_sym_COLON, aux_sym_declaration_token1, anon_sym_LBRACE, anon_sym_DOT, - [417] = 4, - ACTIONS(23), 1, + [473] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(95), 1, - aux_sym_declaration_token1, - STATE(23), 1, - aux_sym__fields, - ACTIONS(93), 4, + ACTIONS(109), 1, + aux_sym__ident_token1, + STATE(21), 1, + aux_sym__ident_repeat1, + ACTIONS(66), 4, anon_sym_COLON, - sym_connection, + aux_sym_declaration_token1, anon_sym_LBRACE, anon_sym_DOT, - [433] = 4, - ACTIONS(23), 1, + [489] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(91), 1, + ACTIONS(107), 1, aux_sym__ident_token1, - STATE(18), 1, + STATE(20), 1, aux_sym__ident_repeat1, - ACTIONS(82), 4, + ACTIONS(75), 4, anon_sym_COLON, aux_sym_declaration_token1, anon_sym_LBRACE, anon_sym_DOT, - [449] = 5, - ACTIONS(23), 1, + [505] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(99), 1, + ACTIONS(79), 1, aux_sym_declaration_token1, - ACTIONS(101), 1, - anon_sym_DOT, - STATE(21), 1, + STATE(15), 1, aux_sym__fields, - ACTIONS(97), 3, + ACTIONS(77), 4, anon_sym_COLON, sym_connection, anon_sym_LBRACE, - [467] = 5, - ACTIONS(23), 1, + anon_sym_DOT, + [521] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(95), 1, + ACTIONS(114), 1, aux_sym_declaration_token1, - ACTIONS(104), 1, - anon_sym_DOT, - STATE(23), 1, - aux_sym__fields, - ACTIONS(93), 3, - anon_sym_COLON, + ACTIONS(116), 1, sym_connection, + STATE(26), 1, + aux_sym__expr_repeat1, + ACTIONS(112), 2, + anon_sym_COLON, anon_sym_LBRACE, - [485] = 5, - ACTIONS(23), 1, + [538] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(104), 1, - anon_sym_DOT, - ACTIONS(108), 1, + ACTIONS(116), 1, + sym_connection, + ACTIONS(120), 1, aux_sym_declaration_token1, - STATE(21), 1, - aux_sym__fields, - ACTIONS(106), 3, + STATE(24), 1, + aux_sym__expr_repeat1, + ACTIONS(118), 2, anon_sym_COLON, - sym_connection, anon_sym_LBRACE, - [503] = 5, - ACTIONS(23), 1, + [555] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(99), 1, + ACTIONS(124), 1, aux_sym_declaration_token1, - ACTIONS(110), 1, - anon_sym_DOT, - STATE(24), 1, - aux_sym__fields, - ACTIONS(97), 2, + ACTIONS(126), 1, + sym_connection, + STATE(26), 1, + aux_sym__expr_repeat1, + ACTIONS(122), 2, anon_sym_COLON, anon_sym_LBRACE, - [520] = 6, + [572] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(113), 1, + ACTIONS(131), 1, + aux_sym_declaration_token1, + ACTIONS(129), 4, + anon_sym_COLON, + sym_connection, + anon_sym_LBRACE, + anon_sym_DOT, + [585] = 6, + ACTIONS(33), 1, + sym_comment, + ACTIONS(133), 1, sym__ident_base, - ACTIONS(115), 1, + ACTIONS(135), 1, anon_sym__, - STATE(59), 1, + STATE(51), 1, sym__ident, - STATE(81), 1, + STATE(83), 1, sym_identifier, - STATE(95), 1, + STATE(105), 1, sym__expr, - [539] = 4, - ACTIONS(23), 1, - sym_comment, - ACTIONS(117), 1, - aux_sym__ident_token1, - STATE(28), 1, - aux_sym__ident_repeat1, - ACTIONS(82), 3, - sym_connection, - anon_sym_DOT, - anon_sym_RPAREN, - [554] = 5, - ACTIONS(23), 1, + [604] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(108), 1, + ACTIONS(139), 1, aux_sym_declaration_token1, - ACTIONS(119), 1, + ACTIONS(141), 1, anon_sym_DOT, - STATE(24), 1, + STATE(34), 1, aux_sym__fields, - ACTIONS(106), 2, + ACTIONS(137), 2, anon_sym_COLON, anon_sym_LBRACE, - [571] = 4, - ACTIONS(23), 1, + [621] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(117), 1, + ACTIONS(143), 1, aux_sym__ident_token1, - STATE(35), 1, + STATE(30), 1, aux_sym__ident_repeat1, - ACTIONS(86), 3, + ACTIONS(66), 3, sym_connection, - anon_sym_DOT, anon_sym_RPAREN, - [586] = 5, - ACTIONS(23), 1, - sym_comment, - ACTIONS(119), 1, anon_sym_DOT, - ACTIONS(123), 1, - aux_sym_declaration_token1, - STATE(24), 1, - aux_sym__fields, - ACTIONS(121), 2, - anon_sym_COLON, - anon_sym_LBRACE, - [603] = 5, - ACTIONS(23), 1, + [636] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(127), 1, - aux_sym_declaration_token1, - ACTIONS(129), 1, + ACTIONS(146), 1, + aux_sym__ident_token1, + STATE(32), 1, + aux_sym__ident_repeat1, + ACTIONS(75), 3, sym_connection, - STATE(31), 1, - aux_sym__expr_repeat1, - ACTIONS(125), 2, - anon_sym_COLON, - anon_sym_LBRACE, - [620] = 5, - ACTIONS(23), 1, + anon_sym_RPAREN, + anon_sym_DOT, + [651] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(133), 1, - aux_sym_declaration_token1, - ACTIONS(135), 1, + ACTIONS(146), 1, + aux_sym__ident_token1, + STATE(30), 1, + aux_sym__ident_repeat1, + ACTIONS(71), 3, sym_connection, - STATE(31), 1, - aux_sym__expr_repeat1, - ACTIONS(131), 2, - anon_sym_COLON, - anon_sym_LBRACE, - [637] = 5, - ACTIONS(23), 1, + anon_sym_RPAREN, + anon_sym_DOT, + [666] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(129), 1, - sym_connection, - ACTIONS(140), 1, - aux_sym_declaration_token1, - STATE(30), 1, - aux_sym__expr_repeat1, - ACTIONS(138), 2, + ACTIONS(66), 5, anon_sym_COLON, - anon_sym_LBRACE, - [654] = 3, - ACTIONS(23), 1, - sym_comment, - ACTIONS(144), 1, aux_sym_declaration_token1, - ACTIONS(142), 4, - anon_sym_COLON, - sym_connection, anon_sym_LBRACE, anon_sym_DOT, - [667] = 4, - ACTIONS(23), 1, + aux_sym__ident_token1, + [677] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(95), 1, + ACTIONS(141), 1, + anon_sym_DOT, + ACTIONS(150), 1, aux_sym_declaration_token1, - STATE(27), 1, + STATE(36), 1, aux_sym__fields, - ACTIONS(93), 3, + ACTIONS(148), 2, anon_sym_COLON, anon_sym_LBRACE, - anon_sym_DOT, - [682] = 4, - ACTIONS(23), 1, + [694] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(146), 1, - aux_sym__ident_token1, - STATE(35), 1, - aux_sym__ident_repeat1, - ACTIONS(77), 3, - sym_connection, + ACTIONS(85), 1, + aux_sym_declaration_token1, + ACTIONS(141), 1, anon_sym_DOT, - anon_sym_RPAREN, - [697] = 5, - ACTIONS(23), 1, + STATE(36), 1, + aux_sym__fields, + ACTIONS(83), 2, + anon_sym_COLON, + anon_sym_LBRACE, + [711] = 5, + ACTIONS(3), 1, sym_comment, - ACTIONS(119), 1, - anon_sym_DOT, - ACTIONS(151), 1, + ACTIONS(89), 1, aux_sym_declaration_token1, - STATE(29), 1, + ACTIONS(152), 1, + anon_sym_DOT, + STATE(36), 1, aux_sym__fields, - ACTIONS(149), 2, + ACTIONS(87), 2, anon_sym_COLON, anon_sym_LBRACE, - [714] = 2, - ACTIONS(23), 1, + [728] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(77), 5, - anon_sym_COLON, + ACTIONS(79), 1, aux_sym_declaration_token1, + STATE(35), 1, + aux_sym__fields, + ACTIONS(77), 3, + anon_sym_COLON, anon_sym_LBRACE, anon_sym_DOT, - aux_sym__ident_token1, - [725] = 1, - ACTIONS(153), 5, - ts_builtin_sym_end, - anon_sym_LPAREN, - anon_sym__, - sym__ident_base, - sym_comment, - [733] = 3, + [743] = 5, ACTIONS(3), 1, sym_comment, - STATE(66), 1, - aux_sym__fields, - ACTIONS(95), 3, - sym_connection, - anon_sym_DOT, - anon_sym_RPAREN, - [745] = 5, ACTIONS(19), 1, anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, ACTIONS(155), 1, anon_sym_COLON, ACTIONS(157), 1, aux_sym_declaration_token1, - STATE(89), 1, + STATE(103), 1, sym_block, - [761] = 5, - ACTIONS(19), 1, - anon_sym_LBRACE, - ACTIONS(23), 1, + [759] = 3, + ACTIONS(3), 1, sym_comment, - ACTIONS(159), 1, - anon_sym_COLON, ACTIONS(161), 1, aux_sym_declaration_token1, - STATE(100), 1, - sym_block, - [777] = 5, - ACTIONS(19), 1, - anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(163), 1, + ACTIONS(159), 3, anon_sym_COLON, - ACTIONS(165), 1, - aux_sym_declaration_token1, - STATE(98), 1, - sym_block, - [793] = 1, - ACTIONS(167), 5, + sym_connection, + anon_sym_LBRACE, + [771] = 1, + ACTIONS(163), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [801] = 1, - ACTIONS(169), 5, + [779] = 5, + ACTIONS(7), 1, + sym__ident_base, + ACTIONS(11), 1, + anon_sym__, + ACTIONS(33), 1, + sym_comment, + STATE(14), 1, + sym__ident, + STATE(39), 1, + sym_identifier, + [795] = 1, + ACTIONS(165), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [809] = 5, - ACTIONS(19), 1, - anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(171), 1, - anon_sym_COLON, - ACTIONS(173), 1, - aux_sym_declaration_token1, - STATE(96), 1, - sym_block, - [825] = 1, - ACTIONS(175), 5, + [803] = 1, + ACTIONS(167), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [833] = 1, - ACTIONS(177), 5, + [811] = 5, + ACTIONS(7), 1, + sym__ident_base, + ACTIONS(33), 1, + sym_comment, + ACTIONS(169), 1, + anon_sym__, + STATE(23), 1, + sym__ident, + STATE(27), 1, + sym_identifier, + [827] = 1, + ACTIONS(171), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [841] = 3, - ACTIONS(23), 1, - sym_comment, - ACTIONS(181), 1, - aux_sym_declaration_token1, - ACTIONS(179), 3, - anon_sym_COLON, - sym_connection, - anon_sym_LBRACE, - [853] = 1, - ACTIONS(183), 5, + [835] = 1, + ACTIONS(173), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [861] = 1, - ACTIONS(185), 5, + [843] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_COLON, + ACTIONS(177), 1, + aux_sym_declaration_token1, + STATE(99), 1, + sym_block, + [859] = 1, + ACTIONS(179), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [869] = 1, + [867] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 1, + aux_sym_declaration_token1, + ACTIONS(183), 1, + anon_sym_LBRACE, + ACTIONS(185), 1, + anon_sym_PIPE, + STATE(67), 1, + aux_sym__label_codeblock_repeat1, + [883] = 1, ACTIONS(187), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [877] = 5, - ACTIONS(3), 1, + [891] = 4, + ACTIONS(33), 1, sym_comment, ACTIONS(189), 1, - sym__ident_base, - ACTIONS(191), 1, - anon_sym__, - STATE(33), 1, - sym_identifier, - STATE(34), 1, - sym__ident, - [893] = 1, - ACTIONS(193), 5, + anon_sym_DOT, + STATE(57), 1, + aux_sym__fields, + ACTIONS(79), 2, + sym_connection, + anon_sym_RPAREN, + [905] = 1, + ACTIONS(191), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [901] = 5, - ACTIONS(3), 1, + [913] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(7), 1, - sym__ident_base, - ACTIONS(11), 1, - anon_sym__, - STATE(22), 1, - sym__ident, - STATE(48), 1, - sym_identifier, - [917] = 1, - ACTIONS(195), 5, - ts_builtin_sym_end, + ACTIONS(191), 4, + anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, + [923] = 2, + ACTIONS(33), 1, sym_comment, - [925] = 1, - ACTIONS(197), 5, - ts_builtin_sym_end, + ACTIONS(163), 4, + anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - sym_comment, [933] = 5, - ACTIONS(3), 1, + ACTIONS(33), 1, sym_comment, - ACTIONS(7), 1, + ACTIONS(133), 1, + sym__ident_base, + ACTIONS(135), 1, + anon_sym__, + STATE(51), 1, + sym__ident, + STATE(91), 1, + sym_identifier, + [949] = 5, + ACTIONS(33), 1, + sym_comment, + ACTIONS(133), 1, sym__ident_base, - ACTIONS(199), 1, + ACTIONS(193), 1, anon_sym__, - STATE(19), 1, + STATE(74), 1, sym__ident, - STATE(33), 1, + STATE(86), 1, sym_identifier, - [949] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(197), 4, - anon_sym_RBRACE, - anon_sym_LPAREN, - anon_sym__, - sym__ident_base, - [959] = 4, - ACTIONS(3), 1, + [965] = 4, + ACTIONS(33), 1, sym_comment, - ACTIONS(201), 1, + ACTIONS(189), 1, anon_sym_DOT, - STATE(66), 1, + STATE(64), 1, aux_sym__fields, - ACTIONS(95), 2, + ACTIONS(85), 2, sym_connection, anon_sym_RPAREN, - [973] = 1, - ACTIONS(203), 5, + [979] = 1, + ACTIONS(195), 5, ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, sym_comment, - [981] = 2, + [987] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(175), 4, + ACTIONS(19), 1, + anon_sym_LBRACE, + ACTIONS(197), 1, + anon_sym_COLON, + ACTIONS(199), 1, + aux_sym_declaration_token1, + STATE(93), 1, + sym_block, + [1003] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(201), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [991] = 2, - ACTIONS(3), 1, + [1013] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(187), 4, + ACTIONS(203), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1001] = 5, - ACTIONS(3), 1, + [1023] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(113), 1, - sym__ident_base, - ACTIONS(115), 1, + ACTIONS(205), 4, + anon_sym_RBRACE, + anon_sym_LPAREN, anon_sym__, - STATE(59), 1, - sym__ident, - STATE(85), 1, - sym_identifier, - [1017] = 2, - ACTIONS(3), 1, + sym__ident_base, + [1033] = 2, + ACTIONS(33), 1, sym_comment, ACTIONS(195), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1027] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(113), 1, - sym__ident_base, - ACTIONS(205), 1, - anon_sym__, - STATE(39), 1, - sym__ident, - STATE(83), 1, - sym_identifier, [1043] = 4, - ACTIONS(3), 1, + ACTIONS(33), 1, sym_comment, - ACTIONS(201), 1, + ACTIONS(207), 1, anon_sym_DOT, - STATE(76), 1, + STATE(64), 1, aux_sym__fields, - ACTIONS(108), 2, + ACTIONS(89), 2, sym_connection, anon_sym_RPAREN, [1057] = 2, - ACTIONS(23), 1, - sym_comment, - ACTIONS(77), 4, - sym_connection, - anon_sym_DOT, - anon_sym_RPAREN, - aux_sym__ident_token1, - [1067] = 2, - ACTIONS(3), 1, + ACTIONS(33), 1, sym_comment, - ACTIONS(153), 4, + ACTIONS(165), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1077] = 2, - ACTIONS(3), 1, + [1067] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(203), 4, + ACTIONS(167), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1087] = 2, + [1077] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(167), 4, + ACTIONS(210), 1, + aux_sym_declaration_token1, + ACTIONS(212), 1, + anon_sym_LBRACE, + ACTIONS(214), 1, + anon_sym_PIPE, + STATE(67), 1, + aux_sym__label_codeblock_repeat1, + [1093] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(171), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1097] = 2, - ACTIONS(3), 1, + [1103] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(169), 4, + ACTIONS(173), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1107] = 2, - ACTIONS(3), 1, + [1113] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(177), 4, + ACTIONS(179), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1117] = 2, - ACTIONS(3), 1, + [1123] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(193), 4, + ACTIONS(187), 4, anon_sym_RBRACE, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1127] = 2, + [1133] = 1, + ACTIONS(201), 5, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym__, + sym__ident_base, + sym_comment, + [1141] = 5, + ACTIONS(33), 1, + sym_comment, + ACTIONS(217), 1, + sym__ident_base, + ACTIONS(219), 1, + anon_sym__, + STATE(27), 1, + sym_identifier, + STATE(37), 1, + sym__ident, + [1157] = 3, + ACTIONS(33), 1, + sym_comment, + STATE(57), 1, + aux_sym__fields, + ACTIONS(79), 3, + sym_connection, + anon_sym_RPAREN, + anon_sym_DOT, + [1169] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(185), 4, - anon_sym_RBRACE, + ACTIONS(19), 1, + anon_sym_LBRACE, + ACTIONS(221), 1, + anon_sym_COLON, + ACTIONS(223), 1, + aux_sym_declaration_token1, + STATE(107), 1, + sym_block, + [1185] = 1, + ACTIONS(203), 5, + ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1137] = 2, - ACTIONS(3), 1, sym_comment, - ACTIONS(183), 4, - anon_sym_RBRACE, + [1193] = 1, + ACTIONS(205), 5, + ts_builtin_sym_end, anon_sym_LPAREN, anon_sym__, sym__ident_base, - [1147] = 4, + sym_comment, + [1201] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(207), 1, - anon_sym_DOT, - STATE(76), 1, - aux_sym__fields, - ACTIONS(99), 2, + ACTIONS(66), 4, sym_connection, anon_sym_RPAREN, - [1161] = 4, + anon_sym_DOT, + aux_sym__ident_token1, + [1211] = 4, + ACTIONS(3), 1, + sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(210), 1, + ACTIONS(225), 1, aux_sym_declaration_token1, - STATE(87), 1, + STATE(98), 1, sym_block, - [1174] = 4, + [1224] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(133), 1, - anon_sym_RPAREN, - ACTIONS(212), 1, - sym_connection, - STATE(78), 1, - aux_sym__expr_repeat1, - [1187] = 4, ACTIONS(19), 1, anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(215), 1, + ACTIONS(227), 1, aux_sym_declaration_token1, - STATE(104), 1, + STATE(101), 1, sym_block, - [1200] = 4, + [1237] = 4, + ACTIONS(33), 1, + sym_comment, + ACTIONS(114), 1, + anon_sym_RPAREN, + ACTIONS(229), 1, + sym_connection, + STATE(85), 1, + aux_sym__expr_repeat1, + [1250] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(127), 1, + ACTIONS(212), 1, + aux_sym__label_codeblock_token1, + ACTIONS(231), 1, + anon_sym_PIPE, + STATE(82), 1, + aux_sym__label_codeblock_repeat1, + [1263] = 4, + ACTIONS(33), 1, + sym_comment, + ACTIONS(120), 1, anon_sym_RPAREN, - ACTIONS(217), 1, + ACTIONS(229), 1, sym_connection, - STATE(78), 1, + STATE(81), 1, aux_sym__expr_repeat1, - [1213] = 4, + [1276] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(140), 1, + ACTIONS(234), 1, + anon_sym_PIPE, + ACTIONS(236), 1, + aux_sym__label_codeblock_token1, + STATE(82), 1, + aux_sym__label_codeblock_repeat1, + [1289] = 4, + ACTIONS(33), 1, + sym_comment, + ACTIONS(124), 1, anon_sym_RPAREN, - ACTIONS(217), 1, + ACTIONS(238), 1, sym_connection, - STATE(80), 1, + STATE(85), 1, aux_sym__expr_repeat1, - [1226] = 4, + [1302] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(131), 3, + sym_connection, + anon_sym_RPAREN, + anon_sym_DOT, + [1311] = 4, + ACTIONS(3), 1, + sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(219), 1, + ACTIONS(241), 1, aux_sym_declaration_token1, - STATE(103), 1, + STATE(108), 1, sym_block, - [1239] = 2, + [1324] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(144), 3, - sym_connection, - anon_sym_DOT, - anon_sym_RPAREN, - [1248] = 4, ACTIONS(19), 1, anon_sym_LBRACE, - ACTIONS(23), 1, - sym_comment, - ACTIONS(221), 1, + ACTIONS(243), 1, aux_sym_declaration_token1, - STATE(88), 1, + STATE(109), 1, sym_block, - [1261] = 2, + [1337] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(181), 2, + ACTIONS(96), 1, + aux_sym_declaration_token1, + ACTIONS(98), 1, + anon_sym_LBRACE, + [1347] = 3, + ACTIONS(33), 1, + sym_comment, + ACTIONS(245), 1, + anon_sym_PIPE, + STATE(49), 1, + aux_sym__label_codeblock_repeat1, + [1357] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(161), 2, sym_connection, anon_sym_RPAREN, - [1269] = 3, - ACTIONS(23), 1, + [1365] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(66), 1, - aux_sym_declaration_token1, - ACTIONS(68), 1, - anon_sym_LBRACE, - [1279] = 2, - ACTIONS(23), 1, + ACTIONS(247), 1, + sym_connection_identifier, + [1372] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(223), 1, + ACTIONS(249), 1, aux_sym_declaration_token1, - [1286] = 2, - ACTIONS(23), 1, + [1379] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(225), 1, - aux_sym_declaration_token1, - [1293] = 2, - ACTIONS(23), 1, + ACTIONS(251), 1, + ts_builtin_sym_end, + [1386] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(227), 1, + ACTIONS(253), 1, aux_sym_declaration_token1, - [1300] = 2, + [1393] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(229), 1, + ACTIONS(255), 1, + aux_sym_declaration_token1, + [1400] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(257), 1, sym__ident_base, - [1307] = 2, + [1407] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(231), 1, - sym_connection_identifier, - [1314] = 2, - ACTIONS(23), 1, - sym_comment, - ACTIONS(233), 1, + ACTIONS(259), 1, aux_sym_declaration_token1, - [1321] = 2, - ACTIONS(23), 1, + [1414] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(235), 1, + ACTIONS(261), 1, aux_sym_declaration_token1, - [1328] = 2, + [1421] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(237), 1, - sym__ident_base, - [1335] = 2, + ACTIONS(263), 1, + aux_sym_declaration_token1, + [1428] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(239), 1, - anon_sym_RPAREN, - [1342] = 2, - ACTIONS(23), 1, - sym_comment, - ACTIONS(241), 1, + ACTIONS(265), 1, aux_sym_declaration_token1, - [1349] = 2, - ACTIONS(23), 1, + [1435] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(243), 1, - aux_sym_declaration_token1, - [1356] = 2, - ACTIONS(23), 1, + ACTIONS(267), 1, + sym__ident_base, + [1442] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(269), 1, aux_sym_declaration_token1, - [1363] = 2, - ACTIONS(23), 1, + [1449] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(247), 1, + ACTIONS(271), 1, aux_sym_declaration_token1, - [1370] = 2, - ACTIONS(23), 1, + [1456] = 2, + ACTIONS(33), 1, sym_comment, - ACTIONS(249), 1, - aux_sym_declaration_token1, - [1377] = 2, - ACTIONS(23), 1, + ACTIONS(273), 1, + anon_sym_RPAREN, + [1463] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(251), 1, + ACTIONS(275), 1, aux_sym_declaration_token1, - [1384] = 2, + [1470] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(253), 1, - ts_builtin_sym_end, - [1391] = 2, - ACTIONS(23), 1, - sym_comment, - ACTIONS(255), 1, + ACTIONS(277), 1, aux_sym_declaration_token1, - [1398] = 2, - ACTIONS(23), 1, + [1477] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(257), 1, + ACTIONS(279), 1, aux_sym_declaration_token1, - [1405] = 2, - ACTIONS(23), 1, + [1484] = 2, + ACTIONS(3), 1, sym_comment, - ACTIONS(259), 1, + ACTIONS(281), 1, aux_sym_declaration_token1, - [1412] = 2, + [1491] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(261), 1, + ACTIONS(283), 1, + aux_sym_declaration_token1, + [1498] = 2, + ACTIONS(33), 1, + sym_comment, + ACTIONS(285), 1, sym__ident_base, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 30, - [SMALL_STATE(4)] = 60, - [SMALL_STATE(5)] = 90, - [SMALL_STATE(6)] = 120, - [SMALL_STATE(7)] = 152, - [SMALL_STATE(8)] = 184, - [SMALL_STATE(9)] = 216, - [SMALL_STATE(10)] = 248, - [SMALL_STATE(11)] = 280, - [SMALL_STATE(12)] = 301, - [SMALL_STATE(13)] = 322, - [SMALL_STATE(14)] = 339, - [SMALL_STATE(15)] = 356, - [SMALL_STATE(16)] = 373, - [SMALL_STATE(17)] = 385, - [SMALL_STATE(18)] = 401, - [SMALL_STATE(19)] = 417, - [SMALL_STATE(20)] = 433, - [SMALL_STATE(21)] = 449, - [SMALL_STATE(22)] = 467, - [SMALL_STATE(23)] = 485, - [SMALL_STATE(24)] = 503, - [SMALL_STATE(25)] = 520, - [SMALL_STATE(26)] = 539, - [SMALL_STATE(27)] = 554, - [SMALL_STATE(28)] = 571, - [SMALL_STATE(29)] = 586, - [SMALL_STATE(30)] = 603, - [SMALL_STATE(31)] = 620, - [SMALL_STATE(32)] = 637, - [SMALL_STATE(33)] = 654, - [SMALL_STATE(34)] = 667, - [SMALL_STATE(35)] = 682, - [SMALL_STATE(36)] = 697, - [SMALL_STATE(37)] = 714, - [SMALL_STATE(38)] = 725, - [SMALL_STATE(39)] = 733, - [SMALL_STATE(40)] = 745, - [SMALL_STATE(41)] = 761, - [SMALL_STATE(42)] = 777, - [SMALL_STATE(43)] = 793, - [SMALL_STATE(44)] = 801, - [SMALL_STATE(45)] = 809, - [SMALL_STATE(46)] = 825, - [SMALL_STATE(47)] = 833, - [SMALL_STATE(48)] = 841, - [SMALL_STATE(49)] = 853, - [SMALL_STATE(50)] = 861, - [SMALL_STATE(51)] = 869, - [SMALL_STATE(52)] = 877, - [SMALL_STATE(53)] = 893, - [SMALL_STATE(54)] = 901, - [SMALL_STATE(55)] = 917, - [SMALL_STATE(56)] = 925, - [SMALL_STATE(57)] = 933, - [SMALL_STATE(58)] = 949, - [SMALL_STATE(59)] = 959, - [SMALL_STATE(60)] = 973, - [SMALL_STATE(61)] = 981, - [SMALL_STATE(62)] = 991, - [SMALL_STATE(63)] = 1001, - [SMALL_STATE(64)] = 1017, - [SMALL_STATE(65)] = 1027, - [SMALL_STATE(66)] = 1043, - [SMALL_STATE(67)] = 1057, - [SMALL_STATE(68)] = 1067, - [SMALL_STATE(69)] = 1077, - [SMALL_STATE(70)] = 1087, - [SMALL_STATE(71)] = 1097, - [SMALL_STATE(72)] = 1107, - [SMALL_STATE(73)] = 1117, - [SMALL_STATE(74)] = 1127, - [SMALL_STATE(75)] = 1137, - [SMALL_STATE(76)] = 1147, - [SMALL_STATE(77)] = 1161, - [SMALL_STATE(78)] = 1174, - [SMALL_STATE(79)] = 1187, - [SMALL_STATE(80)] = 1200, - [SMALL_STATE(81)] = 1213, - [SMALL_STATE(82)] = 1226, - [SMALL_STATE(83)] = 1239, - [SMALL_STATE(84)] = 1248, - [SMALL_STATE(85)] = 1261, - [SMALL_STATE(86)] = 1269, - [SMALL_STATE(87)] = 1279, - [SMALL_STATE(88)] = 1286, - [SMALL_STATE(89)] = 1293, - [SMALL_STATE(90)] = 1300, - [SMALL_STATE(91)] = 1307, - [SMALL_STATE(92)] = 1314, - [SMALL_STATE(93)] = 1321, - [SMALL_STATE(94)] = 1328, - [SMALL_STATE(95)] = 1335, - [SMALL_STATE(96)] = 1342, - [SMALL_STATE(97)] = 1349, - [SMALL_STATE(98)] = 1356, - [SMALL_STATE(99)] = 1363, - [SMALL_STATE(100)] = 1370, - [SMALL_STATE(101)] = 1377, - [SMALL_STATE(102)] = 1384, - [SMALL_STATE(103)] = 1391, - [SMALL_STATE(104)] = 1398, - [SMALL_STATE(105)] = 1405, - [SMALL_STATE(106)] = 1412, + [SMALL_STATE(3)] = 36, + [SMALL_STATE(4)] = 72, + [SMALL_STATE(5)] = 108, + [SMALL_STATE(6)] = 144, + [SMALL_STATE(7)] = 176, + [SMALL_STATE(8)] = 208, + [SMALL_STATE(9)] = 240, + [SMALL_STATE(10)] = 272, + [SMALL_STATE(11)] = 304, + [SMALL_STATE(12)] = 321, + [SMALL_STATE(13)] = 338, + [SMALL_STATE(14)] = 355, + [SMALL_STATE(15)] = 373, + [SMALL_STATE(16)] = 391, + [SMALL_STATE(17)] = 409, + [SMALL_STATE(18)] = 421, + [SMALL_STATE(19)] = 439, + [SMALL_STATE(20)] = 457, + [SMALL_STATE(21)] = 473, + [SMALL_STATE(22)] = 489, + [SMALL_STATE(23)] = 505, + [SMALL_STATE(24)] = 521, + [SMALL_STATE(25)] = 538, + [SMALL_STATE(26)] = 555, + [SMALL_STATE(27)] = 572, + [SMALL_STATE(28)] = 585, + [SMALL_STATE(29)] = 604, + [SMALL_STATE(30)] = 621, + [SMALL_STATE(31)] = 636, + [SMALL_STATE(32)] = 651, + [SMALL_STATE(33)] = 666, + [SMALL_STATE(34)] = 677, + [SMALL_STATE(35)] = 694, + [SMALL_STATE(36)] = 711, + [SMALL_STATE(37)] = 728, + [SMALL_STATE(38)] = 743, + [SMALL_STATE(39)] = 759, + [SMALL_STATE(40)] = 771, + [SMALL_STATE(41)] = 779, + [SMALL_STATE(42)] = 795, + [SMALL_STATE(43)] = 803, + [SMALL_STATE(44)] = 811, + [SMALL_STATE(45)] = 827, + [SMALL_STATE(46)] = 835, + [SMALL_STATE(47)] = 843, + [SMALL_STATE(48)] = 859, + [SMALL_STATE(49)] = 867, + [SMALL_STATE(50)] = 883, + [SMALL_STATE(51)] = 891, + [SMALL_STATE(52)] = 905, + [SMALL_STATE(53)] = 913, + [SMALL_STATE(54)] = 923, + [SMALL_STATE(55)] = 933, + [SMALL_STATE(56)] = 949, + [SMALL_STATE(57)] = 965, + [SMALL_STATE(58)] = 979, + [SMALL_STATE(59)] = 987, + [SMALL_STATE(60)] = 1003, + [SMALL_STATE(61)] = 1013, + [SMALL_STATE(62)] = 1023, + [SMALL_STATE(63)] = 1033, + [SMALL_STATE(64)] = 1043, + [SMALL_STATE(65)] = 1057, + [SMALL_STATE(66)] = 1067, + [SMALL_STATE(67)] = 1077, + [SMALL_STATE(68)] = 1093, + [SMALL_STATE(69)] = 1103, + [SMALL_STATE(70)] = 1113, + [SMALL_STATE(71)] = 1123, + [SMALL_STATE(72)] = 1133, + [SMALL_STATE(73)] = 1141, + [SMALL_STATE(74)] = 1157, + [SMALL_STATE(75)] = 1169, + [SMALL_STATE(76)] = 1185, + [SMALL_STATE(77)] = 1193, + [SMALL_STATE(78)] = 1201, + [SMALL_STATE(79)] = 1211, + [SMALL_STATE(80)] = 1224, + [SMALL_STATE(81)] = 1237, + [SMALL_STATE(82)] = 1250, + [SMALL_STATE(83)] = 1263, + [SMALL_STATE(84)] = 1276, + [SMALL_STATE(85)] = 1289, + [SMALL_STATE(86)] = 1302, + [SMALL_STATE(87)] = 1311, + [SMALL_STATE(88)] = 1324, + [SMALL_STATE(89)] = 1337, + [SMALL_STATE(90)] = 1347, + [SMALL_STATE(91)] = 1357, + [SMALL_STATE(92)] = 1365, + [SMALL_STATE(93)] = 1372, + [SMALL_STATE(94)] = 1379, + [SMALL_STATE(95)] = 1386, + [SMALL_STATE(96)] = 1393, + [SMALL_STATE(97)] = 1400, + [SMALL_STATE(98)] = 1407, + [SMALL_STATE(99)] = 1414, + [SMALL_STATE(100)] = 1421, + [SMALL_STATE(101)] = 1428, + [SMALL_STATE(102)] = 1435, + [SMALL_STATE(103)] = 1442, + [SMALL_STATE(104)] = 1449, + [SMALL_STATE(105)] = 1456, + [SMALL_STATE(106)] = 1463, + [SMALL_STATE(107)] = 1470, + [SMALL_STATE(108)] = 1477, + [SMALL_STATE(109)] = 1484, + [SMALL_STATE(110)] = 1491, + [SMALL_STATE(111)] = 1498, }; 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_EXTRA(), + [3] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [33] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(14), - [36] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), - [38] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(25), - [41] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(22), - [44] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [48] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [50] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(14), - [53] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(25), - [56] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(22), - [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(9), - [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), - [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 1, 0, 0), - [68] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label, 1, 0, 0), - [70] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), SHIFT_REPEAT(12), - [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), - [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), - [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), - [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(90), - [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 1, 0, 0), - [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), - [86] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 2, 0, 0), - [88] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(106), - [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(106), - [93] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), - [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), - [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), - [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), - [101] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(57), - [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), - [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 2, 0, 4), - [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 2, 0, 4), - [110] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(52), - [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), - [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [121] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 5, 0, 16), - [123] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 5, 0, 16), - [125] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 2, 0, 3), - [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 2, 0, 3), - [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [131] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), - [135] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), SHIFT_REPEAT(54), - [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1, 0, 1), - [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1, 0, 1), - [142] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 9), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 9), - [146] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(94), - [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 4, 0, 11), - [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 4, 0, 11), - [153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 15), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(89), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [37] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(13), + [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(28), + [43] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(14), + [46] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(7), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [51] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(13), + [54] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), + [56] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(28), + [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(14), + [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [66] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), + [68] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(97), + [71] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 2, 0, 0), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), + [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 1, 0, 0), + [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), + [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [83] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 2, 0, 4), + [85] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 2, 0, 4), + [87] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), + [91] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(44), + [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 1, 0, 0), + [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label, 1, 0, 0), + [100] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), SHIFT_REPEAT(19), + [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), + [105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), + [109] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(111), + [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 2, 0, 3), + [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 2, 0, 3), + [116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1, 0, 1), + [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1, 0, 1), + [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), + [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), + [126] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), SHIFT_REPEAT(41), + [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 9), + [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 9), + [133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [137] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 4, 0, 11), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 4, 0, 11), + [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [143] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(102), + [146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(102), + [148] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 5, 0, 16), + [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 5, 0, 16), + [152] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(73), [155] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [159] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), - [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [163] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), - [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 5), - [169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 0), - [171] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 2), - [177] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 6), - [179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 7), - [181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 7), - [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 12), - [185] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 13), - [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 0), - [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 14), - [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 17), - [197] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 18), - [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 2), - [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [207] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(65), - [210] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [212] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), SHIFT_REPEAT(63), - [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 7), + [161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 7), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 0), + [165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 12), + [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 13), + [169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 14), + [173] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 15), + [175] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), + [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 17), + [181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__label_codeblock, 3, 0, 0), + [183] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__label_codeblock, 3, 0, 0), + [185] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 18), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 2), + [193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 6), + [197] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 2), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 5), + [205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 0), + [207] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(56), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__label_codeblock_repeat1, 2, 0, 0), + [212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__label_codeblock_repeat1, 2, 0, 0), + [214] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__label_codeblock_repeat1, 2, 0, 0), SHIFT_REPEAT(67), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [221] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), + [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), [227] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2, 0, 0), - [237] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, 0, 0), - [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), - [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [253] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [231] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__label_codeblock_repeat1, 2, 0, 0), SHIFT_REPEAT(82), + [234] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [236] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [238] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 8), SHIFT_REPEAT(55), + [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [251] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, 0, 0), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2, 0, 0), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), }; #ifdef __cplusplus diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h index 1f4466d..1abdd12 100644 --- a/src/tree_sitter/alloc.h +++ b/src/tree_sitter/alloc.h @@ -12,10 +12,10 @@ extern "C" { // Allow clients to override allocation functions #ifdef TREE_SITTER_REUSE_ALLOCATOR -extern void *(*ts_current_malloc)(size_t); -extern void *(*ts_current_calloc)(size_t, size_t); -extern void *(*ts_current_realloc)(void *, size_t); -extern void (*ts_current_free)(void *); +extern void *(*ts_current_malloc)(size_t size); +extern void *(*ts_current_calloc)(size_t count, size_t size); +extern void *(*ts_current_realloc)(void *ptr, size_t size); +extern void (*ts_current_free)(void *ptr); #ifndef ts_malloc #define ts_malloc ts_current_malloc diff --git a/test/corpus/docs/special_objects/icons_and_images.txt b/test/corpus/docs/special_objects/icons_and_images.txt index 69bdae9..80716a2 100644 --- a/test/corpus/docs/special_objects/icons_and_images.txt +++ b/test/corpus/docs/special_objects/icons_and_images.txt @@ -16,6 +16,106 @@ my network: { identifier: (identifier) label: (label))))) +====================||| +Big Example +====================||| + +vpc: VPC 1 10.1.0.0./16 { + icon: https://icons.terrastruct.com/aws%2F_Group%20Icons%2FVirtual-private-cloud-VPC_light-bg.svg + style: { + stroke: green + font-color: green + fill: white + } + az: Availability Zone A { + style: { + stroke: blue + font-color: blue + stroke-dash: 3 + fill: white + } + firewall: Firewall Subnet A { + icon: https://icons.terrastruct.com/aws%2FNetworking%20&%20Content%20Delivery%2FAmazon-Route-53_Hosted-Zone_light-bg.svg + style: { + stroke: purple + font-color: purple + fill: "#e1d5e7" + } + ec2: EC2 Instance { + icon: https://icons.terrastruct.com/aws%2FCompute%2F_Instance%2FAmazon-EC2_C4-Instance_light-bg.svg + } + } + } +} + +---||| + +(source_file + (declaration + identifier: (identifier) + label: (label) + block: (block + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + block: (block + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)))) + (declaration + identifier: (identifier) + label: (label) + block: (block + (declaration + identifier: (identifier) + block: (block + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)))) + (declaration + identifier: (identifier) + label: (label) + block: (block + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + block: (block + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)) + (declaration + identifier: (identifier) + label: (label)))) + (declaration + identifier: (identifier) + label: (label) + block: (block + (declaration + identifier: (identifier) + label: (label))))))))))) + ====================||| Add shape: image for standalone icon shapes ====================||| diff --git a/test/corpus/docs/special_objects/text_and_code.txt b/test/corpus/docs/special_objects/text_and_code.txt new file mode 100644 index 0000000..cd30e77 --- /dev/null +++ b/test/corpus/docs/special_objects/text_and_code.txt @@ -0,0 +1,18 @@ +====================||| +Standalone text is Markdown +====================||| + +explanation: |md + # I can do headers + - lists + - lists + + And other normal markdown stuff +| + +---||| + +(source_file + (declaration + identifier: (identifier) + label: (label))) diff --git a/tree-sitter.json b/tree-sitter.json new file mode 100644 index 0000000..a2d007c --- /dev/null +++ b/tree-sitter.json @@ -0,0 +1,30 @@ +{ + "grammars": [ + { + "name": "d2", + "camelcase": "D2", + "scope": "source.d2", + "path": ".", + "file-types": [ + "d2" + ], + "injection-regex": "d2" + } + ], + "metadata": { + "version": "0.1.0", + "license": "MIT", + "description": "Tree sitter grammar for d2lang", + "links": { + "repository": "https://github.com/ravsii/tree-sitter-d2" + } + }, + "bindings": { + "c": true, + "go": true, + "node": true, + "python": true, + "rust": true, + "swift": true + } +} \ No newline at end of file