From dd0af53fa0df94b418154373ad7f0276e5c21ce1 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 1 Jun 2022 20:53:39 +0200 Subject: [PATCH] Add record types --- grammar.js | 19 +- src/grammar.json | 100 ++- src/node-types.json | 30 + src/parser.c | 1496 ++++++++++++++++++---------------- test/corpus/declarations.txt | 61 ++ 5 files changed, 970 insertions(+), 736 deletions(-) diff --git a/grammar.js b/grammar.js index 48af2f1..a875ddc 100644 --- a/grammar.js +++ b/grammar.js @@ -244,10 +244,23 @@ module.exports = grammar({ _type: ($) => choice( $.type_alias, + $.record_type, ), type_alias: ($) => $.identifier, + record_type: ($) => seq( + "{", + sepBy(",", $._typed_field), + "}", + ), + + _typed_field: ($) => seq( + field("name", $.identifier), + ":", + field("type", $.identifier), + ), + function_declaration: ($) => seq( "function", $._function_declaration_common, @@ -271,12 +284,6 @@ module.exports = grammar({ ")", ), - _typed_field: ($) => seq( - field("name", $.identifier), - ":", - field("type", $.identifier), - ), - variable_declaration: ($) => seq( "var", field("name", $.identifier), diff --git a/src/grammar.json b/src/grammar.json index be3a4a8..4174529 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1114,6 +1114,10 @@ { "type": "SYMBOL", "name": "type_alias" + }, + { + "type": "SYMBOL", + "name": "record_type" } ] }, @@ -1121,6 +1125,77 @@ "type": "SYMBOL", "name": "identifier" }, + "record_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_typed_field" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_typed_field" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_typed_field": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, "function_declaration": { "type": "SEQ", "members": [ @@ -1230,31 +1305,6 @@ } ] }, - "_typed_field": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, "variable_declaration": { "type": "SEQ", "members": [ diff --git a/src/node-types.json b/src/node-types.json index 14905da..1602022 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1543,6 +1543,32 @@ } } }, + { + "type": "record_type", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, { "type": "record_value", "named": true, @@ -1811,6 +1837,10 @@ "multiple": false, "required": true, "types": [ + { + "type": "record_type", + "named": true + }, { "type": "type_alias", "named": true diff --git a/src/parser.c b/src/parser.c index ab32eb1..045e7e1 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 137 +#define STATE_COUNT 143 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 83 +#define SYMBOL_COUNT 84 #define ALIAS_COUNT 0 #define TOKEN_COUNT 47 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 24 #define MAX_ALIAS_SEQUENCE_LENGTH 8 -#define PRODUCTION_ID_COUNT 35 +#define PRODUCTION_ID_COUNT 36 enum { sym_identifier = 1, @@ -58,9 +58,9 @@ enum { anon_sym_in = 39, anon_sym_end = 40, anon_sym_type = 41, - anon_sym_function = 42, - anon_sym_primitive = 43, - anon_sym_COLON = 44, + anon_sym_COLON = 42, + anon_sym_function = 43, + anon_sym_primitive = 44, anon_sym_var = 45, anon_sym_import = 46, sym_source_file = 47, @@ -85,20 +85,21 @@ enum { sym_type_declaration = 66, sym__type = 67, sym_type_alias = 68, - sym_function_declaration = 69, - sym_primitive_declaration = 70, - sym__function_declaration_common = 71, - sym_parameters = 72, - sym__typed_field = 73, - sym_variable_declaration = 74, - sym_import_declaration = 75, - aux_sym_string_literal_repeat1 = 76, - aux_sym_function_call_repeat1 = 77, - aux_sym_sequence_expression_repeat1 = 78, - aux_sym_record_expression_repeat1 = 79, - aux_sym__declaration_chunk_repeat1 = 80, - aux_sym__declaration_chunk_repeat2 = 81, - aux_sym_parameters_repeat1 = 82, + sym_record_type = 69, + sym__typed_field = 70, + sym_function_declaration = 71, + sym_primitive_declaration = 72, + sym__function_declaration_common = 73, + sym_parameters = 74, + sym_variable_declaration = 75, + sym_import_declaration = 76, + aux_sym_string_literal_repeat1 = 77, + aux_sym_function_call_repeat1 = 78, + aux_sym_sequence_expression_repeat1 = 79, + aux_sym_record_expression_repeat1 = 80, + aux_sym__declaration_chunk_repeat1 = 81, + aux_sym__declaration_chunk_repeat2 = 82, + aux_sym_record_type_repeat1 = 83, }; static const char * const ts_symbol_names[] = { @@ -144,9 +145,9 @@ static const char * const ts_symbol_names[] = { [anon_sym_in] = "in", [anon_sym_end] = "end", [anon_sym_type] = "type", + [anon_sym_COLON] = ":", [anon_sym_function] = "function", [anon_sym_primitive] = "primitive", - [anon_sym_COLON] = ":", [anon_sym_var] = "var", [anon_sym_import] = "import", [sym_source_file] = "source_file", @@ -171,11 +172,12 @@ static const char * const ts_symbol_names[] = { [sym_type_declaration] = "type_declaration", [sym__type] = "_type", [sym_type_alias] = "type_alias", + [sym_record_type] = "record_type", + [sym__typed_field] = "_typed_field", [sym_function_declaration] = "function_declaration", [sym_primitive_declaration] = "primitive_declaration", [sym__function_declaration_common] = "_function_declaration_common", [sym_parameters] = "parameters", - [sym__typed_field] = "_typed_field", [sym_variable_declaration] = "variable_declaration", [sym_import_declaration] = "import_declaration", [aux_sym_string_literal_repeat1] = "string_literal_repeat1", @@ -184,7 +186,7 @@ static const char * const ts_symbol_names[] = { [aux_sym_record_expression_repeat1] = "record_expression_repeat1", [aux_sym__declaration_chunk_repeat1] = "_declaration_chunk_repeat1", [aux_sym__declaration_chunk_repeat2] = "_declaration_chunk_repeat2", - [aux_sym_parameters_repeat1] = "parameters_repeat1", + [aux_sym_record_type_repeat1] = "record_type_repeat1", }; static const TSSymbol ts_symbol_map[] = { @@ -230,9 +232,9 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_in] = anon_sym_in, [anon_sym_end] = anon_sym_end, [anon_sym_type] = anon_sym_type, + [anon_sym_COLON] = anon_sym_COLON, [anon_sym_function] = anon_sym_function, [anon_sym_primitive] = anon_sym_primitive, - [anon_sym_COLON] = anon_sym_COLON, [anon_sym_var] = anon_sym_var, [anon_sym_import] = anon_sym_import, [sym_source_file] = sym_source_file, @@ -257,11 +259,12 @@ static const TSSymbol ts_symbol_map[] = { [sym_type_declaration] = sym_type_declaration, [sym__type] = sym__type, [sym_type_alias] = sym_type_alias, + [sym_record_type] = sym_record_type, + [sym__typed_field] = sym__typed_field, [sym_function_declaration] = sym_function_declaration, [sym_primitive_declaration] = sym_primitive_declaration, [sym__function_declaration_common] = sym__function_declaration_common, [sym_parameters] = sym_parameters, - [sym__typed_field] = sym__typed_field, [sym_variable_declaration] = sym_variable_declaration, [sym_import_declaration] = sym_import_declaration, [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, @@ -270,7 +273,7 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym_record_expression_repeat1] = aux_sym_record_expression_repeat1, [aux_sym__declaration_chunk_repeat1] = aux_sym__declaration_chunk_repeat1, [aux_sym__declaration_chunk_repeat2] = aux_sym__declaration_chunk_repeat2, - [aux_sym_parameters_repeat1] = aux_sym_parameters_repeat1, + [aux_sym_record_type_repeat1] = aux_sym_record_type_repeat1, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -442,6 +445,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, [anon_sym_function] = { .visible = true, .named = false, @@ -450,10 +457,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_COLON] = { - .visible = true, - .named = false, - }, [anon_sym_var] = { .visible = true, .named = false, @@ -550,6 +553,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_record_type] = { + .visible = true, + .named = true, + }, + [sym__typed_field] = { + .visible = false, + .named = true, + }, [sym_function_declaration] = { .visible = true, .named = true, @@ -566,10 +577,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym__typed_field] = { - .visible = false, - .named = true, - }, [sym_variable_declaration] = { .visible = true, .named = true, @@ -602,7 +609,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_parameters_repeat1] = { + [aux_sym_record_type_repeat1] = { .visible = false, .named = false, }, @@ -697,7 +704,8 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [31] = {.index = 70, .length = 5}, [32] = {.index = 75, .length = 4}, [33] = {.index = 79, .length = 4}, - [34] = {.index = 83, .length = 2}, + [34] = {.index = 83, .length = 4}, + [35] = {.index = 87, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -780,11 +788,11 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_body, 4}, {field_declarations, 1}, [53] = - {field_name, 0}, - {field_type, 2}, - [55] = {field_name, 1, .inherited = true}, {field_type, 1, .inherited = true}, + [55] = + {field_name, 0}, + {field_type, 2}, [57] = {field_name, 1, .inherited = true}, {field_name, 2, .inherited = true}, @@ -813,11 +821,16 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, [79] = + {field_name, 1, .inherited = true}, + {field_name, 2, .inherited = true}, + {field_type, 1, .inherited = true}, + {field_type, 2, .inherited = true}, + [83] = {field_body, 7}, {field_end, 5}, {field_index, 1}, {field_start, 3}, - [83] = + [87] = {field_field, 1}, {field_init, 3}, }; @@ -1382,24 +1395,24 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [65] = {.lex_state = 9}, [66] = {.lex_state = 9}, [67] = {.lex_state = 9}, - [68] = {.lex_state = 9}, - [69] = {.lex_state = 9}, - [70] = {.lex_state = 0}, - [71] = {.lex_state = 0}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 0}, + [70] = {.lex_state = 9}, + [71] = {.lex_state = 9}, [72] = {.lex_state = 9}, - [73] = {.lex_state = 9}, + [73] = {.lex_state = 0}, [74] = {.lex_state = 9}, [75] = {.lex_state = 9}, - [76] = {.lex_state = 0}, + [76] = {.lex_state = 9}, [77] = {.lex_state = 0}, [78] = {.lex_state = 0}, [79] = {.lex_state = 9}, - [80] = {.lex_state = 9}, - [81] = {.lex_state = 0}, - [82] = {.lex_state = 9}, - [83] = {.lex_state = 0}, - [84] = {.lex_state = 0}, - [85] = {.lex_state = 9}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 9}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 9}, + [84] = {.lex_state = 9}, + [85] = {.lex_state = 0}, [86] = {.lex_state = 9}, [87] = {.lex_state = 9}, [88] = {.lex_state = 9}, @@ -1410,47 +1423,53 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [93] = {.lex_state = 9}, [94] = {.lex_state = 9}, [95] = {.lex_state = 9}, - [96] = {.lex_state = 1}, + [96] = {.lex_state = 9}, [97] = {.lex_state = 9}, - [98] = {.lex_state = 1}, - [99] = {.lex_state = 1}, + [98] = {.lex_state = 9}, + [99] = {.lex_state = 9}, [100] = {.lex_state = 9}, - [101] = {.lex_state = 9}, + [101] = {.lex_state = 1}, [102] = {.lex_state = 0}, - [103] = {.lex_state = 0}, - [104] = {.lex_state = 9}, + [103] = {.lex_state = 1}, + [104] = {.lex_state = 1}, [105] = {.lex_state = 0}, [106] = {.lex_state = 0}, [107] = {.lex_state = 0}, [108] = {.lex_state = 0}, [109] = {.lex_state = 9}, [110] = {.lex_state = 0}, - [111] = {.lex_state = 0}, + [111] = {.lex_state = 9}, [112] = {.lex_state = 9}, - [113] = {.lex_state = 0}, - [114] = {.lex_state = 9}, + [113] = {.lex_state = 9}, + [114] = {.lex_state = 0}, [115] = {.lex_state = 0}, - [116] = {.lex_state = 9}, - [117] = {.lex_state = 9}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 0}, [118] = {.lex_state = 0}, [119] = {.lex_state = 0}, - [120] = {.lex_state = 0}, - [121] = {.lex_state = 9}, - [122] = {.lex_state = 0}, - [123] = {.lex_state = 9}, + [120] = {.lex_state = 9}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 9}, + [123] = {.lex_state = 0}, [124] = {.lex_state = 0}, - [125] = {.lex_state = 0}, + [125] = {.lex_state = 9}, [126] = {.lex_state = 9}, - [127] = {.lex_state = 0}, - [128] = {.lex_state = 9}, - [129] = {.lex_state = 9}, + [127] = {.lex_state = 9}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, [130] = {.lex_state = 0}, [131] = {.lex_state = 0}, - [132] = {.lex_state = 0}, - [133] = {.lex_state = 9}, + [132] = {.lex_state = 9}, + [133] = {.lex_state = 0}, [134] = {.lex_state = 9}, [135] = {.lex_state = 0}, [136] = {.lex_state = 9}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 9}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 9}, + [141] = {.lex_state = 9}, + [142] = {.lex_state = 9}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1496,30 +1515,30 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_in] = ACTIONS(1), [anon_sym_end] = ACTIONS(1), [anon_sym_type] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), [anon_sym_function] = ACTIONS(1), [anon_sym_primitive] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), [anon_sym_var] = ACTIONS(1), [anon_sym_import] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(135), - [sym__expr] = STATE(83), - [sym_string_literal] = STATE(83), + [sym_source_file] = STATE(128), + [sym__expr] = STATE(85), + [sym_string_literal] = STATE(85), [sym__lvalue] = STATE(5), [sym_record_value] = STATE(5), [sym_array_value] = STATE(5), - [sym_function_call] = STATE(83), - [sym_unary_expression] = STATE(83), - [sym_binary_expression] = STATE(83), - [sym_sequence_expression] = STATE(83), - [sym_array_expression] = STATE(83), - [sym_record_expression] = STATE(83), - [sym_assignment_expression] = STATE(83), - [sym_if_expression] = STATE(83), - [sym_while_expression] = STATE(83), - [sym_for_expression] = STATE(83), - [sym_let_expression] = STATE(83), + [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(74), [sym__declaration_chunk] = STATE(74), [sym_type_declaration] = STATE(74), @@ -2236,18 +2255,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [758] = 2, + [758] = 3, + ACTIONS(66), 2, + anon_sym_STAR, + anon_sym_SLASH, ACTIONS(132), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(130), 27, + ACTIONS(130), 25, 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, @@ -2268,7 +2288,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [792] = 2, + [794] = 2, ACTIONS(136), 2, anon_sym_LT, anon_sym_GT, @@ -2300,7 +2320,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [826] = 2, + [828] = 2, ACTIONS(140), 2, anon_sym_LT, anon_sym_GT, @@ -2332,7 +2352,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [860] = 2, + [862] = 2, ACTIONS(144), 2, anon_sym_LT, anon_sym_GT, @@ -2364,7 +2384,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [894] = 7, + [896] = 7, ACTIONS(72), 1, anon_sym_AMP, ACTIONS(74), 1, @@ -2401,7 +2421,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [938] = 2, + [940] = 2, ACTIONS(150), 2, anon_sym_LT, anon_sym_GT, @@ -2433,7 +2453,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [972] = 6, + [974] = 6, ACTIONS(72), 1, anon_sym_AMP, ACTIONS(64), 2, @@ -2450,7 +2470,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(152), 18, + ACTIONS(130), 18, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2469,7 +2489,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1014] = 5, + [1016] = 5, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -2484,7 +2504,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(152), 19, + ACTIONS(130), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2504,74 +2524,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1054] = 2, - ACTIONS(156), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(154), 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] = 4, - ACTIONS(64), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(66), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(158), 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, - [1126] = 2, - ACTIONS(158), 2, + [1056] = 2, + ACTIONS(154), 2, anon_sym_LT, anon_sym_GT, ACTIONS(152), 27, @@ -2602,19 +2556,84 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [1160] = 3, + [1090] = 4, + ACTIONS(64), 2, + anon_sym_DASH, + anon_sym_PLUS, ACTIONS(66), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(158), 2, + ACTIONS(132), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(152), 25, + ACTIONS(130), 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, + [1128] = 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, + [1162] = 2, + ACTIONS(158), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(156), 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, @@ -2694,7 +2713,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(73), 13, + STATE(70), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2726,7 +2745,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(21), 1, anon_sym_let, ACTIONS(170), 1, - anon_sym_end, + anon_sym_RPAREN, ACTIONS(168), 3, sym_nil_literal, sym_integer_literal, @@ -2735,7 +2754,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(68), 13, + STATE(73), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2776,7 +2795,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(76), 13, + STATE(68), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2808,7 +2827,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(21), 1, anon_sym_let, ACTIONS(178), 1, - anon_sym_RPAREN, + anon_sym_end, ACTIONS(176), 3, sym_nil_literal, sym_integer_literal, @@ -2895,7 +2914,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(66), 13, + STATE(9), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2934,7 +2953,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(70), 13, + STATE(69), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3051,7 +3070,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(33), 13, + STATE(17), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3090,7 +3109,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(32), 13, + STATE(22), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3129,7 +3148,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(31), 13, + STATE(32), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3168,7 +3187,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(29), 13, + STATE(31), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3207,7 +3226,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(28), 13, + STATE(29), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3246,7 +3265,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(17), 13, + STATE(28), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3285,7 +3304,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(81), 13, + STATE(83), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3324,7 +3343,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(25), 13, + STATE(82), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3363,7 +3382,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(84), 13, + STATE(25), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3402,7 +3421,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(82), 13, + STATE(65), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3441,7 +3460,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(77), 13, + STATE(64), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3480,7 +3499,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(80), 13, + STATE(81), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3519,7 +3538,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(64), 13, + STATE(77), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3558,7 +3577,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(65), 13, + STATE(66), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3597,7 +3616,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(9), 13, + STATE(80), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3636,7 +3655,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(69), 13, + STATE(84), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3675,7 +3694,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(85), 13, + STATE(76), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3714,7 +3733,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(20), 13, + STATE(79), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3753,7 +3772,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(18), 13, + STATE(20), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3792,7 +3811,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(79), 13, + STATE(18), 13, sym__expr, sym_string_literal, sym_function_call, @@ -3917,83 +3936,10 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(253), 1, - anon_sym_SEMI, + anon_sym_COMMA, ACTIONS(255), 1, - anon_sym_end, - STATE(104), 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, - [2859] = 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_LT, - anon_sym_GT, - ACTIONS(257), 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, - [2889] = 9, - ACTIONS(72), 1, - anon_sym_AMP, - ACTIONS(74), 1, - anon_sym_PIPE, - ACTIONS(259), 1, - anon_sym_COMMA, - ACTIONS(261), 1, - anon_sym_RBRACE, - STATE(108), 1, - aux_sym_record_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(263), 1, - anon_sym_COMMA, - ACTIONS(265), 1, - anon_sym_RPAREN, - STATE(102), 1, + STATE(107), 1, aux_sym_function_call_repeat1, ACTIONS(64), 2, anon_sym_DASH, @@ -4009,39 +3955,41 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2957] = 7, - ACTIONS(267), 1, - anon_sym_in, - ACTIONS(269), 1, - anon_sym_type, - ACTIONS(271), 1, - anon_sym_function, - ACTIONS(273), 1, - anon_sym_primitive, - ACTIONS(275), 1, - anon_sym_var, - ACTIONS(277), 1, - anon_sym_import, - STATE(75), 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, - [2987] = 9, + [2859] = 9, ACTIONS(72), 1, anon_sym_AMP, ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(253), 1, + ACTIONS(257), 1, + anon_sym_COMMA, + ACTIONS(259), 1, + anon_sym_RBRACE, + STATE(106), 1, + aux_sym_record_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, + [2893] = 9, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(261), 1, anon_sym_SEMI, - ACTIONS(279), 1, + ACTIONS(263), 1, anon_sym_end, - STATE(101), 1, + STATE(111), 1, aux_sym_sequence_expression_repeat1, ACTIONS(64), 2, anon_sym_DASH, @@ -4057,7 +4005,80 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3021] = 7, + [2927] = 9, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(261), 1, + anon_sym_SEMI, + ACTIONS(265), 1, + anon_sym_end, + STATE(113), 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, + [2961] = 7, + ACTIONS(267), 1, + anon_sym_in, + ACTIONS(269), 1, + anon_sym_type, + ACTIONS(271), 1, + anon_sym_function, + ACTIONS(273), 1, + anon_sym_primitive, + ACTIONS(275), 1, + anon_sym_var, + ACTIONS(277), 1, + anon_sym_import, + STATE(67), 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, + [2991] = 9, + ACTIONS(72), 1, + anon_sym_AMP, + ACTIONS(74), 1, + anon_sym_PIPE, + ACTIONS(261), 1, + anon_sym_SEMI, + ACTIONS(279), 1, + anon_sym_RPAREN, + STATE(105), 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, + [3025] = 7, ACTIONS(269), 1, anon_sym_type, ACTIONS(271), 1, @@ -4080,7 +4101,7 @@ static const uint16_t ts_small_parse_table[] = { sym_import_declaration, aux_sym__declaration_chunk_repeat1, aux_sym__declaration_chunk_repeat2, - [3051] = 7, + [3055] = 7, ACTIONS(269), 1, anon_sym_type, ACTIONS(271), 1, @@ -4093,7 +4114,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_import, ACTIONS(283), 1, anon_sym_in, - STATE(67), 9, + STATE(72), 9, aux_sym__declaration_chunks, sym__declaration_chunk, sym_type_declaration, @@ -4103,17 +4124,11 @@ static const uint16_t ts_small_parse_table[] = { sym_import_declaration, aux_sym__declaration_chunk_repeat1, aux_sym__declaration_chunk_repeat2, - [3081] = 9, + [3085] = 7, ACTIONS(72), 1, anon_sym_AMP, ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(253), 1, - anon_sym_SEMI, - ACTIONS(285), 1, - anon_sym_RPAREN, - STATE(110), 1, - aux_sym_sequence_expression_repeat1, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4123,6 +4138,10 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(70), 2, anon_sym_LT, anon_sym_GT, + ACTIONS(285), 3, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_end, ACTIONS(68), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, @@ -4199,7 +4218,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(293), 1, - anon_sym_do, + anon_sym_RBRACK, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4220,7 +4239,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(295), 1, - anon_sym_RBRACK, + anon_sym_do, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4241,7 +4260,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(74), 1, anon_sym_PIPE, ACTIONS(297), 1, - anon_sym_then, + anon_sym_RBRACK, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4261,8 +4280,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(281), 1, - ts_builtin_sym_end, + ACTIONS(299), 1, + anon_sym_then, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4282,8 +4301,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(299), 1, - anon_sym_RBRACK, + ACTIONS(301), 1, + anon_sym_do, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4303,8 +4322,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, ACTIONS(74), 1, anon_sym_PIPE, - ACTIONS(301), 1, - anon_sym_do, + ACTIONS(281), 1, + ts_builtin_sym_end, ACTIONS(64), 2, anon_sym_DASH, anon_sym_PLUS, @@ -4423,211 +4442,265 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_primitive, anon_sym_var, anon_sym_import, - [3488] = 3, - ACTIONS(332), 1, - anon_sym_DQUOTE, - STATE(98), 1, - aux_sym_string_literal_repeat1, - ACTIONS(334), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [3499] = 3, - ACTIONS(336), 1, - anon_sym_SEMI, - STATE(97), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(257), 2, - anon_sym_RPAREN, - anon_sym_end, - [3510] = 3, - ACTIONS(339), 1, - anon_sym_DQUOTE, - STATE(99), 1, - aux_sym_string_literal_repeat1, - ACTIONS(341), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [3521] = 3, - ACTIONS(343), 1, - anon_sym_DQUOTE, - STATE(99), 1, - aux_sym_string_literal_repeat1, - ACTIONS(345), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [3532] = 3, - ACTIONS(348), 1, + [3488] = 1, + ACTIONS(332), 7, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3498] = 1, + ACTIONS(334), 7, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3508] = 1, + ACTIONS(336), 7, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_type, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3518] = 3, + ACTIONS(338), 1, sym_identifier, - ACTIONS(350), 1, - anon_sym_RPAREN, - STATE(106), 1, - sym__typed_field, - [3542] = 3, - ACTIONS(253), 1, - anon_sym_SEMI, - ACTIONS(352), 1, - anon_sym_end, - STATE(97), 1, - aux_sym_sequence_expression_repeat1, - [3552] = 3, - ACTIONS(263), 1, - anon_sym_COMMA, - ACTIONS(354), 1, - anon_sym_RPAREN, - STATE(107), 1, - aux_sym_function_call_repeat1, - [3562] = 3, - ACTIONS(356), 1, - anon_sym_COMMA, - ACTIONS(359), 1, - anon_sym_RBRACE, - STATE(103), 1, - aux_sym_record_expression_repeat1, - [3572] = 3, - ACTIONS(253), 1, - anon_sym_SEMI, - ACTIONS(361), 1, - anon_sym_end, - STATE(97), 1, - aux_sym_sequence_expression_repeat1, - [3582] = 3, - ACTIONS(363), 1, - anon_sym_COMMA, - ACTIONS(366), 1, - anon_sym_RPAREN, - STATE(105), 1, - aux_sym_parameters_repeat1, - [3592] = 3, - ACTIONS(368), 1, - anon_sym_COMMA, - ACTIONS(370), 1, - anon_sym_RPAREN, - STATE(111), 1, - aux_sym_parameters_repeat1, - [3602] = 3, - ACTIONS(287), 1, - anon_sym_RPAREN, - ACTIONS(372), 1, - anon_sym_COMMA, - STATE(107), 1, - aux_sym_function_call_repeat1, - [3612] = 3, - ACTIONS(259), 1, - anon_sym_COMMA, - ACTIONS(375), 1, - anon_sym_RBRACE, - STATE(103), 1, - aux_sym_record_expression_repeat1, - [3622] = 2, - ACTIONS(377), 1, - sym_identifier, - STATE(95), 2, + ACTIONS(340), 1, + anon_sym_LBRACE, + STATE(95), 3, sym__type, sym_type_alias, - [3630] = 3, - ACTIONS(253), 1, + sym_record_type, + [3530] = 3, + ACTIONS(342), 1, anon_sym_SEMI, - ACTIONS(379), 1, - anon_sym_RPAREN, - STATE(97), 1, + STATE(100), 1, aux_sym_sequence_expression_repeat1, - [3640] = 3, - ACTIONS(368), 1, - anon_sym_COMMA, - ACTIONS(381), 1, + ACTIONS(285), 2, anon_sym_RPAREN, - STATE(105), 1, - aux_sym_parameters_repeat1, - [3650] = 2, - ACTIONS(383), 1, - sym_identifier, - STATE(93), 1, - sym__function_declaration_common, - [3657] = 1, - ACTIONS(385), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [3662] = 2, - ACTIONS(383), 1, - sym_identifier, - STATE(131), 1, - sym__function_declaration_common, - [3669] = 2, - ACTIONS(387), 1, - anon_sym_COLON_EQ, - ACTIONS(389), 1, - anon_sym_COLON, - [3676] = 2, - ACTIONS(348), 1, - sym_identifier, - STATE(120), 1, - sym__typed_field, - [3683] = 2, - ACTIONS(391), 1, - sym_identifier, - ACTIONS(393), 1, - anon_sym_RBRACE, - [3690] = 2, - ACTIONS(9), 1, + anon_sym_end, + [3541] = 3, + ACTIONS(345), 1, anon_sym_DQUOTE, - STATE(92), 1, - sym_string_literal, - [3697] = 2, - ACTIONS(395), 1, - anon_sym_LPAREN, - STATE(91), 1, - sym_parameters, - [3704] = 1, - ACTIONS(397), 2, + STATE(103), 1, + aux_sym_string_literal_repeat1, + ACTIONS(347), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3552] = 3, + ACTIONS(349), 1, + anon_sym_COMMA, + STATE(102), 1, + aux_sym_record_type_repeat1, + ACTIONS(352), 2, + anon_sym_RPAREN, + anon_sym_RBRACE, + [3563] = 3, + ACTIONS(354), 1, + anon_sym_DQUOTE, + STATE(103), 1, + aux_sym_string_literal_repeat1, + ACTIONS(356), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3574] = 3, + ACTIONS(359), 1, + anon_sym_DQUOTE, + STATE(101), 1, + aux_sym_string_literal_repeat1, + ACTIONS(361), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3585] = 3, + ACTIONS(261), 1, + anon_sym_SEMI, + ACTIONS(363), 1, + anon_sym_RPAREN, + STATE(100), 1, + aux_sym_sequence_expression_repeat1, + [3595] = 3, + ACTIONS(257), 1, + anon_sym_COMMA, + ACTIONS(365), 1, + anon_sym_RBRACE, + STATE(110), 1, + aux_sym_record_expression_repeat1, + [3605] = 3, + ACTIONS(253), 1, + anon_sym_COMMA, + ACTIONS(367), 1, + anon_sym_RPAREN, + STATE(108), 1, + aux_sym_function_call_repeat1, + [3615] = 3, + ACTIONS(287), 1, + anon_sym_RPAREN, + ACTIONS(369), 1, + anon_sym_COMMA, + STATE(108), 1, + aux_sym_function_call_repeat1, + [3625] = 3, + ACTIONS(372), 1, + sym_identifier, + ACTIONS(374), 1, + anon_sym_RPAREN, + STATE(118), 1, + sym__typed_field, + [3635] = 3, + ACTIONS(376), 1, + anon_sym_COMMA, + ACTIONS(379), 1, + anon_sym_RBRACE, + STATE(110), 1, + aux_sym_record_expression_repeat1, + [3645] = 3, + ACTIONS(261), 1, + anon_sym_SEMI, + ACTIONS(381), 1, + anon_sym_end, + STATE(100), 1, + aux_sym_sequence_expression_repeat1, + [3655] = 3, + ACTIONS(372), 1, + sym_identifier, + ACTIONS(383), 1, + anon_sym_RBRACE, + STATE(115), 1, + sym__typed_field, + [3665] = 3, + ACTIONS(261), 1, + anon_sym_SEMI, + ACTIONS(385), 1, + anon_sym_end, + STATE(100), 1, + aux_sym_sequence_expression_repeat1, + [3675] = 1, + ACTIONS(387), 3, anon_sym_COMMA, anon_sym_RPAREN, - [3709] = 1, + anon_sym_RBRACE, + [3681] = 3, + ACTIONS(389), 1, + anon_sym_COMMA, + ACTIONS(391), 1, + anon_sym_RBRACE, + STATE(117), 1, + aux_sym_record_type_repeat1, + [3691] = 1, + ACTIONS(393), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACE, + [3697] = 3, + ACTIONS(389), 1, + anon_sym_COMMA, + ACTIONS(395), 1, + anon_sym_RBRACE, + STATE(102), 1, + aux_sym_record_type_repeat1, + [3707] = 3, + ACTIONS(389), 1, + anon_sym_COMMA, + ACTIONS(397), 1, + anon_sym_RPAREN, + STATE(119), 1, + aux_sym_record_type_repeat1, + [3717] = 3, + ACTIONS(389), 1, + anon_sym_COMMA, ACTIONS(399), 1, + anon_sym_RPAREN, + STATE(102), 1, + aux_sym_record_type_repeat1, + [3727] = 2, + ACTIONS(372), 1, sym_identifier, - [3713] = 1, + STATE(114), 1, + sym__typed_field, + [3734] = 2, ACTIONS(401), 1, anon_sym_COLON_EQ, - [3717] = 1, ACTIONS(403), 1, - sym_identifier, - [3721] = 1, - ACTIONS(405), 1, - anon_sym_COLON_EQ, - [3725] = 1, - ACTIONS(407), 1, anon_sym_COLON, - [3729] = 1, - ACTIONS(409), 1, + [3741] = 2, + ACTIONS(405), 1, sym_identifier, - [3733] = 1, + ACTIONS(407), 1, + anon_sym_RBRACE, + [3748] = 2, + ACTIONS(409), 1, + anon_sym_LPAREN, + STATE(90), 1, + sym_parameters, + [3755] = 2, + ACTIONS(9), 1, + anon_sym_DQUOTE, + STATE(97), 1, + sym_string_literal, + [3762] = 2, ACTIONS(411), 1, - anon_sym_EQ, - [3737] = 1, + sym_identifier, + STATE(92), 1, + sym__function_declaration_common, + [3769] = 2, + ACTIONS(411), 1, + sym_identifier, + STATE(133), 1, + sym__function_declaration_common, + [3776] = 1, ACTIONS(413), 1, sym_identifier, - [3741] = 1, + [3780] = 1, ACTIONS(415), 1, - sym_identifier, - [3745] = 1, + ts_builtin_sym_end, + [3784] = 1, ACTIONS(417), 1, - anon_sym_EQ, - [3749] = 1, + anon_sym_COLON, + [3788] = 1, ACTIONS(419), 1, anon_sym_EQ, - [3753] = 1, + [3792] = 1, ACTIONS(421), 1, - anon_sym_EQ, - [3757] = 1, + anon_sym_COLON_EQ, + [3796] = 1, ACTIONS(423), 1, sym_identifier, - [3761] = 1, + [3800] = 1, ACTIONS(425), 1, - sym_identifier, - [3765] = 1, + anon_sym_EQ, + [3804] = 1, ACTIONS(427), 1, - ts_builtin_sym_end, - [3769] = 1, + sym_identifier, + [3808] = 1, ACTIONS(429), 1, + anon_sym_EQ, + [3812] = 1, + ACTIONS(431), 1, + sym_identifier, + [3816] = 1, + ACTIONS(433), 1, + anon_sym_EQ, + [3820] = 1, + ACTIONS(435), 1, + sym_identifier, + [3824] = 1, + ACTIONS(437), 1, + anon_sym_COLON_EQ, + [3828] = 1, + ACTIONS(439), 1, + sym_identifier, + [3832] = 1, + ACTIONS(441), 1, + sym_identifier, + [3836] = 1, + ACTIONS(443), 1, anon_sym_of, }; @@ -4653,17 +4726,17 @@ static const uint32_t ts_small_parse_table_map[] = { [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)] = 1126, - [SMALL_STATE(33)] = 1160, + [SMALL_STATE(23)] = 794, + [SMALL_STATE(24)] = 828, + [SMALL_STATE(25)] = 862, + [SMALL_STATE(26)] = 896, + [SMALL_STATE(27)] = 940, + [SMALL_STATE(28)] = 974, + [SMALL_STATE(29)] = 1016, + [SMALL_STATE(30)] = 1056, + [SMALL_STATE(31)] = 1090, + [SMALL_STATE(32)] = 1128, + [SMALL_STATE(33)] = 1162, [SMALL_STATE(34)] = 1196, [SMALL_STATE(35)] = 1230, [SMALL_STATE(36)] = 1283, @@ -4700,13 +4773,13 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(67)] = 2794, [SMALL_STATE(68)] = 2825, [SMALL_STATE(69)] = 2859, - [SMALL_STATE(70)] = 2889, - [SMALL_STATE(71)] = 2923, - [SMALL_STATE(72)] = 2957, - [SMALL_STATE(73)] = 2987, - [SMALL_STATE(74)] = 3021, - [SMALL_STATE(75)] = 3051, - [SMALL_STATE(76)] = 3081, + [SMALL_STATE(70)] = 2893, + [SMALL_STATE(71)] = 2927, + [SMALL_STATE(72)] = 2961, + [SMALL_STATE(73)] = 2991, + [SMALL_STATE(74)] = 3025, + [SMALL_STATE(75)] = 3055, + [SMALL_STATE(76)] = 3085, [SMALL_STATE(77)] = 3115, [SMALL_STATE(78)] = 3144, [SMALL_STATE(79)] = 3173, @@ -4727,46 +4800,52 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(94)] = 3468, [SMALL_STATE(95)] = 3478, [SMALL_STATE(96)] = 3488, - [SMALL_STATE(97)] = 3499, - [SMALL_STATE(98)] = 3510, - [SMALL_STATE(99)] = 3521, - [SMALL_STATE(100)] = 3532, - [SMALL_STATE(101)] = 3542, + [SMALL_STATE(97)] = 3498, + [SMALL_STATE(98)] = 3508, + [SMALL_STATE(99)] = 3518, + [SMALL_STATE(100)] = 3530, + [SMALL_STATE(101)] = 3541, [SMALL_STATE(102)] = 3552, - [SMALL_STATE(103)] = 3562, - [SMALL_STATE(104)] = 3572, - [SMALL_STATE(105)] = 3582, - [SMALL_STATE(106)] = 3592, - [SMALL_STATE(107)] = 3602, - [SMALL_STATE(108)] = 3612, - [SMALL_STATE(109)] = 3622, - [SMALL_STATE(110)] = 3630, - [SMALL_STATE(111)] = 3640, - [SMALL_STATE(112)] = 3650, - [SMALL_STATE(113)] = 3657, - [SMALL_STATE(114)] = 3662, - [SMALL_STATE(115)] = 3669, - [SMALL_STATE(116)] = 3676, - [SMALL_STATE(117)] = 3683, - [SMALL_STATE(118)] = 3690, - [SMALL_STATE(119)] = 3697, - [SMALL_STATE(120)] = 3704, - [SMALL_STATE(121)] = 3709, - [SMALL_STATE(122)] = 3713, - [SMALL_STATE(123)] = 3717, - [SMALL_STATE(124)] = 3721, - [SMALL_STATE(125)] = 3725, - [SMALL_STATE(126)] = 3729, - [SMALL_STATE(127)] = 3733, - [SMALL_STATE(128)] = 3737, - [SMALL_STATE(129)] = 3741, - [SMALL_STATE(130)] = 3745, - [SMALL_STATE(131)] = 3749, - [SMALL_STATE(132)] = 3753, - [SMALL_STATE(133)] = 3757, - [SMALL_STATE(134)] = 3761, - [SMALL_STATE(135)] = 3765, - [SMALL_STATE(136)] = 3769, + [SMALL_STATE(103)] = 3563, + [SMALL_STATE(104)] = 3574, + [SMALL_STATE(105)] = 3585, + [SMALL_STATE(106)] = 3595, + [SMALL_STATE(107)] = 3605, + [SMALL_STATE(108)] = 3615, + [SMALL_STATE(109)] = 3625, + [SMALL_STATE(110)] = 3635, + [SMALL_STATE(111)] = 3645, + [SMALL_STATE(112)] = 3655, + [SMALL_STATE(113)] = 3665, + [SMALL_STATE(114)] = 3675, + [SMALL_STATE(115)] = 3681, + [SMALL_STATE(116)] = 3691, + [SMALL_STATE(117)] = 3697, + [SMALL_STATE(118)] = 3707, + [SMALL_STATE(119)] = 3717, + [SMALL_STATE(120)] = 3727, + [SMALL_STATE(121)] = 3734, + [SMALL_STATE(122)] = 3741, + [SMALL_STATE(123)] = 3748, + [SMALL_STATE(124)] = 3755, + [SMALL_STATE(125)] = 3762, + [SMALL_STATE(126)] = 3769, + [SMALL_STATE(127)] = 3776, + [SMALL_STATE(128)] = 3780, + [SMALL_STATE(129)] = 3784, + [SMALL_STATE(130)] = 3788, + [SMALL_STATE(131)] = 3792, + [SMALL_STATE(132)] = 3796, + [SMALL_STATE(133)] = 3800, + [SMALL_STATE(134)] = 3804, + [SMALL_STATE(135)] = 3808, + [SMALL_STATE(136)] = 3812, + [SMALL_STATE(137)] = 3816, + [SMALL_STATE(138)] = 3820, + [SMALL_STATE(139)] = 3824, + [SMALL_STATE(140)] = 3828, + [SMALL_STATE(141)] = 3832, + [SMALL_STATE(142)] = 3836, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -4774,40 +4853,40 @@ 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(83), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(123), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(133), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), - [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), - [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(118), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(136), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(132), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(126), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(125), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(52), - [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(58), + [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), [44] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 17), [46] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 17), [48] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 8), [50] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 8), [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), [58] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 22), - [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), [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 = 25), @@ -4815,8 +4894,8 @@ static const TSParseActionEntry ts_parse_actions[] = { [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 24), [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 23), [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 23), - [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 4), + [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 4), [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), @@ -4827,16 +4906,16 @@ static const TSParseActionEntry ts_parse_actions[] = { [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 = 33), + [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 34), [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(58), + [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), [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_record_expression, 3, .production_id = 5), - [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 7), [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 31), [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 31), [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), @@ -4844,141 +4923,148 @@ static const TSParseActionEntry ts_parse_actions[] = { [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_string_literal, 3), - [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), - [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), - [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 7), - [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(73), - [166] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), - [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), - [172] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), + [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [166] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [172] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [178] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), - [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), - [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), [188] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [190] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), - [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), - [204] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), - [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), - [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), - [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), - [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), - [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), - [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), - [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), - [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 15), - [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 16), + [190] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), + [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), + [204] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), + [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), + [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [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_variable_declaration, 6, .production_id = 30), [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(133), - [241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(114), - [244] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(112), - [247] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(128), - [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(118), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [238] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(132), + [241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(126), + [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(140), + [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(124), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 34), - [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 35), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), [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(114), - [308] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(112), + [305] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat2, 2), SHIFT_REPEAT(126), + [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(133), - [316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 4, .production_id = 28), - [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 21), - [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 2, .production_id = 6), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 3), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_declaration, 2, .production_id = 2), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias, 1), + [313] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), SHIFT_REPEAT(132), + [316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), + [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 4, .production_id = 28), + [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 2, .production_id = 6), + [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 21), + [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_declaration, 2, .production_id = 2), + [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias, 1), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 3, .production_id = 26), [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_declaration, 4, .production_id = 15), - [332] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), - [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), - [336] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(59), - [339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [343] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [345] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(99), - [348] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), - [350] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [352] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [354] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [356] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), SHIFT_REPEAT(121), - [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), - [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [363] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 29), SHIFT_REPEAT(116), - [366] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 29), - [368] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [370] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), - [372] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(54), - [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), - [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__typed_field, 3, .production_id = 26), - [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [389] = {.entry = {.count = 1, .reusable = false}}, SHIFT(129), - [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 27), - [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), - [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), - [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), - [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), - [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), - [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), - [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), - [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [427] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 4, .production_id = 33), + [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 3), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 2), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [342] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(60), + [345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [349] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 29), SHIFT_REPEAT(120), + [352] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 29), + [354] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [356] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(103), + [359] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [369] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(56), + [372] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [374] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [376] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), SHIFT_REPEAT(141), + [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, .production_id = 26), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__typed_field, 3, .production_id = 27), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [403] = {.entry = {.count = 1, .reusable = false}}, SHIFT(134), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [415] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), }; #ifdef __cplusplus diff --git a/test/corpus/declarations.txt b/test/corpus/declarations.txt index d32bf82..3108e0f 100644 --- a/test/corpus/declarations.txt +++ b/test/corpus/declarations.txt @@ -20,6 +20,67 @@ type alias = int value: (type_alias (identifier)))) +================================================================================ +Record type declaration +================================================================================ + +type record = { a: int, b: str } + +-------------------------------------------------------------------------------- + +(source_file + (type_declaration + name: (identifier) + value: (record_type + name: (identifier) + type: (identifier) + name: (identifier) + type: (identifier)))) + +================================================================================ +Record type declaration single field +================================================================================ + +type record = { a: int } + +-------------------------------------------------------------------------------- + +(source_file + (type_declaration + name: (identifier) + value: (record_type + name: (identifier) + type: (identifier)))) + +================================================================================ +Record type declaration no fields +================================================================================ + +type record = { } + +-------------------------------------------------------------------------------- + +(source_file + (type_declaration + name: (identifier) + value: (record_type))) + +================================================================================ +Record type declaration trailing comma +================================================================================ + +type record = { a: int, } + +-------------------------------------------------------------------------------- + +(source_file + (type_declaration + name: (identifier) + value: (record_type + name: (identifier) + type: (identifier) + (ERROR)))) + ================================================================================ Function declaration ================================================================================