diff --git a/grammar.js b/grammar.js index f339638..01d7c36 100644 --- a/grammar.js +++ b/grammar.js @@ -283,6 +283,7 @@ module.exports = grammar({ _function_declaration_common: ($) => seq( field("name", $.identifier), field("parameters", $.parameters), + optional(seq(":", field("return_type", $.identifier))), ), parameters: ($) => seq( diff --git a/src/grammar.json b/src/grammar.json index a5b5671..9de6835 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1277,6 +1277,31 @@ "type": "SYMBOL", "name": "parameters" } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + { + "type": "BLANK" + } + ] } ] }, diff --git a/src/node-types.json b/src/node-types.json index 5bccc6e..d667375 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1012,6 +1012,16 @@ "named": true } ] + }, + "return_type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] } } }, @@ -1452,6 +1462,16 @@ "named": true } ] + }, + "return_type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] } } }, diff --git a/src/parser.c b/src/parser.c index 1a38e08..2ec7085 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 146 +#define STATE_COUNT 148 #define LARGE_STATE_COUNT 2 #define SYMBOL_COUNT 86 #define ALIAS_COUNT 0 #define TOKEN_COUNT 48 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 25 +#define FIELD_COUNT 26 #define MAX_ALIAS_SEQUENCE_LENGTH 8 -#define PRODUCTION_ID_COUNT 37 +#define PRODUCTION_ID_COUNT 38 enum { sym_identifier = 1, @@ -650,11 +650,12 @@ enum { field_operator = 18, field_parameters = 19, field_record = 20, - field_right = 21, - field_size = 22, - field_start = 23, - field_type = 24, - field_value = 25, + field_return_type = 21, + field_right = 22, + field_size = 23, + field_start = 24, + field_type = 25, + field_value = 26, }; static const char * const ts_field_names[] = { @@ -679,6 +680,7 @@ static const char * const ts_field_names[] = { [field_operator] = "operator", [field_parameters] = "parameters", [field_record] = "record", + [field_return_type] = "return_type", [field_right] = "right", [field_size] = "size", [field_start] = "start", @@ -688,41 +690,42 @@ static const char * const ts_field_names[] = { static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 2}, - [2] = {.index = 2, .length = 2}, - [3] = {.index = 4, .length = 1}, - [4] = {.index = 5, .length = 1}, - [5] = {.index = 6, .length = 1}, - [6] = {.index = 7, .length = 2}, - [7] = {.index = 9, .length = 3}, - [8] = {.index = 12, .length = 2}, - [9] = {.index = 14, .length = 2}, - [10] = {.index = 16, .length = 2}, - [11] = {.index = 18, .length = 2}, - [12] = {.index = 20, .length = 2}, - [13] = {.index = 22, .length = 1}, - [14] = {.index = 23, .length = 1}, - [15] = {.index = 24, .length = 2}, - [16] = {.index = 26, .length = 3}, - [17] = {.index = 29, .length = 2}, - [18] = {.index = 31, .length = 3}, - [19] = {.index = 34, .length = 2}, - [20] = {.index = 36, .length = 2}, - [21] = {.index = 38, .length = 3}, - [22] = {.index = 41, .length = 3}, - [23] = {.index = 44, .length = 3}, - [24] = {.index = 47, .length = 3}, - [25] = {.index = 50, .length = 3}, - [26] = {.index = 53, .length = 2}, - [27] = {.index = 55, .length = 1}, - [28] = {.index = 56, .length = 2}, - [29] = {.index = 58, .length = 6}, - [30] = {.index = 64, .length = 4}, - [31] = {.index = 68, .length = 3}, - [32] = {.index = 71, .length = 5}, - [33] = {.index = 76, .length = 4}, - [34] = {.index = 80, .length = 4}, - [35] = {.index = 84, .length = 4}, - [36] = {.index = 88, .length = 2}, + [2] = {.index = 2, .length = 3}, + [3] = {.index = 5, .length = 1}, + [4] = {.index = 6, .length = 1}, + [5] = {.index = 7, .length = 1}, + [6] = {.index = 8, .length = 2}, + [7] = {.index = 10, .length = 3}, + [8] = {.index = 13, .length = 2}, + [9] = {.index = 15, .length = 2}, + [10] = {.index = 17, .length = 2}, + [11] = {.index = 19, .length = 2}, + [12] = {.index = 21, .length = 2}, + [13] = {.index = 23, .length = 1}, + [14] = {.index = 24, .length = 1}, + [15] = {.index = 25, .length = 2}, + [16] = {.index = 27, .length = 4}, + [17] = {.index = 31, .length = 2}, + [18] = {.index = 33, .length = 3}, + [19] = {.index = 36, .length = 2}, + [20] = {.index = 38, .length = 2}, + [21] = {.index = 40, .length = 3}, + [22] = {.index = 43, .length = 3}, + [23] = {.index = 46, .length = 3}, + [24] = {.index = 49, .length = 3}, + [25] = {.index = 52, .length = 3}, + [26] = {.index = 55, .length = 3}, + [27] = {.index = 58, .length = 2}, + [28] = {.index = 60, .length = 1}, + [29] = {.index = 61, .length = 2}, + [30] = {.index = 63, .length = 6}, + [31] = {.index = 69, .length = 4}, + [32] = {.index = 73, .length = 3}, + [33] = {.index = 76, .length = 5}, + [34] = {.index = 81, .length = 4}, + [35] = {.index = 85, .length = 4}, + [36] = {.index = 89, .length = 4}, + [37] = {.index = 93, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -732,124 +735,130 @@ static const TSFieldMapEntry ts_field_map_entries[] = { [2] = {field_name, 1, .inherited = true}, {field_parameters, 1, .inherited = true}, - [4] = - {field_file, 1}, + {field_return_type, 1, .inherited = true}, [5] = - {field_function, 0}, + {field_file, 1}, [6] = - {field_type, 0}, + {field_function, 0}, [7] = + {field_type, 0}, + [8] = {field_name, 0}, {field_parameters, 1}, - [9] = + [10] = {field_left, 0}, {field_operator, 1}, {field_right, 2}, - [12] = + [13] = {field_field, 2}, {field_record, 0}, - [14] = + [15] = {field_left, 0}, {field_right, 2}, - [16] = + [17] = {field_arguments, 2}, {field_function, 0}, - [18] = + [19] = {field_condition, 1}, {field_consequence, 3}, - [20] = + [21] = {field_body, 3}, {field_condition, 1}, - [22] = - {field_body, 2}, [23] = - {field_declarations, 1}, + {field_body, 2}, [24] = + {field_declarations, 1}, + [25] = {field_name, 1}, {field_value, 3}, - [26] = + [27] = {field_body, 3}, {field_name, 1, .inherited = true}, {field_parameters, 1, .inherited = true}, - [29] = + {field_return_type, 1, .inherited = true}, + [31] = {field_array, 0}, {field_index, 2}, - [31] = + [33] = {field_arguments, 2}, {field_arguments, 3}, {field_function, 0}, - [34] = + [36] = {field_body, 2}, {field_body, 3}, - [36] = + [38] = {field_body, 3}, {field_declarations, 1}, - [38] = + [40] = {field_name, 1, .inherited = true}, {field_parameters, 1}, {field_type, 1, .inherited = true}, - [41] = + [43] = + {field_name, 0}, + {field_parameters, 1}, + {field_return_type, 3}, + [46] = {field_init, 5}, {field_size, 2}, {field_type, 0}, - [44] = + [49] = {field_field, 2}, {field_init, 4}, {field_type, 0}, - [47] = + [52] = {field_alternative, 5}, {field_condition, 1}, {field_consequence, 3}, - [50] = + [55] = {field_body, 3}, {field_body, 4}, {field_declarations, 1}, - [53] = + [58] = {field_name, 1, .inherited = true}, {field_type, 1, .inherited = true}, - [55] = + [60] = {field_element_type, 2}, - [56] = + [61] = {field_name, 0}, {field_type, 2}, - [58] = + [63] = {field_name, 1, .inherited = true}, {field_name, 2, .inherited = true}, {field_parameters, 1}, {field_parameters, 2}, {field_type, 1, .inherited = true}, {field_type, 2, .inherited = true}, - [64] = + [69] = {field_name, 0, .inherited = true}, {field_name, 1, .inherited = true}, {field_type, 0, .inherited = true}, {field_type, 1, .inherited = true}, - [68] = + [73] = {field_name, 1}, {field_type, 3}, {field_value, 5}, - [71] = + [76] = {field_field, 2}, {field_field, 5, .inherited = true}, {field_init, 4}, {field_init, 5, .inherited = true}, {field_type, 0}, - [76] = + [81] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, - [80] = + [85] = {field_name, 1, .inherited = true}, {field_name, 2, .inherited = true}, {field_type, 1, .inherited = true}, {field_type, 2, .inherited = true}, - [84] = + [89] = {field_body, 7}, {field_end, 5}, {field_index, 1}, {field_start, 3}, - [88] = + [93] = {field_field, 1}, {field_init, 3}, }; @@ -870,56 +879,53 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(10); - if (lookahead == '"') ADVANCE(12); - if (lookahead == '&') ADVANCE(33); - if (lookahead == '(') ADVANCE(20); - if (lookahead == ')') ADVANCE(22); - if (lookahead == '*') ADVANCE(24); - if (lookahead == '+') ADVANCE(26); - if (lookahead == ',') ADVANCE(21); - if (lookahead == '-') ADVANCE(23); - if (lookahead == '.') ADVANCE(17); - if (lookahead == '/') ADVANCE(25); - if (lookahead == ':') ADVANCE(39); - if (lookahead == ';') ADVANCE(35); - if (lookahead == '<') ADVANCE(31); - if (lookahead == '=') ADVANCE(29); - if (lookahead == '>') ADVANCE(32); - if (lookahead == '[') ADVANCE(18); - if (lookahead == '\\') ADVANCE(5); - if (lookahead == ']') ADVANCE(19); - if (lookahead == '{') ADVANCE(36); - if (lookahead == '|') ADVANCE(34); - if (lookahead == '}') ADVANCE(37); + if (eof) ADVANCE(9); + if (lookahead == '"') ADVANCE(11); + if (lookahead == '&') ADVANCE(32); + if (lookahead == '(') ADVANCE(19); + if (lookahead == ')') ADVANCE(21); + if (lookahead == '*') ADVANCE(23); + if (lookahead == '+') ADVANCE(25); + if (lookahead == ',') ADVANCE(20); + if (lookahead == '-') ADVANCE(22); + if (lookahead == '.') ADVANCE(16); + if (lookahead == '/') ADVANCE(24); + if (lookahead == ':') ADVANCE(38); + if (lookahead == ';') ADVANCE(34); + if (lookahead == '<') ADVANCE(30); + if (lookahead == '=') ADVANCE(28); + if (lookahead == '>') ADVANCE(31); + if (lookahead == '[') ADVANCE(17); + if (lookahead == '\\') ADVANCE(4); + if (lookahead == ']') ADVANCE(18); + if (lookahead == '{') ADVANCE(35); + if (lookahead == '|') ADVANCE(33); + if (lookahead == '}') ADVANCE(36); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') SKIP(8) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(11); + lookahead == ' ') SKIP(7) + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(10); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(15); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(14); END_STATE(); case 1: - if (lookahead == '"') ADVANCE(12); - if (lookahead == '\\') ADVANCE(5); + if (lookahead == '"') ADVANCE(11); + if (lookahead == '\\') ADVANCE(4); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') ADVANCE(13); - if (lookahead != 0) ADVANCE(14); + lookahead == ' ') ADVANCE(12); + if (lookahead != 0) ADVANCE(13); END_STATE(); case 2: - if (lookahead == '=') ADVANCE(38); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(15); END_STATE(); case 3: - if (('0' <= lookahead && lookahead <= '7')) ADVANCE(16); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(2); END_STATE(); case 4: - if (('0' <= lookahead && lookahead <= '7')) ADVANCE(3); - END_STATE(); - case 5: if (lookahead == '"' || lookahead == '\\' || lookahead == 'a' || @@ -928,192 +934,192 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == 'n' || lookahead == 'r' || lookahead == 't' || - lookahead == 'v') ADVANCE(16); - if (lookahead == 'x') ADVANCE(7); - if (('0' <= lookahead && lookahead <= '3')) ADVANCE(4); + lookahead == 'v') ADVANCE(15); + if (lookahead == 'x') ADVANCE(6); + if (('0' <= lookahead && lookahead <= '3')) ADVANCE(3); + END_STATE(); + case 5: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(15); END_STATE(); case 6: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(16); + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(5); END_STATE(); case 7: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(6); + if (eof) ADVANCE(9); + if (lookahead == '"') ADVANCE(11); + if (lookahead == '&') ADVANCE(32); + if (lookahead == '(') ADVANCE(19); + if (lookahead == ')') ADVANCE(21); + if (lookahead == '*') ADVANCE(23); + if (lookahead == '+') ADVANCE(25); + if (lookahead == ',') ADVANCE(20); + if (lookahead == '-') ADVANCE(22); + if (lookahead == '.') ADVANCE(16); + if (lookahead == '/') ADVANCE(24); + if (lookahead == ':') ADVANCE(38); + if (lookahead == ';') ADVANCE(34); + if (lookahead == '<') ADVANCE(30); + if (lookahead == '=') ADVANCE(28); + if (lookahead == '>') ADVANCE(31); + if (lookahead == '[') ADVANCE(17); + if (lookahead == ']') ADVANCE(18); + if (lookahead == '{') ADVANCE(35); + if (lookahead == '|') ADVANCE(33); + if (lookahead == '}') ADVANCE(36); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(7) + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(10); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(14); END_STATE(); case 8: - if (eof) ADVANCE(10); - if (lookahead == '"') ADVANCE(12); - if (lookahead == '&') ADVANCE(33); - if (lookahead == '(') ADVANCE(20); - if (lookahead == ')') ADVANCE(22); - if (lookahead == '*') ADVANCE(24); - if (lookahead == '+') ADVANCE(26); - if (lookahead == ',') ADVANCE(21); - if (lookahead == '-') ADVANCE(23); - if (lookahead == '.') ADVANCE(17); - if (lookahead == '/') ADVANCE(25); - if (lookahead == ':') ADVANCE(39); - if (lookahead == ';') ADVANCE(35); - if (lookahead == '<') ADVANCE(31); - if (lookahead == '=') ADVANCE(29); - if (lookahead == '>') ADVANCE(32); - if (lookahead == '[') ADVANCE(18); - if (lookahead == ']') ADVANCE(19); - if (lookahead == '{') ADVANCE(36); - if (lookahead == '|') ADVANCE(34); - if (lookahead == '}') ADVANCE(37); + if (eof) ADVANCE(9); + if (lookahead == '&') ADVANCE(32); + if (lookahead == '(') ADVANCE(19); + if (lookahead == ')') ADVANCE(21); + if (lookahead == '*') ADVANCE(23); + if (lookahead == '+') ADVANCE(25); + if (lookahead == ',') ADVANCE(20); + if (lookahead == '-') ADVANCE(22); + if (lookahead == '.') ADVANCE(16); + if (lookahead == '/') ADVANCE(24); + if (lookahead == ':') ADVANCE(38); + if (lookahead == ';') ADVANCE(34); + if (lookahead == '<') ADVANCE(30); + if (lookahead == '=') ADVANCE(28); + if (lookahead == '>') ADVANCE(31); + if (lookahead == '[') ADVANCE(17); + if (lookahead == ']') ADVANCE(18); + if (lookahead == '{') ADVANCE(35); + if (lookahead == '|') ADVANCE(33); + if (lookahead == '}') ADVANCE(36); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(8) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(11); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(15); - END_STATE(); - case 9: - if (eof) ADVANCE(10); - if (lookahead == '&') ADVANCE(33); - if (lookahead == '(') ADVANCE(20); - if (lookahead == ')') ADVANCE(22); - if (lookahead == '*') ADVANCE(24); - if (lookahead == '+') ADVANCE(26); - if (lookahead == ',') ADVANCE(21); - if (lookahead == '-') ADVANCE(23); - if (lookahead == '.') ADVANCE(17); - if (lookahead == '/') ADVANCE(25); - if (lookahead == ':') ADVANCE(2); - if (lookahead == ';') ADVANCE(35); - if (lookahead == '<') ADVANCE(31); - if (lookahead == '=') ADVANCE(29); - if (lookahead == '>') ADVANCE(32); - if (lookahead == '[') ADVANCE(18); - if (lookahead == ']') ADVANCE(19); - if (lookahead == '{') ADVANCE(36); - if (lookahead == '|') ADVANCE(34); - if (lookahead == '}') ADVANCE(37); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(9) if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(15); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(14); END_STATE(); - case 10: + case 9: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); - case 11: + case 10: ACCEPT_TOKEN(sym_integer_literal); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(11); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(10); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(15); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(14); END_STATE(); - case 12: + case 11: ACCEPT_TOKEN(anon_sym_DQUOTE); END_STATE(); - case 13: + case 12: ACCEPT_TOKEN(aux_sym_string_literal_token1); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') ADVANCE(13); + lookahead == ' ') ADVANCE(12); if (lookahead != 0 && lookahead != '"' && - lookahead != '\\') ADVANCE(14); + lookahead != '\\') ADVANCE(13); END_STATE(); - case 14: + case 13: ACCEPT_TOKEN(aux_sym_string_literal_token1); if (lookahead != 0 && lookahead != '"' && - lookahead != '\\') ADVANCE(14); + lookahead != '\\') ADVANCE(13); END_STATE(); - case 15: + case 14: ACCEPT_TOKEN(sym_identifier); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(15); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(14); END_STATE(); - case 16: + case 15: ACCEPT_TOKEN(sym_escape_sequence); END_STATE(); - case 17: + case 16: ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); - case 18: + case 17: ACCEPT_TOKEN(anon_sym_LBRACK); END_STATE(); - case 19: + case 18: ACCEPT_TOKEN(anon_sym_RBRACK); END_STATE(); - case 20: + case 19: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); - case 21: + case 20: ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); - case 22: + case 21: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); - case 23: + case 22: ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); - case 24: + case 23: ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); - case 25: + case 24: ACCEPT_TOKEN(anon_sym_SLASH); END_STATE(); - case 26: + case 25: ACCEPT_TOKEN(anon_sym_PLUS); END_STATE(); - case 27: + case 26: ACCEPT_TOKEN(anon_sym_GT_EQ); END_STATE(); - case 28: + case 27: ACCEPT_TOKEN(anon_sym_LT_EQ); END_STATE(); - case 29: + case 28: ACCEPT_TOKEN(anon_sym_EQ); END_STATE(); - case 30: + case 29: ACCEPT_TOKEN(anon_sym_LT_GT); END_STATE(); - case 31: + case 30: ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '=') ADVANCE(28); - if (lookahead == '>') ADVANCE(30); + if (lookahead == '=') ADVANCE(27); + if (lookahead == '>') ADVANCE(29); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(26); END_STATE(); case 32: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(27); - END_STATE(); - case 33: ACCEPT_TOKEN(anon_sym_AMP); END_STATE(); - case 34: + case 33: ACCEPT_TOKEN(anon_sym_PIPE); END_STATE(); - case 35: + case 34: ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); - case 36: + case 35: ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); - case 37: + case 36: ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); - case 38: + case 37: ACCEPT_TOKEN(anon_sym_COLON_EQ); END_STATE(); - case 39: + case 38: ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == '=') ADVANCE(38); + if (lookahead == '=') ADVANCE(37); END_STATE(); default: return false; @@ -1364,39 +1370,39 @@ 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}, - [2] = {.lex_state = 9}, - [3] = {.lex_state = 9}, - [4] = {.lex_state = 9}, - [5] = {.lex_state = 9}, - [6] = {.lex_state = 9}, - [7] = {.lex_state = 9}, - [8] = {.lex_state = 9}, - [9] = {.lex_state = 9}, - [10] = {.lex_state = 9}, - [11] = {.lex_state = 9}, - [12] = {.lex_state = 9}, - [13] = {.lex_state = 9}, - [14] = {.lex_state = 9}, - [15] = {.lex_state = 9}, - [16] = {.lex_state = 9}, - [17] = {.lex_state = 9}, - [18] = {.lex_state = 9}, - [19] = {.lex_state = 9}, - [20] = {.lex_state = 9}, - [21] = {.lex_state = 9}, - [22] = {.lex_state = 9}, - [23] = {.lex_state = 9}, - [24] = {.lex_state = 9}, - [25] = {.lex_state = 9}, - [26] = {.lex_state = 9}, - [27] = {.lex_state = 9}, - [28] = {.lex_state = 9}, - [29] = {.lex_state = 9}, - [30] = {.lex_state = 9}, - [31] = {.lex_state = 9}, - [32] = {.lex_state = 9}, - [33] = {.lex_state = 9}, - [34] = {.lex_state = 9}, + [2] = {.lex_state = 8}, + [3] = {.lex_state = 8}, + [4] = {.lex_state = 8}, + [5] = {.lex_state = 8}, + [6] = {.lex_state = 8}, + [7] = {.lex_state = 8}, + [8] = {.lex_state = 8}, + [9] = {.lex_state = 8}, + [10] = {.lex_state = 8}, + [11] = {.lex_state = 8}, + [12] = {.lex_state = 8}, + [13] = {.lex_state = 8}, + [14] = {.lex_state = 8}, + [15] = {.lex_state = 8}, + [16] = {.lex_state = 8}, + [17] = {.lex_state = 8}, + [18] = {.lex_state = 8}, + [19] = {.lex_state = 8}, + [20] = {.lex_state = 8}, + [21] = {.lex_state = 8}, + [22] = {.lex_state = 8}, + [23] = {.lex_state = 8}, + [24] = {.lex_state = 8}, + [25] = {.lex_state = 8}, + [26] = {.lex_state = 8}, + [27] = {.lex_state = 8}, + [28] = {.lex_state = 8}, + [29] = {.lex_state = 8}, + [30] = {.lex_state = 8}, + [31] = {.lex_state = 8}, + [32] = {.lex_state = 8}, + [33] = {.lex_state = 8}, + [34] = {.lex_state = 8}, [35] = {.lex_state = 0}, [36] = {.lex_state = 0}, [37] = {.lex_state = 0}, @@ -1426,88 +1432,90 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [61] = {.lex_state = 0}, [62] = {.lex_state = 0}, [63] = {.lex_state = 0}, - [64] = {.lex_state = 9}, - [65] = {.lex_state = 9}, - [66] = {.lex_state = 9}, - [67] = {.lex_state = 9}, - [68] = {.lex_state = 0}, - [69] = {.lex_state = 9}, - [70] = {.lex_state = 9}, - [71] = {.lex_state = 9}, - [72] = {.lex_state = 0}, - [73] = {.lex_state = 0}, - [74] = {.lex_state = 9}, - [75] = {.lex_state = 9}, - [76] = {.lex_state = 9}, + [64] = {.lex_state = 8}, + [65] = {.lex_state = 8}, + [66] = {.lex_state = 8}, + [67] = {.lex_state = 8}, + [68] = {.lex_state = 8}, + [69] = {.lex_state = 8}, + [70] = {.lex_state = 8}, + [71] = {.lex_state = 0}, + [72] = {.lex_state = 8}, + [73] = {.lex_state = 8}, + [74] = {.lex_state = 8}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 0}, [77] = {.lex_state = 0}, [78] = {.lex_state = 0}, - [79] = {.lex_state = 9}, - [80] = {.lex_state = 9}, - [81] = {.lex_state = 9}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 8}, + [81] = {.lex_state = 8}, [82] = {.lex_state = 0}, - [83] = {.lex_state = 0}, - [84] = {.lex_state = 0}, - [85] = {.lex_state = 9}, - [86] = {.lex_state = 9}, - [87] = {.lex_state = 9}, - [88] = {.lex_state = 9}, - [89] = {.lex_state = 9}, - [90] = {.lex_state = 9}, - [91] = {.lex_state = 9}, - [92] = {.lex_state = 9}, - [93] = {.lex_state = 9}, - [94] = {.lex_state = 9}, - [95] = {.lex_state = 9}, - [96] = {.lex_state = 9}, - [97] = {.lex_state = 9}, - [98] = {.lex_state = 9}, - [99] = {.lex_state = 9}, - [100] = {.lex_state = 9}, - [101] = {.lex_state = 9}, + [83] = {.lex_state = 8}, + [84] = {.lex_state = 8}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 8}, + [87] = {.lex_state = 8}, + [88] = {.lex_state = 8}, + [89] = {.lex_state = 8}, + [90] = {.lex_state = 8}, + [91] = {.lex_state = 8}, + [92] = {.lex_state = 8}, + [93] = {.lex_state = 8}, + [94] = {.lex_state = 8}, + [95] = {.lex_state = 8}, + [96] = {.lex_state = 8}, + [97] = {.lex_state = 8}, + [98] = {.lex_state = 8}, + [99] = {.lex_state = 8}, + [100] = {.lex_state = 8}, + [101] = {.lex_state = 8}, [102] = {.lex_state = 1}, [103] = {.lex_state = 1}, - [104] = {.lex_state = 0}, - [105] = {.lex_state = 1}, - [106] = {.lex_state = 0}, + [104] = {.lex_state = 8}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 1}, [107] = {.lex_state = 0}, - [108] = {.lex_state = 9}, + [108] = {.lex_state = 0}, [109] = {.lex_state = 0}, [110] = {.lex_state = 0}, - [111] = {.lex_state = 0}, + [111] = {.lex_state = 8}, [112] = {.lex_state = 0}, [113] = {.lex_state = 0}, - [114] = {.lex_state = 9}, - [115] = {.lex_state = 0}, + [114] = {.lex_state = 0}, + [115] = {.lex_state = 8}, [116] = {.lex_state = 0}, - [117] = {.lex_state = 9}, + [117] = {.lex_state = 0}, [118] = {.lex_state = 0}, - [119] = {.lex_state = 9}, - [120] = {.lex_state = 0}, - [121] = {.lex_state = 9}, - [122] = {.lex_state = 0}, - [123] = {.lex_state = 9}, - [124] = {.lex_state = 9}, - [125] = {.lex_state = 9}, + [119] = {.lex_state = 0}, + [120] = {.lex_state = 8}, + [121] = {.lex_state = 8}, + [122] = {.lex_state = 8}, + [123] = {.lex_state = 8}, + [124] = {.lex_state = 0}, + [125] = {.lex_state = 0}, [126] = {.lex_state = 0}, - [127] = {.lex_state = 0}, - [128] = {.lex_state = 9}, - [129] = {.lex_state = 9}, - [130] = {.lex_state = 9}, - [131] = {.lex_state = 0}, - [132] = {.lex_state = 9}, + [127] = {.lex_state = 8}, + [128] = {.lex_state = 8}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 8}, + [131] = {.lex_state = 8}, + [132] = {.lex_state = 8}, [133] = {.lex_state = 0}, - [134] = {.lex_state = 0}, - [135] = {.lex_state = 9}, - [136] = {.lex_state = 9}, - [137] = {.lex_state = 9}, + [134] = {.lex_state = 8}, + [135] = {.lex_state = 8}, + [136] = {.lex_state = 8}, + [137] = {.lex_state = 8}, [138] = {.lex_state = 0}, - [139] = {.lex_state = 0}, + [139] = {.lex_state = 8}, [140] = {.lex_state = 0}, - [141] = {.lex_state = 9}, + [141] = {.lex_state = 0}, [142] = {.lex_state = 0}, - [143] = {.lex_state = 0}, - [144] = {.lex_state = 9}, - [145] = {.lex_state = 9}, + [143] = {.lex_state = 8}, + [144] = {.lex_state = 8}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 8}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1561,32 +1569,32 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_import] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(133), - [sym__expr] = STATE(84), - [sym_string_literal] = STATE(84), - [sym__lvalue] = STATE(5), - [sym_record_value] = STATE(5), - [sym_array_value] = STATE(5), - [sym_function_call] = STATE(84), - [sym_unary_expression] = STATE(84), - [sym_binary_expression] = STATE(84), - [sym_sequence_expression] = STATE(84), - [sym_array_expression] = STATE(84), - [sym_record_expression] = STATE(84), - [sym_assignment_expression] = STATE(84), - [sym_if_expression] = STATE(84), - [sym_while_expression] = STATE(84), - [sym_for_expression] = STATE(84), - [sym_let_expression] = STATE(84), - [aux_sym__declaration_chunks] = STATE(74), - [sym__declaration_chunk] = STATE(74), - [sym_type_declaration] = STATE(74), - [sym_function_declaration] = STATE(74), - [sym_primitive_declaration] = STATE(74), - [sym_variable_declaration] = STATE(74), - [sym_import_declaration] = STATE(74), - [aux_sym__declaration_chunk_repeat1] = STATE(74), - [aux_sym__declaration_chunk_repeat2] = STATE(74), + [sym_source_file] = STATE(141), + [sym__expr] = STATE(85), + [sym_string_literal] = STATE(85), + [sym__lvalue] = STATE(4), + [sym_record_value] = STATE(4), + [sym_array_value] = STATE(4), + [sym_function_call] = STATE(85), + [sym_unary_expression] = STATE(85), + [sym_binary_expression] = STATE(85), + [sym_sequence_expression] = STATE(85), + [sym_array_expression] = STATE(85), + [sym_record_expression] = STATE(85), + [sym_assignment_expression] = STATE(85), + [sym_if_expression] = STATE(85), + [sym_while_expression] = STATE(85), + [sym_for_expression] = STATE(85), + [sym_let_expression] = STATE(85), + [aux_sym__declaration_chunks] = STATE(72), + [sym__declaration_chunk] = STATE(72), + [sym_type_declaration] = STATE(72), + [sym_function_declaration] = STATE(72), + [sym_primitive_declaration] = STATE(72), + [sym_variable_declaration] = STATE(72), + [sym_import_declaration] = STATE(72), + [aux_sym__declaration_chunk_repeat1] = STATE(72), + [aux_sym__declaration_chunk_repeat2] = STATE(72), [ts_builtin_sym_end] = ACTIONS(3), [sym_identifier] = ACTIONS(5), [sym_nil_literal] = ACTIONS(7), @@ -1683,52 +1691,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [82] = 2, - ACTIONS(50), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(48), 30, - ts_builtin_sym_end, + [82] = 5, + ACTIONS(50), 1, anon_sym_DOT, + ACTIONS(52), 1, anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON_EQ, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [119] = 5, - ACTIONS(54), 1, - anon_sym_DOT, ACTIONS(56), 1, - anon_sym_LBRACK, - ACTIONS(60), 1, anon_sym_COLON_EQ, - ACTIONS(58), 2, + ACTIONS(54), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(52), 27, + ACTIONS(48), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1756,59 +1729,65 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [162] = 2, + [125] = 2, + ACTIONS(60), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(58), 30, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON_EQ, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [162] = 7, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, ACTIONS(64), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(62), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [196] = 4, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(72), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(66), 23, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, + ACTIONS(62), 17, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, @@ -1822,113 +1801,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [234] = 3, - ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(72), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(66), 25, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [270] = 2, - ACTIONS(72), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(66), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [304] = 7, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, + [206] = 2, ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(74), 17, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [348] = 2, - ACTIONS(86), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(84), 27, + ACTIONS(76), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1956,11 +1833,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [382] = 2, - ACTIONS(90), 2, + [240] = 2, + ACTIONS(82), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(88), 27, + ACTIONS(80), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1988,28 +1865,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [416] = 5, - ACTIONS(68), 2, + [274] = 7, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(66), 19, + ACTIONS(84), 17, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, - anon_sym_AMP, - anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, @@ -2023,11 +1902,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [456] = 2, - ACTIONS(94), 2, + [318] = 2, + ACTIONS(88), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(92), 27, + ACTIONS(86), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2055,30 +1934,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [490] = 7, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, + [352] = 2, + ACTIONS(92), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(96), 17, + ACTIONS(90), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, @@ -2092,7 +1966,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [534] = 2, + [386] = 2, + ACTIONS(96), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(94), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [420] = 2, ACTIONS(100), 2, anon_sym_LT, anon_sym_GT, @@ -2124,26 +2030,122 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [568] = 7, - ACTIONS(80), 1, + [454] = 2, + ACTIONS(104), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(102), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, anon_sym_AMP, - ACTIONS(82), 1, anon_sym_PIPE, - ACTIONS(68), 2, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [488] = 2, + ACTIONS(108), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(106), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [522] = 2, + ACTIONS(112), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(110), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [556] = 7, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(102), 17, + ACTIONS(114), 17, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2161,189 +2163,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [612] = 2, - ACTIONS(106), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(104), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, + [600] = 7, + ACTIONS(72), 1, anon_sym_AMP, + ACTIONS(74), 1, anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [646] = 2, - ACTIONS(110), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(108), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + ACTIONS(64), 2, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [680] = 2, - ACTIONS(114), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(112), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [714] = 2, - ACTIONS(118), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(116), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [748] = 2, - ACTIONS(122), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(120), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [782] = 6, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(66), 18, + ACTIONS(116), 17, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, - anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, @@ -2357,11 +2200,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [824] = 2, - ACTIONS(126), 2, + [644] = 2, + ACTIONS(120), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(124), 27, + ACTIONS(118), 27, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2389,90 +2232,28 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [858] = 2, - ACTIONS(130), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(128), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + [678] = 8, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(124), 1, + anon_sym_else, + ACTIONS(64), 2, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [892] = 2, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [926] = 7, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(136), 17, + ACTIONS(122), 16, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2480,6 +2261,37 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [724] = 2, + ACTIONS(128), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(126), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, anon_sym_else, anon_sym_do, anon_sym_to, @@ -2490,7 +2302,71 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [970] = 2, + [758] = 2, + ACTIONS(132), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(130), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [792] = 2, + ACTIONS(136), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(134), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [826] = 2, ACTIONS(140), 2, anon_sym_LT, anon_sym_GT, @@ -2522,7 +2398,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1004] = 2, + [860] = 2, ACTIONS(144), 2, anon_sym_LT, anon_sym_GT, @@ -2554,58 +2430,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1038] = 2, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 27, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + [894] = 7, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(64), 2, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [1072] = 7, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(150), 17, + ACTIONS(146), 17, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2623,35 +2467,65 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1116] = 8, - ACTIONS(80), 1, + [938] = 2, + ACTIONS(150), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(148), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, anon_sym_AMP, - ACTIONS(82), 1, anon_sym_PIPE, - ACTIONS(154), 1, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, anon_sym_else, - ACTIONS(68), 2, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [972] = 6, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(152), 16, + ACTIONS(152), 18, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, + anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, + anon_sym_else, anon_sym_do, anon_sym_to, anon_sym_in, @@ -2661,7 +2535,74 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1162] = 2, + [1014] = 5, + ACTIONS(64), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(70), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(68), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(152), 19, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1054] = 2, + ACTIONS(154), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(152), 27, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1088] = 2, ACTIONS(158), 2, anon_sym_LT, anon_sym_GT, @@ -2693,6 +2634,73 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, + [1122] = 4, + ACTIONS(64), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(154), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(152), 23, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1160] = 3, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(154), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(152), 25, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, [1196] = 2, ACTIONS(162), 2, anon_sym_LT, @@ -2743,16 +2751,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(21), 1, anon_sym_let, ACTIONS(166), 1, - anon_sym_RPAREN, + anon_sym_end, ACTIONS(164), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(73), 13, + STATE(69), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2789,11 +2797,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(71), 13, + STATE(70), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2825,16 +2833,16 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(21), 1, anon_sym_let, ACTIONS(174), 1, - anon_sym_end, + anon_sym_RPAREN, ACTIONS(172), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(75), 13, + STATE(76), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2871,11 +2879,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(72), 13, + STATE(71), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2910,11 +2918,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(15), 13, + STATE(81), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2949,11 +2957,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(79), 13, + STATE(84), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2988,11 +2996,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(7), 13, + STATE(79), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3027,11 +3035,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(13), 13, + STATE(26), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3066,11 +3074,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(8), 13, + STATE(77), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3105,11 +3113,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(81), 13, + STATE(17), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3144,11 +3152,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(82), 13, + STATE(80), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3183,11 +3191,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(80), 13, + STATE(75), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3222,11 +3230,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(77), 13, + STATE(33), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3261,11 +3269,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(68), 13, + STATE(30), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3300,11 +3308,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(65), 13, + STATE(32), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3339,11 +3347,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(78), 13, + STATE(29), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3378,11 +3386,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(17), 13, + STATE(28), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3417,11 +3425,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(85), 13, + STATE(6), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3456,11 +3464,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(23), 13, + STATE(82), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3495,11 +3503,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(66), 13, + STATE(25), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3534,11 +3542,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(27), 13, + STATE(78), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3573,11 +3581,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(83), 13, + STATE(9), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3612,11 +3620,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(76), 13, + STATE(65), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3651,11 +3659,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(64), 13, + STATE(83), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3690,11 +3698,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(32), 13, + STATE(64), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3729,11 +3737,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(10), 13, + STATE(66), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3768,11 +3776,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(9), 13, + STATE(18), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3807,11 +3815,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(26), 13, + STATE(74), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3846,11 +3854,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(5), 3, + STATE(4), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(31), 13, + STATE(20), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3865,20 +3873,20 @@ static const uint16_t ts_small_parse_table[] = { sym_for_expression, sym_let_expression, [2692] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, @@ -3892,20 +3900,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_var, anon_sym_import, [2726] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, @@ -3919,20 +3927,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_var, anon_sym_import, [2760] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, @@ -3969,43 +3977,18 @@ static const uint16_t ts_small_parse_table[] = { sym_import_declaration, aux_sym__declaration_chunk_repeat1, aux_sym__declaration_chunk_repeat2, - [2825] = 9, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, + [2825] = 7, ACTIONS(253), 1, - anon_sym_COMMA, - ACTIONS(255), 1, - anon_sym_RBRACE, - STATE(118), 1, - aux_sym_record_expression_repeat1, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(76), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2859] = 7, - ACTIONS(257), 1, anon_sym_in, - ACTIONS(259), 1, + ACTIONS(255), 1, anon_sym_type, - ACTIONS(261), 1, + ACTIONS(257), 1, anon_sym_function, - ACTIONS(263), 1, + ACTIONS(259), 1, anon_sym_primitive, - ACTIONS(265), 1, + ACTIONS(261), 1, anon_sym_var, - ACTIONS(267), 1, + ACTIONS(263), 1, anon_sym_import, STATE(67), 9, aux_sym__declaration_chunks, @@ -4017,116 +4000,93 @@ static const uint16_t ts_small_parse_table[] = { sym_import_declaration, aux_sym__declaration_chunk_repeat1, aux_sym__declaration_chunk_repeat2, - [2889] = 7, - ACTIONS(259), 1, - anon_sym_type, - ACTIONS(261), 1, - anon_sym_function, - ACTIONS(263), 1, - anon_sym_primitive, - ACTIONS(265), 1, - anon_sym_var, - ACTIONS(267), 1, - anon_sym_import, - ACTIONS(269), 1, - anon_sym_in, - STATE(69), 9, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_type_declaration, - sym_function_declaration, - sym_primitive_declaration, - sym_variable_declaration, - sym_import_declaration, - aux_sym__declaration_chunk_repeat1, - aux_sym__declaration_chunk_repeat2, - [2919] = 9, - ACTIONS(80), 1, + [2855] = 9, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(271), 1, + ACTIONS(265), 1, anon_sym_SEMI, - ACTIONS(273), 1, + ACTIONS(267), 1, anon_sym_end, - STATE(117), 1, + STATE(115), 1, aux_sym_sequence_expression_repeat1, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2953] = 9, - ACTIONS(80), 1, + [2889] = 9, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(265), 1, + anon_sym_SEMI, + ACTIONS(269), 1, + anon_sym_end, + STATE(121), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(64), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(70), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(68), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2923] = 9, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(271), 1, - anon_sym_SEMI, - ACTIONS(275), 1, - anon_sym_RPAREN, - STATE(109), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(68), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(70), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(78), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(76), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2987] = 9, - ACTIONS(80), 1, - anon_sym_AMP, - ACTIONS(82), 1, - anon_sym_PIPE, - ACTIONS(277), 1, anon_sym_COMMA, - ACTIONS(279), 1, + ACTIONS(273), 1, anon_sym_RPAREN, - STATE(111), 1, + STATE(113), 1, aux_sym_function_call_repeat1, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3021] = 7, - ACTIONS(259), 1, + [2957] = 7, + ACTIONS(255), 1, anon_sym_type, - ACTIONS(261), 1, + ACTIONS(257), 1, anon_sym_function, - ACTIONS(263), 1, + ACTIONS(259), 1, anon_sym_primitive, - ACTIONS(265), 1, + ACTIONS(261), 1, anon_sym_var, - ACTIONS(267), 1, + ACTIONS(263), 1, anon_sym_import, - ACTIONS(281), 1, + ACTIONS(275), 1, ts_builtin_sym_end, STATE(67), 9, aux_sym__declaration_chunks, @@ -4138,241 +4098,289 @@ static const uint16_t ts_small_parse_table[] = { sym_import_declaration, aux_sym__declaration_chunk_repeat1, aux_sym__declaration_chunk_repeat2, - [3051] = 9, - ACTIONS(80), 1, + [2987] = 7, + ACTIONS(255), 1, + anon_sym_type, + ACTIONS(257), 1, + anon_sym_function, + ACTIONS(259), 1, + anon_sym_primitive, + ACTIONS(261), 1, + anon_sym_var, + ACTIONS(263), 1, + anon_sym_import, + ACTIONS(277), 1, + anon_sym_in, + STATE(68), 9, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_type_declaration, + sym_function_declaration, + sym_primitive_declaration, + sym_variable_declaration, + sym_import_declaration, + aux_sym__declaration_chunk_repeat1, + aux_sym__declaration_chunk_repeat2, + [3017] = 7, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(271), 1, - anon_sym_SEMI, - ACTIONS(283), 1, - anon_sym_end, - STATE(114), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(279), 3, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_end, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3085] = 7, - ACTIONS(80), 1, + [3047] = 9, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(281), 1, + anon_sym_COMMA, + ACTIONS(283), 1, + anon_sym_RBRACE, + STATE(118), 1, + aux_sym_record_expression_repeat1, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(285), 3, - anon_sym_RPAREN, + ACTIONS(68), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3081] = 9, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(265), 1, anon_sym_SEMI, - anon_sym_end, - ACTIONS(76), 4, + ACTIONS(285), 1, + anon_sym_RPAREN, + STATE(114), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(64), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(70), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3115] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, ACTIONS(287), 2, anon_sym_COMMA, anon_sym_RBRACE, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3144] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, ACTIONS(289), 2, anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3173] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(291), 1, - anon_sym_to, - ACTIONS(68), 2, + anon_sym_RBRACK, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3201] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(293), 1, - anon_sym_do, - ACTIONS(68), 2, + anon_sym_then, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3229] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(295), 1, - anon_sym_then, - ACTIONS(68), 2, + anon_sym_do, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3257] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(297), 1, anon_sym_RBRACK, - ACTIONS(68), 2, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3285] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(299), 1, - anon_sym_RBRACK, - ACTIONS(68), 2, + anon_sym_do, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3313] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(281), 1, - ts_builtin_sym_end, - ACTIONS(68), 2, + ACTIONS(301), 1, + anon_sym_to, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, [3341] = 7, - ACTIONS(80), 1, + ACTIONS(72), 1, anon_sym_AMP, - ACTIONS(82), 1, + ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(301), 1, - anon_sym_do, - ACTIONS(68), 2, + ACTIONS(275), 1, + ts_builtin_sym_end, + ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(70), 2, + ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(78), 2, + ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(76), 4, + ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, @@ -4392,50 +4400,55 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_type, anon_sym_var, anon_sym_import, - [3388] = 3, - ACTIONS(313), 1, + [3388] = 1, + ACTIONS(311), 9, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_in, anon_sym_type, - STATE(87), 2, + anon_sym_COLON, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3400] = 3, + ACTIONS(315), 1, + anon_sym_type, + STATE(88), 2, sym_type_declaration, aux_sym__declaration_chunk_repeat1, - ACTIONS(311), 6, + ACTIONS(313), 6, ts_builtin_sym_end, anon_sym_in, anon_sym_function, anon_sym_primitive, anon_sym_var, anon_sym_import, - [3404] = 1, - ACTIONS(316), 8, + [3416] = 1, + ACTIONS(318), 9, ts_builtin_sym_end, anon_sym_EQ, anon_sym_in, anon_sym_type, + anon_sym_COLON, anon_sym_function, anon_sym_primitive, anon_sym_var, anon_sym_import, - [3415] = 1, - ACTIONS(318), 8, + [3428] = 1, + ACTIONS(320), 9, ts_builtin_sym_end, anon_sym_EQ, anon_sym_in, anon_sym_type, + anon_sym_COLON, anon_sym_function, anon_sym_primitive, anon_sym_var, anon_sym_import, - [3426] = 1, - ACTIONS(320), 8, - ts_builtin_sym_end, - anon_sym_EQ, - anon_sym_in, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [3437] = 1, + [3440] = 2, + ACTIONS(324), 1, + anon_sym_COLON, ACTIONS(322), 8, ts_builtin_sym_end, anon_sym_EQ, @@ -4445,25 +4458,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3448] = 1, - ACTIONS(324), 7, + [3454] = 1, + ACTIONS(326), 8, ts_builtin_sym_end, + anon_sym_EQ, anon_sym_in, anon_sym_type, anon_sym_function, anon_sym_primitive, anon_sym_var, anon_sym_import, - [3458] = 1, - ACTIONS(326), 7, - ts_builtin_sym_end, - anon_sym_in, - anon_sym_type, - anon_sym_function, - anon_sym_primitive, - anon_sym_var, - anon_sym_import, - [3468] = 1, + [3465] = 1, ACTIONS(328), 7, ts_builtin_sym_end, anon_sym_in, @@ -4472,7 +4477,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3478] = 1, + [3475] = 1, ACTIONS(330), 7, ts_builtin_sym_end, anon_sym_in, @@ -4481,7 +4486,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3488] = 1, + [3485] = 1, ACTIONS(332), 7, ts_builtin_sym_end, anon_sym_in, @@ -4490,7 +4495,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3498] = 1, + [3495] = 1, ACTIONS(334), 7, ts_builtin_sym_end, anon_sym_in, @@ -4499,7 +4504,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3508] = 1, + [3505] = 1, ACTIONS(336), 7, ts_builtin_sym_end, anon_sym_in, @@ -4508,8 +4513,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3518] = 1, - ACTIONS(338), 7, + [3515] = 4, + ACTIONS(338), 1, + sym_identifier, + ACTIONS(340), 1, + anon_sym_LBRACE, + ACTIONS(342), 1, + anon_sym_array, + STATE(96), 4, + sym__type, + sym_type_alias, + sym_record_type, + sym_array_type, + [3531] = 1, + ACTIONS(344), 7, ts_builtin_sym_end, anon_sym_in, anon_sym_type, @@ -4517,283 +4534,292 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3528] = 4, - ACTIONS(340), 1, - sym_identifier, - ACTIONS(342), 1, - anon_sym_LBRACE, - ACTIONS(344), 1, - anon_sym_array, - STATE(97), 4, - sym__type, - sym_type_alias, - sym_record_type, - sym_array_type, - [3544] = 3, - ACTIONS(346), 1, - anon_sym_SEMI, - STATE(101), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(285), 2, - anon_sym_RPAREN, - anon_sym_end, - [3555] = 3, - ACTIONS(349), 1, + [3541] = 1, + ACTIONS(346), 7, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3551] = 1, + ACTIONS(348), 7, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3561] = 3, + ACTIONS(350), 1, anon_sym_DQUOTE, - STATE(102), 1, + STATE(103), 1, aux_sym_string_literal_repeat1, - ACTIONS(351), 2, + ACTIONS(352), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [3566] = 3, + [3572] = 3, ACTIONS(354), 1, anon_sym_DQUOTE, - STATE(102), 1, + STATE(106), 1, aux_sym_string_literal_repeat1, ACTIONS(356), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [3577] = 3, + [3583] = 3, ACTIONS(358), 1, - anon_sym_COMMA, + anon_sym_SEMI, STATE(104), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(279), 2, + anon_sym_RPAREN, + anon_sym_end, + [3594] = 3, + ACTIONS(361), 1, + anon_sym_COMMA, + STATE(105), 1, aux_sym_record_type_repeat1, - ACTIONS(361), 2, + ACTIONS(364), 2, anon_sym_RPAREN, anon_sym_RBRACE, - [3588] = 3, - ACTIONS(363), 1, + [3605] = 3, + ACTIONS(366), 1, anon_sym_DQUOTE, - STATE(103), 1, + STATE(106), 1, aux_sym_string_literal_repeat1, - ACTIONS(365), 2, + ACTIONS(368), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [3599] = 3, + [3616] = 1, + ACTIONS(371), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACE, + [3622] = 3, + ACTIONS(373), 1, + anon_sym_COMMA, + ACTIONS(375), 1, + anon_sym_RPAREN, + STATE(105), 1, + aux_sym_record_type_repeat1, + [3632] = 3, ACTIONS(289), 1, anon_sym_RPAREN, - ACTIONS(367), 1, + ACTIONS(377), 1, anon_sym_COMMA, - STATE(106), 1, + STATE(109), 1, aux_sym_function_call_repeat1, - [3609] = 1, - ACTIONS(370), 3, + [3642] = 1, + ACTIONS(380), 3, anon_sym_COMMA, anon_sym_RPAREN, anon_sym_RBRACE, - [3615] = 3, - ACTIONS(372), 1, + [3648] = 3, + ACTIONS(382), 1, sym_identifier, - ACTIONS(374), 1, - anon_sym_RPAREN, - STATE(115), 1, + ACTIONS(384), 1, + anon_sym_RBRACE, + STATE(117), 1, sym__typed_field, - [3625] = 3, - ACTIONS(271), 1, - anon_sym_SEMI, - ACTIONS(376), 1, - anon_sym_RPAREN, - STATE(101), 1, - aux_sym_sequence_expression_repeat1, - [3635] = 3, - ACTIONS(378), 1, + [3658] = 3, + ACTIONS(373), 1, anon_sym_COMMA, - ACTIONS(381), 1, + ACTIONS(386), 1, anon_sym_RBRACE, - STATE(110), 1, - aux_sym_record_expression_repeat1, - [3645] = 3, - ACTIONS(277), 1, + STATE(105), 1, + aux_sym_record_type_repeat1, + [3668] = 3, + ACTIONS(271), 1, anon_sym_COMMA, - ACTIONS(383), 1, + ACTIONS(388), 1, anon_sym_RPAREN, - STATE(106), 1, + STATE(109), 1, aux_sym_function_call_repeat1, - [3655] = 1, - ACTIONS(385), 3, - anon_sym_COMMA, + [3678] = 3, + ACTIONS(265), 1, + anon_sym_SEMI, + ACTIONS(390), 1, anon_sym_RPAREN, - anon_sym_RBRACE, - [3661] = 3, - ACTIONS(387), 1, - anon_sym_COMMA, - ACTIONS(389), 1, - anon_sym_RBRACE, STATE(104), 1, - aux_sym_record_type_repeat1, - [3671] = 3, - ACTIONS(271), 1, - anon_sym_SEMI, - ACTIONS(391), 1, - anon_sym_end, - STATE(101), 1, aux_sym_sequence_expression_repeat1, - [3681] = 3, - ACTIONS(387), 1, - anon_sym_COMMA, - ACTIONS(393), 1, - anon_sym_RPAREN, - STATE(120), 1, - aux_sym_record_type_repeat1, - [3691] = 3, - ACTIONS(387), 1, - anon_sym_COMMA, - ACTIONS(395), 1, - anon_sym_RBRACE, - STATE(113), 1, - aux_sym_record_type_repeat1, - [3701] = 3, - ACTIONS(271), 1, + [3688] = 3, + ACTIONS(265), 1, anon_sym_SEMI, + ACTIONS(392), 1, + anon_sym_end, + STATE(104), 1, + aux_sym_sequence_expression_repeat1, + [3698] = 3, + ACTIONS(394), 1, + anon_sym_COMMA, ACTIONS(397), 1, - anon_sym_end, - STATE(101), 1, - aux_sym_sequence_expression_repeat1, - [3711] = 3, - ACTIONS(253), 1, + anon_sym_RBRACE, + STATE(116), 1, + aux_sym_record_expression_repeat1, + [3708] = 3, + ACTIONS(373), 1, anon_sym_COMMA, ACTIONS(399), 1, anon_sym_RBRACE, - STATE(110), 1, - aux_sym_record_expression_repeat1, - [3721] = 3, - ACTIONS(372), 1, - sym_identifier, + STATE(112), 1, + aux_sym_record_type_repeat1, + [3718] = 3, + ACTIONS(281), 1, + anon_sym_COMMA, ACTIONS(401), 1, anon_sym_RBRACE, STATE(116), 1, - sym__typed_field, - [3731] = 3, - ACTIONS(387), 1, + aux_sym_record_expression_repeat1, + [3728] = 3, + ACTIONS(373), 1, anon_sym_COMMA, ACTIONS(403), 1, anon_sym_RPAREN, - STATE(104), 1, + STATE(108), 1, aux_sym_record_type_repeat1, - [3741] = 2, - ACTIONS(405), 1, + [3738] = 3, + ACTIONS(382), 1, sym_identifier, + ACTIONS(405), 1, + anon_sym_RPAREN, + STATE(119), 1, + sym__typed_field, + [3748] = 3, + ACTIONS(265), 1, + anon_sym_SEMI, ACTIONS(407), 1, - anon_sym_RBRACE, - [3748] = 2, + anon_sym_end, + STATE(104), 1, + aux_sym_sequence_expression_repeat1, + [3758] = 2, ACTIONS(409), 1, + sym_identifier, + ACTIONS(411), 1, + anon_sym_RBRACE, + [3765] = 2, + ACTIONS(413), 1, + sym_identifier, + STATE(95), 1, + sym__function_declaration_common, + [3772] = 2, + ACTIONS(415), 1, anon_sym_LPAREN, - STATE(89), 1, + STATE(91), 1, sym_parameters, - [3755] = 2, - ACTIONS(372), 1, + [3779] = 2, + ACTIONS(417), 1, + anon_sym_COLON_EQ, + ACTIONS(419), 1, + anon_sym_COLON, + [3786] = 2, + ACTIONS(9), 1, + anon_sym_DQUOTE, + STATE(101), 1, + sym_string_literal, + [3793] = 2, + ACTIONS(382), 1, sym_identifier, STATE(107), 1, sym__typed_field, - [3762] = 2, - ACTIONS(411), 1, - sym_identifier, - STATE(131), 1, - sym__function_declaration_common, - [3769] = 2, - ACTIONS(411), 1, - sym_identifier, - STATE(94), 1, - sym__function_declaration_common, - [3776] = 2, + [3800] = 2, ACTIONS(413), 1, - anon_sym_COLON_EQ, - ACTIONS(415), 1, - anon_sym_COLON, - [3783] = 2, - ACTIONS(9), 1, - anon_sym_DQUOTE, - STATE(92), 1, - sym_string_literal, - [3790] = 1, - ACTIONS(417), 1, - anon_sym_of, - [3794] = 1, - ACTIONS(419), 1, sym_identifier, - [3798] = 1, + STATE(146), 1, + sym__function_declaration_common, + [3807] = 1, ACTIONS(421), 1, - sym_identifier, - [3802] = 1, + anon_sym_COLON_EQ, + [3811] = 1, ACTIONS(423), 1, - anon_sym_EQ, - [3806] = 1, + sym_identifier, + [3815] = 1, ACTIONS(425), 1, sym_identifier, - [3810] = 1, + [3819] = 1, ACTIONS(427), 1, - ts_builtin_sym_end, - [3814] = 1, + sym_identifier, + [3823] = 1, ACTIONS(429), 1, - anon_sym_COLON_EQ, - [3818] = 1, + anon_sym_EQ, + [3827] = 1, ACTIONS(431), 1, sym_identifier, - [3822] = 1, + [3831] = 1, ACTIONS(433), 1, - anon_sym_of, - [3826] = 1, + sym_identifier, + [3835] = 1, ACTIONS(435), 1, - sym_identifier, - [3830] = 1, + anon_sym_of, + [3839] = 1, ACTIONS(437), 1, - anon_sym_EQ, - [3834] = 1, + anon_sym_of, + [3843] = 1, ACTIONS(439), 1, - anon_sym_COLON, - [3838] = 1, + anon_sym_EQ, + [3847] = 1, ACTIONS(441), 1, - anon_sym_COLON_EQ, - [3842] = 1, - ACTIONS(443), 1, sym_identifier, - [3846] = 1, + [3851] = 1, + ACTIONS(443), 1, + anon_sym_EQ, + [3855] = 1, ACTIONS(445), 1, - anon_sym_EQ, - [3850] = 1, + ts_builtin_sym_end, + [3859] = 1, ACTIONS(447), 1, - anon_sym_EQ, - [3854] = 1, + anon_sym_COLON_EQ, + [3863] = 1, ACTIONS(449), 1, sym_identifier, - [3858] = 1, + [3867] = 1, ACTIONS(451), 1, sym_identifier, + [3871] = 1, + ACTIONS(453), 1, + anon_sym_COLON, + [3875] = 1, + ACTIONS(455), 1, + anon_sym_EQ, + [3879] = 1, + ACTIONS(457), 1, + sym_identifier, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, [SMALL_STATE(3)] = 45, [SMALL_STATE(4)] = 82, - [SMALL_STATE(5)] = 119, + [SMALL_STATE(5)] = 125, [SMALL_STATE(6)] = 162, - [SMALL_STATE(7)] = 196, - [SMALL_STATE(8)] = 234, - [SMALL_STATE(9)] = 270, - [SMALL_STATE(10)] = 304, - [SMALL_STATE(11)] = 348, - [SMALL_STATE(12)] = 382, - [SMALL_STATE(13)] = 416, - [SMALL_STATE(14)] = 456, - [SMALL_STATE(15)] = 490, - [SMALL_STATE(16)] = 534, - [SMALL_STATE(17)] = 568, - [SMALL_STATE(18)] = 612, - [SMALL_STATE(19)] = 646, - [SMALL_STATE(20)] = 680, - [SMALL_STATE(21)] = 714, - [SMALL_STATE(22)] = 748, - [SMALL_STATE(23)] = 782, - [SMALL_STATE(24)] = 824, - [SMALL_STATE(25)] = 858, - [SMALL_STATE(26)] = 892, - [SMALL_STATE(27)] = 926, - [SMALL_STATE(28)] = 970, - [SMALL_STATE(29)] = 1004, - [SMALL_STATE(30)] = 1038, - [SMALL_STATE(31)] = 1072, - [SMALL_STATE(32)] = 1116, - [SMALL_STATE(33)] = 1162, + [SMALL_STATE(7)] = 206, + [SMALL_STATE(8)] = 240, + [SMALL_STATE(9)] = 274, + [SMALL_STATE(10)] = 318, + [SMALL_STATE(11)] = 352, + [SMALL_STATE(12)] = 386, + [SMALL_STATE(13)] = 420, + [SMALL_STATE(14)] = 454, + [SMALL_STATE(15)] = 488, + [SMALL_STATE(16)] = 522, + [SMALL_STATE(17)] = 556, + [SMALL_STATE(18)] = 600, + [SMALL_STATE(19)] = 644, + [SMALL_STATE(20)] = 678, + [SMALL_STATE(21)] = 724, + [SMALL_STATE(22)] = 758, + [SMALL_STATE(23)] = 792, + [SMALL_STATE(24)] = 826, + [SMALL_STATE(25)] = 860, + [SMALL_STATE(26)] = 894, + [SMALL_STATE(27)] = 938, + [SMALL_STATE(28)] = 972, + [SMALL_STATE(29)] = 1014, + [SMALL_STATE(30)] = 1054, + [SMALL_STATE(31)] = 1088, + [SMALL_STATE(32)] = 1122, + [SMALL_STATE(33)] = 1160, [SMALL_STATE(34)] = 1196, [SMALL_STATE(35)] = 1230, [SMALL_STATE(36)] = 1283, @@ -4829,14 +4855,14 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(66)] = 2760, [SMALL_STATE(67)] = 2794, [SMALL_STATE(68)] = 2825, - [SMALL_STATE(69)] = 2859, + [SMALL_STATE(69)] = 2855, [SMALL_STATE(70)] = 2889, - [SMALL_STATE(71)] = 2919, - [SMALL_STATE(72)] = 2953, + [SMALL_STATE(71)] = 2923, + [SMALL_STATE(72)] = 2957, [SMALL_STATE(73)] = 2987, - [SMALL_STATE(74)] = 3021, - [SMALL_STATE(75)] = 3051, - [SMALL_STATE(76)] = 3085, + [SMALL_STATE(74)] = 3017, + [SMALL_STATE(75)] = 3047, + [SMALL_STATE(76)] = 3081, [SMALL_STATE(77)] = 3115, [SMALL_STATE(78)] = 3144, [SMALL_STATE(79)] = 3173, @@ -4848,64 +4874,66 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(85)] = 3341, [SMALL_STATE(86)] = 3369, [SMALL_STATE(87)] = 3388, - [SMALL_STATE(88)] = 3404, - [SMALL_STATE(89)] = 3415, - [SMALL_STATE(90)] = 3426, - [SMALL_STATE(91)] = 3437, - [SMALL_STATE(92)] = 3448, - [SMALL_STATE(93)] = 3458, - [SMALL_STATE(94)] = 3468, - [SMALL_STATE(95)] = 3478, - [SMALL_STATE(96)] = 3488, - [SMALL_STATE(97)] = 3498, - [SMALL_STATE(98)] = 3508, - [SMALL_STATE(99)] = 3518, - [SMALL_STATE(100)] = 3528, - [SMALL_STATE(101)] = 3544, - [SMALL_STATE(102)] = 3555, - [SMALL_STATE(103)] = 3566, - [SMALL_STATE(104)] = 3577, - [SMALL_STATE(105)] = 3588, - [SMALL_STATE(106)] = 3599, - [SMALL_STATE(107)] = 3609, - [SMALL_STATE(108)] = 3615, - [SMALL_STATE(109)] = 3625, - [SMALL_STATE(110)] = 3635, - [SMALL_STATE(111)] = 3645, - [SMALL_STATE(112)] = 3655, - [SMALL_STATE(113)] = 3661, - [SMALL_STATE(114)] = 3671, - [SMALL_STATE(115)] = 3681, - [SMALL_STATE(116)] = 3691, - [SMALL_STATE(117)] = 3701, - [SMALL_STATE(118)] = 3711, - [SMALL_STATE(119)] = 3721, - [SMALL_STATE(120)] = 3731, - [SMALL_STATE(121)] = 3741, - [SMALL_STATE(122)] = 3748, - [SMALL_STATE(123)] = 3755, - [SMALL_STATE(124)] = 3762, - [SMALL_STATE(125)] = 3769, - [SMALL_STATE(126)] = 3776, - [SMALL_STATE(127)] = 3783, - [SMALL_STATE(128)] = 3790, - [SMALL_STATE(129)] = 3794, - [SMALL_STATE(130)] = 3798, - [SMALL_STATE(131)] = 3802, - [SMALL_STATE(132)] = 3806, - [SMALL_STATE(133)] = 3810, - [SMALL_STATE(134)] = 3814, - [SMALL_STATE(135)] = 3818, - [SMALL_STATE(136)] = 3822, - [SMALL_STATE(137)] = 3826, - [SMALL_STATE(138)] = 3830, - [SMALL_STATE(139)] = 3834, - [SMALL_STATE(140)] = 3838, - [SMALL_STATE(141)] = 3842, - [SMALL_STATE(142)] = 3846, - [SMALL_STATE(143)] = 3850, - [SMALL_STATE(144)] = 3854, - [SMALL_STATE(145)] = 3858, + [SMALL_STATE(88)] = 3400, + [SMALL_STATE(89)] = 3416, + [SMALL_STATE(90)] = 3428, + [SMALL_STATE(91)] = 3440, + [SMALL_STATE(92)] = 3454, + [SMALL_STATE(93)] = 3465, + [SMALL_STATE(94)] = 3475, + [SMALL_STATE(95)] = 3485, + [SMALL_STATE(96)] = 3495, + [SMALL_STATE(97)] = 3505, + [SMALL_STATE(98)] = 3515, + [SMALL_STATE(99)] = 3531, + [SMALL_STATE(100)] = 3541, + [SMALL_STATE(101)] = 3551, + [SMALL_STATE(102)] = 3561, + [SMALL_STATE(103)] = 3572, + [SMALL_STATE(104)] = 3583, + [SMALL_STATE(105)] = 3594, + [SMALL_STATE(106)] = 3605, + [SMALL_STATE(107)] = 3616, + [SMALL_STATE(108)] = 3622, + [SMALL_STATE(109)] = 3632, + [SMALL_STATE(110)] = 3642, + [SMALL_STATE(111)] = 3648, + [SMALL_STATE(112)] = 3658, + [SMALL_STATE(113)] = 3668, + [SMALL_STATE(114)] = 3678, + [SMALL_STATE(115)] = 3688, + [SMALL_STATE(116)] = 3698, + [SMALL_STATE(117)] = 3708, + [SMALL_STATE(118)] = 3718, + [SMALL_STATE(119)] = 3728, + [SMALL_STATE(120)] = 3738, + [SMALL_STATE(121)] = 3748, + [SMALL_STATE(122)] = 3758, + [SMALL_STATE(123)] = 3765, + [SMALL_STATE(124)] = 3772, + [SMALL_STATE(125)] = 3779, + [SMALL_STATE(126)] = 3786, + [SMALL_STATE(127)] = 3793, + [SMALL_STATE(128)] = 3800, + [SMALL_STATE(129)] = 3807, + [SMALL_STATE(130)] = 3811, + [SMALL_STATE(131)] = 3815, + [SMALL_STATE(132)] = 3819, + [SMALL_STATE(133)] = 3823, + [SMALL_STATE(134)] = 3827, + [SMALL_STATE(135)] = 3831, + [SMALL_STATE(136)] = 3835, + [SMALL_STATE(137)] = 3839, + [SMALL_STATE(138)] = 3843, + [SMALL_STATE(139)] = 3847, + [SMALL_STATE(140)] = 3851, + [SMALL_STATE(141)] = 3855, + [SMALL_STATE(142)] = 3859, + [SMALL_STATE(143)] = 3863, + [SMALL_STATE(144)] = 3867, + [SMALL_STATE(145)] = 3871, + [SMALL_STATE(146)] = 3875, + [SMALL_STATE(147)] = 3879, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -4913,222 +4941,225 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(144), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(125), - [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(130), - [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(127), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(147), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(123), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(134), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(126), [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(56), - [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(41), + [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), [44] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 8), [46] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 8), - [48] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 17), - [50] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 17), - [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [58] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 13), - [64] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 13), - [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), - [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 7), - [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 12), - [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [80] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [82] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), - [86] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), - [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 32), - [90] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 32), - [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 25), - [94] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 25), - [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 24), - [98] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 23), - [100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 23), - [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 22), - [104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), - [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 20), - [110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 20), - [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 19), - [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 19), - [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 5), - [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 5), - [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 4), - [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 4), - [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), - [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), - [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), - [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), - [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 18), - [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 18), - [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 10), - [148] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 10), - [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 35), - [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 11), - [154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), - [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 14), - [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 14), - [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [48] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [54] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), + [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 17), + [60] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 17), + [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 23), + [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 10), + [78] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 10), + [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 26), + [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 26), + [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 25), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 24), + [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 24), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), + [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), + [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 20), + [96] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 20), + [98] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 19), + [100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 19), + [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 18), + [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 18), + [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 14), + [108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 14), + [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 13), + [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 13), + [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 36), + [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 12), + [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 11), + [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), + [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), + [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 33), + [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 33), + [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), + [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), + [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), + [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 4), + [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 4), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [166] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), + [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [172] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), - [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), - [188] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), - [190] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), - [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), - [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), - [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), - [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [204] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), - [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), - [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), - [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), - [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), - [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), - [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), - [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 6, .production_id = 31), + [172] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [188] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [190] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), + [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [204] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), + [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), + [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 16), [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 15), - [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 16), + [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 6, .production_id = 32), [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), - [238] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(141), - [241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(124), - [244] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(125), - [247] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(130), - [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(127), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), - [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), - [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), - [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 36), + [238] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(147), + [241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(128), + [244] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(123), + [247] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(134), + [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(126), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 37), [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), - [305] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(124), - [308] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(125), - [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), - [313] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), SHIFT_REPEAT(141), - [316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 21), - [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 2, .production_id = 6), + [305] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(128), + [308] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(123), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 4, .production_id = 30), + [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), + [315] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), SHIFT_REPEAT(147), + [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 21), [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), - [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 4, .production_id = 29), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 3), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 3, .production_id = 26), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_declaration, 2, .production_id = 2), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias, 1), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type, 3, .production_id = 27), + [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 2, .production_id = 6), + [324] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 4, .production_id = 22), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias, 1), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type, 3, .production_id = 28), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_declaration, 2, .production_id = 2), [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_declaration, 4, .production_id = 15), - [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 2), - [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 4, .production_id = 34), - [340] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), - [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [344] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), - [346] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(57), - [349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [351] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(102), - [354] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), - [356] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), - [358] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 30), SHIFT_REPEAT(123), - [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 30), - [363] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), - [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [367] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(50), - [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 26), - [372] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), - [374] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), - [376] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [378] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 33), SHIFT_REPEAT(135), - [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 33), - [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__typed_field, 3, .production_id = 28), - [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), - [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), - [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), - [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), - [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [415] = {.entry = {.count = 1, .reusable = false}}, SHIFT(145), - [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), - [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), - [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [427] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), - [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), - [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), - [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), - [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 4, .production_id = 35), + [338] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), + [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [342] = {.entry = {.count = 1, .reusable = false}}, SHIFT(137), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 2), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 3, .production_id = 27), + [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 3), + [350] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [352] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [354] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [356] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [358] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(62), + [361] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 31), SHIFT_REPEAT(127), + [364] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 31), + [366] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [368] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(106), + [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 27), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [377] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(55), + [380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__typed_field, 3, .production_id = 29), + [382] = {.entry = {.count = 1, .reusable = true}}, SHIFT(145), + [384] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [386] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [388] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [390] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [392] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [394] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 34), SHIFT_REPEAT(143), + [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 34), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [419] = {.entry = {.count = 1, .reusable = false}}, SHIFT(135), + [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [445] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), }; #ifdef __cplusplus diff --git a/test/corpus/declarations.txt b/test/corpus/declarations.txt index d07ca12..94d0483 100644 --- a/test/corpus/declarations.txt +++ b/test/corpus/declarations.txt @@ -130,6 +130,25 @@ function func(a: int, b: int) = "string" type: (identifier)) body: (string_literal))) +================================================================================ +Function declaration return type +================================================================================ + +function func(a: int, b: int) : string = "string" + +-------------------------------------------------------------------------------- + +(source_file + (function_declaration + name: (identifier) + parameters: (parameters + name: (identifier) + type: (identifier) + name: (identifier) + type: (identifier)) + return_type: (identifier) + body: (string_literal))) + ================================================================================ Function declaration single parameter ================================================================================ @@ -173,6 +192,20 @@ primitive prim() name: (identifier) parameters: (parameters))) +================================================================================ +Primitive declaration with return type +================================================================================ + +primitive prim() : int + +-------------------------------------------------------------------------------- + +(source_file + (primitive_declaration + name: (identifier) + parameters: (parameters) + return_type: (identifier))) + ================================================================================ Variable declaration ================================================================================