diff --git a/bindings/dust b/bindings/dust index 3182e7c..b308c18 160000 --- a/bindings/dust +++ b/bindings/dust @@ -1 +1 @@ -Subproject commit 3182e7c860ac74d1d4e2846152eef45c4111bd63 +Subproject commit b308c1852f76d21ca52c69620975590fd4871818 diff --git a/grammar.js b/grammar.js index 8f67a4b..21df40b 100644 --- a/grammar.js +++ b/grammar.js @@ -21,10 +21,10 @@ module.exports = grammar({ open_statement: $ => prec.left(seq($.expression)), expression: $ => choice( + $.value, + $.identifier, prec(0, $.control_flow), - prec(1, $.value), - prec(2, $.identifier), - prec(3, $.operation), + prec(1, $.operation), ), close: $ => ";", diff --git a/src/grammar.json b/src/grammar.json index 3e05fb7..cd4d559 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -92,20 +92,12 @@ } }, { - "type": "PREC", - "value": 1, - "content": { - "type": "SYMBOL", - "name": "value" - } + "type": "SYMBOL", + "name": "value" }, { - "type": "PREC", - "value": 2, - "content": { - "type": "SYMBOL", - "name": "identifier" - } + "type": "SYMBOL", + "name": "identifier" }, { "type": "PREC", diff --git a/src/parser.c b/src/parser.c index db1f9ed..30a0b23 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,7 +6,7 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 80 +#define STATE_COUNT 77 #define LARGE_STATE_COUNT 12 #define SYMBOL_COUNT 36 #define ALIAS_COUNT 0 @@ -302,72 +302,69 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [11] = 6, [12] = 12, [13] = 13, - [14] = 13, + [14] = 14, [15] = 15, [16] = 16, [17] = 17, [18] = 18, [19] = 19, [20] = 20, - [21] = 21, - [22] = 22, - [23] = 13, - [24] = 20, + [21] = 12, + [22] = 13, + [23] = 19, + [24] = 24, [25] = 25, - [26] = 26, - [27] = 12, - [28] = 22, - [29] = 21, - [30] = 22, - [31] = 31, - [32] = 25, - [33] = 33, - [34] = 18, - [35] = 17, - [36] = 33, - [37] = 33, - [38] = 19, - [39] = 18, - [40] = 31, - [41] = 31, - [42] = 17, - [43] = 33, - [44] = 26, - [45] = 16, - [46] = 46, - [47] = 15, - [48] = 31, + [26] = 13, + [27] = 14, + [28] = 17, + [29] = 14, + [30] = 30, + [31] = 24, + [32] = 32, + [33] = 17, + [34] = 16, + [35] = 32, + [36] = 32, + [37] = 18, + [38] = 30, + [39] = 30, + [40] = 16, + [41] = 32, + [42] = 25, + [43] = 15, + [44] = 44, + [45] = 20, + [46] = 30, + [47] = 47, + [48] = 47, [49] = 49, - [50] = 50, - [51] = 49, - [52] = 49, + [50] = 47, + [51] = 51, + [52] = 52, [53] = 53, - [54] = 54, - [55] = 53, - [56] = 53, + [54] = 52, + [55] = 52, + [56] = 56, [57] = 57, [58] = 58, - [59] = 59, - [60] = 60, + [59] = 13, + [60] = 12, [61] = 13, - [62] = 12, - [63] = 13, + [62] = 24, + [63] = 44, [64] = 20, - [65] = 46, - [66] = 21, - [67] = 26, + [65] = 19, + [66] = 15, + [67] = 18, [68] = 25, - [69] = 15, - [70] = 16, - [71] = 19, - [72] = 20, - [73] = 12, - [74] = 74, - [75] = 74, - [76] = 74, - [77] = 74, - [78] = 78, - [79] = 79, + [69] = 12, + [70] = 19, + [71] = 71, + [72] = 71, + [73] = 71, + [74] = 71, + [75] = 75, + [76] = 76, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -748,28 +745,28 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [11] = {.lex_state = 17}, [12] = {.lex_state = 16}, [13] = {.lex_state = 16}, - [14] = {.lex_state = 17}, + [14] = {.lex_state = 16}, [15] = {.lex_state = 16}, [16] = {.lex_state = 16}, [17] = {.lex_state = 16}, [18] = {.lex_state = 16}, [19] = {.lex_state = 16}, [20] = {.lex_state = 16}, - [21] = {.lex_state = 16}, - [22] = {.lex_state = 16}, - [23] = {.lex_state = 17}, + [21] = {.lex_state = 17}, + [22] = {.lex_state = 17}, + [23] = {.lex_state = 16}, [24] = {.lex_state = 16}, [25] = {.lex_state = 16}, - [26] = {.lex_state = 16}, - [27] = {.lex_state = 17}, - [28] = {.lex_state = 0}, + [26] = {.lex_state = 17}, + [27] = {.lex_state = 0}, + [28] = {.lex_state = 17}, [29] = {.lex_state = 17}, [30] = {.lex_state = 17}, [31] = {.lex_state = 17}, [32] = {.lex_state = 17}, - [33] = {.lex_state = 17}, + [33] = {.lex_state = 0}, [34] = {.lex_state = 0}, - [35] = {.lex_state = 0}, + [35] = {.lex_state = 17}, [36] = {.lex_state = 17}, [37] = {.lex_state = 17}, [38] = {.lex_state = 17}, @@ -781,19 +778,19 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [44] = {.lex_state = 17}, [45] = {.lex_state = 17}, [46] = {.lex_state = 17}, - [47] = {.lex_state = 17}, - [48] = {.lex_state = 17}, + [47] = {.lex_state = 0}, + [48] = {.lex_state = 0}, [49] = {.lex_state = 0}, [50] = {.lex_state = 0}, - [51] = {.lex_state = 0}, + [51] = {.lex_state = 17}, [52] = {.lex_state = 0}, - [53] = {.lex_state = 0}, - [54] = {.lex_state = 17}, + [53] = {.lex_state = 17}, + [54] = {.lex_state = 0}, [55] = {.lex_state = 0}, [56] = {.lex_state = 0}, [57] = {.lex_state = 17}, [58] = {.lex_state = 0}, - [59] = {.lex_state = 17}, + [59] = {.lex_state = 0}, [60] = {.lex_state = 0}, [61] = {.lex_state = 0}, [62] = {.lex_state = 0}, @@ -810,10 +807,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [73] = {.lex_state = 0}, [74] = {.lex_state = 0}, [75] = {.lex_state = 0}, - [76] = {.lex_state = 0}, - [77] = {.lex_state = 0}, - [78] = {.lex_state = 0}, - [79] = {.lex_state = 20}, + [76] = {.lex_state = 20}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -839,18 +833,18 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_else] = ACTIONS(1), }, [1] = { - [sym_root] = STATE(78), + [sym_root] = STATE(75), [sym_item] = STATE(2), - [sym_comment] = STATE(57), - [sym_statement] = STATE(57), - [sym_closed_statement] = STATE(44), - [sym_open_statement] = STATE(44), - [sym_expression] = STATE(23), - [sym_value] = STATE(45), - [sym_boolean] = STATE(39), - [sym_list] = STATE(39), - [sym_operation] = STATE(47), - [sym_control_flow] = STATE(29), + [sym_comment] = STATE(53), + [sym_statement] = STATE(53), + [sym_closed_statement] = STATE(42), + [sym_open_statement] = STATE(42), + [sym_expression] = STATE(22), + [sym_value] = STATE(37), + [sym_boolean] = STATE(28), + [sym_list] = STATE(28), + [sym_operation] = STATE(43), + [sym_control_flow] = STATE(45), [aux_sym_root_repeat1] = STATE(2), [anon_sym_POUND] = ACTIONS(3), [sym_identifier] = ACTIONS(5), @@ -866,16 +860,16 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }, [2] = { [sym_item] = STATE(3), - [sym_comment] = STATE(57), - [sym_statement] = STATE(57), - [sym_closed_statement] = STATE(44), - [sym_open_statement] = STATE(44), - [sym_expression] = STATE(23), - [sym_value] = STATE(45), - [sym_boolean] = STATE(39), - [sym_list] = STATE(39), - [sym_operation] = STATE(47), - [sym_control_flow] = STATE(29), + [sym_comment] = STATE(53), + [sym_statement] = STATE(53), + [sym_closed_statement] = STATE(42), + [sym_open_statement] = STATE(42), + [sym_expression] = STATE(22), + [sym_value] = STATE(37), + [sym_boolean] = STATE(28), + [sym_list] = STATE(28), + [sym_operation] = STATE(43), + [sym_control_flow] = STATE(45), [aux_sym_root_repeat1] = STATE(3), [ts_builtin_sym_end] = ACTIONS(17), [anon_sym_POUND] = ACTIONS(3), @@ -892,16 +886,16 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }, [3] = { [sym_item] = STATE(3), - [sym_comment] = STATE(57), - [sym_statement] = STATE(57), - [sym_closed_statement] = STATE(44), - [sym_open_statement] = STATE(44), - [sym_expression] = STATE(23), - [sym_value] = STATE(45), - [sym_boolean] = STATE(39), - [sym_list] = STATE(39), - [sym_operation] = STATE(47), - [sym_control_flow] = STATE(29), + [sym_comment] = STATE(53), + [sym_statement] = STATE(53), + [sym_closed_statement] = STATE(42), + [sym_open_statement] = STATE(42), + [sym_expression] = STATE(22), + [sym_value] = STATE(37), + [sym_boolean] = STATE(28), + [sym_list] = STATE(28), + [sym_operation] = STATE(43), + [sym_control_flow] = STATE(45), [aux_sym_root_repeat1] = STATE(3), [ts_builtin_sym_end] = ACTIONS(19), [anon_sym_POUND] = ACTIONS(21), @@ -917,15 +911,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(39), }, [4] = { - [sym_statement] = STATE(20), - [sym_closed_statement] = STATE(26), - [sym_open_statement] = STATE(26), + [sym_statement] = STATE(19), + [sym_closed_statement] = STATE(25), + [sym_open_statement] = STATE(25), [sym_expression] = STATE(13), - [sym_value] = STATE(16), - [sym_boolean] = STATE(18), - [sym_list] = STATE(18), + [sym_value] = STATE(18), + [sym_boolean] = STATE(17), + [sym_list] = STATE(17), [sym_operation] = STATE(15), - [sym_control_flow] = STATE(21), + [sym_control_flow] = STATE(20), [sym_identifier] = ACTIONS(42), [sym_float] = ACTIONS(44), [sym_integer] = ACTIONS(46), @@ -938,15 +932,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(52), }, [5] = { - [sym_statement] = STATE(64), - [sym_closed_statement] = STATE(67), - [sym_open_statement] = STATE(67), - [sym_expression] = STATE(63), - [sym_value] = STATE(70), - [sym_boolean] = STATE(34), - [sym_list] = STATE(34), - [sym_operation] = STATE(69), - [sym_control_flow] = STATE(66), + [sym_statement] = STATE(65), + [sym_closed_statement] = STATE(68), + [sym_open_statement] = STATE(68), + [sym_expression] = STATE(61), + [sym_value] = STATE(67), + [sym_boolean] = STATE(33), + [sym_list] = STATE(33), + [sym_operation] = STATE(66), + [sym_control_flow] = STATE(64), [sym_identifier] = ACTIONS(54), [sym_float] = ACTIONS(56), [sym_integer] = ACTIONS(58), @@ -959,15 +953,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(64), }, [6] = { - [sym_statement] = STATE(68), - [sym_closed_statement] = STATE(67), - [sym_open_statement] = STATE(67), - [sym_expression] = STATE(63), - [sym_value] = STATE(70), - [sym_boolean] = STATE(34), - [sym_list] = STATE(34), - [sym_operation] = STATE(69), - [sym_control_flow] = STATE(66), + [sym_statement] = STATE(62), + [sym_closed_statement] = STATE(68), + [sym_open_statement] = STATE(68), + [sym_expression] = STATE(61), + [sym_value] = STATE(67), + [sym_boolean] = STATE(33), + [sym_list] = STATE(33), + [sym_operation] = STATE(66), + [sym_control_flow] = STATE(64), [sym_identifier] = ACTIONS(54), [sym_float] = ACTIONS(56), [sym_integer] = ACTIONS(58), @@ -980,15 +974,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(64), }, [7] = { - [sym_statement] = STATE(24), - [sym_closed_statement] = STATE(26), - [sym_open_statement] = STATE(26), + [sym_statement] = STATE(23), + [sym_closed_statement] = STATE(25), + [sym_open_statement] = STATE(25), [sym_expression] = STATE(13), - [sym_value] = STATE(16), - [sym_boolean] = STATE(18), - [sym_list] = STATE(18), + [sym_value] = STATE(18), + [sym_boolean] = STATE(17), + [sym_list] = STATE(17), [sym_operation] = STATE(15), - [sym_control_flow] = STATE(21), + [sym_control_flow] = STATE(20), [sym_identifier] = ACTIONS(42), [sym_float] = ACTIONS(44), [sym_integer] = ACTIONS(46), @@ -1001,15 +995,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(52), }, [8] = { - [sym_statement] = STATE(72), - [sym_closed_statement] = STATE(67), - [sym_open_statement] = STATE(67), - [sym_expression] = STATE(61), - [sym_value] = STATE(70), - [sym_boolean] = STATE(34), - [sym_list] = STATE(34), - [sym_operation] = STATE(69), - [sym_control_flow] = STATE(66), + [sym_statement] = STATE(70), + [sym_closed_statement] = STATE(68), + [sym_open_statement] = STATE(68), + [sym_expression] = STATE(59), + [sym_value] = STATE(67), + [sym_boolean] = STATE(33), + [sym_list] = STATE(33), + [sym_operation] = STATE(66), + [sym_control_flow] = STATE(64), [sym_identifier] = ACTIONS(54), [sym_float] = ACTIONS(56), [sym_integer] = ACTIONS(58), @@ -1022,15 +1016,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(64), }, [9] = { - [sym_statement] = STATE(32), - [sym_closed_statement] = STATE(44), - [sym_open_statement] = STATE(44), - [sym_expression] = STATE(14), - [sym_value] = STATE(45), - [sym_boolean] = STATE(39), - [sym_list] = STATE(39), - [sym_operation] = STATE(47), - [sym_control_flow] = STATE(29), + [sym_statement] = STATE(31), + [sym_closed_statement] = STATE(42), + [sym_open_statement] = STATE(42), + [sym_expression] = STATE(26), + [sym_value] = STATE(37), + [sym_boolean] = STATE(28), + [sym_list] = STATE(28), + [sym_operation] = STATE(43), + [sym_control_flow] = STATE(45), [sym_identifier] = ACTIONS(5), [sym_float] = ACTIONS(7), [sym_integer] = ACTIONS(9), @@ -1043,15 +1037,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(15), }, [10] = { - [sym_statement] = STATE(25), - [sym_closed_statement] = STATE(26), - [sym_open_statement] = STATE(26), + [sym_statement] = STATE(24), + [sym_closed_statement] = STATE(25), + [sym_open_statement] = STATE(25), [sym_expression] = STATE(13), - [sym_value] = STATE(16), - [sym_boolean] = STATE(18), - [sym_list] = STATE(18), + [sym_value] = STATE(18), + [sym_boolean] = STATE(17), + [sym_list] = STATE(17), [sym_operation] = STATE(15), - [sym_control_flow] = STATE(21), + [sym_control_flow] = STATE(20), [sym_identifier] = ACTIONS(42), [sym_float] = ACTIONS(44), [sym_integer] = ACTIONS(46), @@ -1064,15 +1058,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(52), }, [11] = { - [sym_statement] = STATE(68), - [sym_closed_statement] = STATE(67), - [sym_open_statement] = STATE(67), - [sym_expression] = STATE(61), - [sym_value] = STATE(70), - [sym_boolean] = STATE(34), - [sym_list] = STATE(34), - [sym_operation] = STATE(69), - [sym_control_flow] = STATE(66), + [sym_statement] = STATE(62), + [sym_closed_statement] = STATE(68), + [sym_open_statement] = STATE(68), + [sym_expression] = STATE(59), + [sym_value] = STATE(67), + [sym_boolean] = STATE(33), + [sym_list] = STATE(33), + [sym_operation] = STATE(66), + [sym_control_flow] = STATE(64), [sym_identifier] = ACTIONS(54), [sym_float] = ACTIONS(56), [sym_integer] = ACTIONS(58), @@ -1088,7 +1082,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { static const uint16_t ts_small_parse_table[] = { [0] = 3, - STATE(48), 1, + STATE(46), 1, sym_operator, ACTIONS(68), 7, sym_identifier, @@ -1110,7 +1104,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_EQ, [25] = 3, - STATE(48), 1, + STATE(46), 1, sym_operator, ACTIONS(72), 7, sym_identifier, @@ -1131,28 +1125,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [50] = 3, - STATE(41), 1, - sym_operator, - ACTIONS(72), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - ACTIONS(70), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [74] = 2, + [50] = 2, ACTIONS(76), 7, sym_identifier, sym_integer, @@ -1172,27 +1145,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [96] = 2, - ACTIONS(76), 7, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - anon_sym_else, - ACTIONS(74), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [118] = 2, + [72] = 2, ACTIONS(80), 7, sym_identifier, sym_integer, @@ -1212,7 +1165,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [140] = 2, + [94] = 2, ACTIONS(84), 7, sym_identifier, sym_integer, @@ -1232,8 +1185,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [162] = 2, - ACTIONS(76), 7, + [116] = 2, + ACTIONS(88), 7, sym_identifier, sym_integer, anon_sym_true, @@ -1241,27 +1194,6 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_if, anon_sym_else, - ACTIONS(74), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [184] = 3, - ACTIONS(90), 1, - anon_sym_else, - ACTIONS(88), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, ACTIONS(86), 10, ts_builtin_sym_end, anon_sym_POUND, @@ -1273,8 +1205,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [208] = 2, - ACTIONS(76), 7, + [138] = 2, + ACTIONS(80), 7, sym_identifier, sym_integer, anon_sym_true, @@ -1282,7 +1214,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_if, anon_sym_else, - ACTIONS(74), 10, + ACTIONS(78), 10, ts_builtin_sym_end, anon_sym_POUND, sym_close, @@ -1293,8 +1225,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [230] = 2, - ACTIONS(94), 7, + [160] = 3, + ACTIONS(94), 1, + anon_sym_else, + ACTIONS(92), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + ACTIONS(90), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [184] = 2, + ACTIONS(80), 7, sym_identifier, sym_integer, anon_sym_true, @@ -1302,7 +1255,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_if, anon_sym_else, - ACTIONS(92), 10, + ACTIONS(78), 10, ts_builtin_sym_end, anon_sym_POUND, sym_close, @@ -1313,92 +1266,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [252] = 5, - ACTIONS(96), 1, - sym_close, - STATE(41), 1, - sym_operator, - ACTIONS(98), 3, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - ACTIONS(70), 6, - ts_builtin_sym_end, - anon_sym_POUND, - sym_float, - sym_string, - sym_function, - sym_empty, - ACTIONS(72), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - [280] = 3, - ACTIONS(100), 1, - anon_sym_else, - ACTIONS(88), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - ACTIONS(86), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [304] = 2, - ACTIONS(104), 7, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - anon_sym_else, - ACTIONS(102), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [326] = 2, - ACTIONS(108), 7, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - anon_sym_else, - ACTIONS(106), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [348] = 3, - STATE(41), 1, + [206] = 3, + STATE(39), 1, sym_operator, ACTIONS(68), 6, sym_identifier, @@ -1418,11 +1287,116 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [372] = 2, - ACTIONS(94), 2, + [230] = 5, + ACTIONS(96), 1, + sym_close, + STATE(39), 1, + sym_operator, + ACTIONS(98), 3, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + ACTIONS(70), 6, + ts_builtin_sym_end, + anon_sym_POUND, + sym_float, + sym_string, + sym_function, + sym_empty, + ACTIONS(72), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + [258] = 3, + ACTIONS(100), 1, + anon_sym_else, + ACTIONS(92), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + ACTIONS(90), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [282] = 2, + ACTIONS(104), 7, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_else, + ACTIONS(102), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [304] = 2, + ACTIONS(108), 7, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_else, + ACTIONS(106), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [326] = 3, + STATE(39), 1, + sym_operator, + ACTIONS(72), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + ACTIONS(70), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [350] = 2, + ACTIONS(76), 2, sym_integer, anon_sym_LPAREN, - ACTIONS(92), 14, + ACTIONS(74), 14, sym_close, sym_float, sym_string, @@ -1437,7 +1411,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [393] = 2, + [371] = 2, + ACTIONS(88), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + ACTIONS(86), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [392] = 2, ACTIONS(76), 6, sym_identifier, sym_integer, @@ -1456,26 +1449,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [414] = 2, - ACTIONS(94), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - ACTIONS(92), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [435] = 11, + [413] = 11, ACTIONS(54), 1, sym_identifier, ACTIONS(58), 1, @@ -1484,18 +1458,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(64), 1, anon_sym_if, - STATE(62), 1, + STATE(60), 1, sym_expression, - STATE(66), 1, + STATE(64), 1, sym_control_flow, - STATE(69), 1, + STATE(66), 1, sym_operation, - STATE(70), 1, + STATE(67), 1, sym_value, ACTIONS(60), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1503,7 +1477,7 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [474] = 2, + [452] = 2, ACTIONS(104), 6, sym_identifier, sym_integer, @@ -1522,7 +1496,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [495] = 11, + [473] = 11, ACTIONS(54), 1, sym_identifier, ACTIONS(58), 1, @@ -1531,18 +1505,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(110), 1, anon_sym_if, - STATE(66), 1, + STATE(64), 1, sym_control_flow, - STATE(69), 1, + STATE(66), 1, sym_operation, - STATE(70), 1, + STATE(67), 1, sym_value, - STATE(76), 1, + STATE(73), 1, sym_expression, ACTIONS(60), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1550,7 +1524,26 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [534] = 2, + [512] = 2, + ACTIONS(88), 2, + sym_integer, + anon_sym_LPAREN, + ACTIONS(86), 14, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_true, + anon_sym_false, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + anon_sym_then, + anon_sym_else, + [533] = 2, ACTIONS(84), 2, sym_integer, anon_sym_LPAREN, @@ -1569,26 +1562,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [555] = 2, - ACTIONS(80), 2, - sym_integer, - anon_sym_LPAREN, - ACTIONS(78), 14, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_true, - anon_sym_false, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - anon_sym_then, - anon_sym_else, - [576] = 11, + [554] = 11, ACTIONS(54), 1, sym_identifier, ACTIONS(58), 1, @@ -1597,18 +1571,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(110), 1, anon_sym_if, - STATE(66), 1, + STATE(64), 1, sym_control_flow, - STATE(69), 1, + STATE(66), 1, sym_operation, - STATE(70), 1, + STATE(67), 1, sym_value, - STATE(75), 1, + STATE(72), 1, sym_expression, ACTIONS(60), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1616,7 +1590,7 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [615] = 11, + [593] = 11, ACTIONS(54), 1, sym_identifier, ACTIONS(58), 1, @@ -1625,18 +1599,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(110), 1, anon_sym_if, - STATE(66), 1, + STATE(64), 1, sym_control_flow, - STATE(69), 1, + STATE(66), 1, sym_operation, - STATE(70), 1, + STATE(67), 1, sym_value, - STATE(74), 1, + STATE(71), 1, sym_expression, ACTIONS(60), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1644,101 +1618,7 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [654] = 2, - ACTIONS(76), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - ACTIONS(74), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [675] = 2, - ACTIONS(84), 6, - sym_identifier, - sym_integer, - anon_sym_true, - anon_sym_false, - anon_sym_LPAREN, - anon_sym_if, - ACTIONS(82), 10, - ts_builtin_sym_end, - anon_sym_POUND, - sym_close, - sym_float, - sym_string, - sym_function, - sym_empty, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - [696] = 11, - ACTIONS(54), 1, - sym_identifier, - ACTIONS(58), 1, - sym_integer, - ACTIONS(62), 1, - anon_sym_LPAREN, - ACTIONS(110), 1, - anon_sym_if, - STATE(66), 1, - sym_control_flow, - STATE(69), 1, - sym_operation, - STATE(70), 1, - sym_value, - STATE(73), 1, - sym_expression, - ACTIONS(60), 2, - anon_sym_true, - anon_sym_false, - STATE(34), 2, - sym_boolean, - sym_list, - ACTIONS(56), 4, - sym_float, - sym_string, - sym_function, - sym_empty, - [735] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - sym_integer, - ACTIONS(13), 1, - anon_sym_LPAREN, - ACTIONS(15), 1, - anon_sym_if, - STATE(27), 1, - sym_expression, - STATE(29), 1, - sym_control_flow, - STATE(45), 1, - sym_value, - STATE(47), 1, - sym_operation, - ACTIONS(11), 2, - anon_sym_true, - anon_sym_false, - STATE(39), 2, - sym_boolean, - sym_list, - ACTIONS(7), 4, - sym_float, - sym_string, - sym_function, - sym_empty, - [774] = 2, + [632] = 2, ACTIONS(80), 6, sym_identifier, sym_integer, @@ -1757,7 +1637,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [795] = 11, + [653] = 11, ACTIONS(54), 1, sym_identifier, ACTIONS(58), 1, @@ -1766,18 +1646,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(110), 1, anon_sym_if, - STATE(66), 1, + STATE(64), 1, sym_control_flow, - STATE(69), 1, + STATE(66), 1, sym_operation, - STATE(70), 1, + STATE(67), 1, sym_value, - STATE(77), 1, + STATE(69), 1, sym_expression, ACTIONS(60), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1785,7 +1665,82 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [834] = 2, + [692] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + sym_integer, + ACTIONS(13), 1, + anon_sym_LPAREN, + ACTIONS(15), 1, + anon_sym_if, + STATE(21), 1, + sym_expression, + STATE(37), 1, + sym_value, + STATE(43), 1, + sym_operation, + STATE(45), 1, + sym_control_flow, + ACTIONS(11), 2, + anon_sym_true, + anon_sym_false, + STATE(28), 2, + sym_boolean, + sym_list, + ACTIONS(7), 4, + sym_float, + sym_string, + sym_function, + sym_empty, + [731] = 2, + ACTIONS(84), 6, + sym_identifier, + sym_integer, + anon_sym_true, + anon_sym_false, + anon_sym_LPAREN, + anon_sym_if, + ACTIONS(82), 10, + ts_builtin_sym_end, + anon_sym_POUND, + sym_close, + sym_float, + sym_string, + sym_function, + sym_empty, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + [752] = 11, + ACTIONS(54), 1, + sym_identifier, + ACTIONS(58), 1, + sym_integer, + ACTIONS(62), 1, + anon_sym_LPAREN, + ACTIONS(110), 1, + anon_sym_if, + STATE(64), 1, + sym_control_flow, + STATE(66), 1, + sym_operation, + STATE(67), 1, + sym_value, + STATE(74), 1, + sym_expression, + ACTIONS(60), 2, + anon_sym_true, + anon_sym_false, + STATE(33), 2, + sym_boolean, + sym_list, + ACTIONS(56), 4, + sym_float, + sym_string, + sym_function, + sym_empty, + [791] = 2, ACTIONS(108), 6, sym_identifier, sym_integer, @@ -1804,15 +1759,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [855] = 2, - ACTIONS(76), 6, + [812] = 2, + ACTIONS(80), 6, sym_identifier, sym_integer, anon_sym_true, anon_sym_false, anon_sym_LPAREN, anon_sym_if, - ACTIONS(74), 10, + ACTIONS(78), 10, ts_builtin_sym_end, anon_sym_POUND, sym_close, @@ -1823,7 +1778,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [876] = 2, + [833] = 2, ACTIONS(114), 6, sym_identifier, sym_integer, @@ -1842,15 +1797,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [897] = 2, - ACTIONS(76), 6, + [854] = 2, + ACTIONS(80), 6, sym_identifier, sym_integer, anon_sym_true, anon_sym_false, anon_sym_LPAREN, anon_sym_if, - ACTIONS(74), 10, + ACTIONS(78), 10, ts_builtin_sym_end, anon_sym_POUND, sym_close, @@ -1861,7 +1816,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [918] = 11, + [875] = 11, ACTIONS(42), 1, sym_identifier, ACTIONS(46), 1, @@ -1874,14 +1829,14 @@ static const uint16_t ts_small_parse_table[] = { sym_expression, STATE(15), 1, sym_operation, - STATE(16), 1, + STATE(18), 1, sym_value, - STATE(21), 1, + STATE(20), 1, sym_control_flow, ACTIONS(48), 2, anon_sym_true, anon_sym_false, - STATE(18), 2, + STATE(17), 2, sym_boolean, sym_list, ACTIONS(44), 4, @@ -1889,21 +1844,21 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [957] = 8, + [914] = 8, ACTIONS(58), 1, sym_integer, ACTIONS(62), 1, anon_sym_LPAREN, ACTIONS(118), 1, anon_sym_RPAREN, - STATE(50), 1, + STATE(49), 1, aux_sym_list_repeat1, - STATE(58), 1, + STATE(56), 1, sym_value, ACTIONS(116), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1911,43 +1866,21 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [987] = 8, - ACTIONS(123), 1, - sym_integer, - ACTIONS(129), 1, - anon_sym_LPAREN, - ACTIONS(132), 1, - anon_sym_RPAREN, - STATE(50), 1, - aux_sym_list_repeat1, - STATE(58), 1, - sym_value, - ACTIONS(126), 2, - anon_sym_true, - anon_sym_false, - STATE(34), 2, - sym_boolean, - sym_list, - ACTIONS(120), 4, - sym_float, - sym_string, - sym_function, - sym_empty, - [1017] = 8, + [944] = 8, ACTIONS(58), 1, sym_integer, ACTIONS(62), 1, anon_sym_LPAREN, - ACTIONS(134), 1, + ACTIONS(120), 1, anon_sym_RPAREN, - STATE(50), 1, + STATE(49), 1, aux_sym_list_repeat1, - STATE(58), 1, + STATE(56), 1, sym_value, ACTIONS(116), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1955,21 +1888,43 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [1047] = 8, + [974] = 8, + ACTIONS(125), 1, + sym_integer, + ACTIONS(131), 1, + anon_sym_LPAREN, + ACTIONS(134), 1, + anon_sym_RPAREN, + STATE(49), 1, + aux_sym_list_repeat1, + STATE(56), 1, + sym_value, + ACTIONS(128), 2, + anon_sym_true, + anon_sym_false, + STATE(33), 2, + sym_boolean, + sym_list, + ACTIONS(122), 4, + sym_float, + sym_string, + sym_function, + sym_empty, + [1004] = 8, ACTIONS(58), 1, sym_integer, ACTIONS(62), 1, anon_sym_LPAREN, ACTIONS(136), 1, anon_sym_RPAREN, - STATE(50), 1, + STATE(49), 1, aux_sym_list_repeat1, - STATE(58), 1, + STATE(56), 1, sym_value, ACTIONS(116), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -1977,27 +1932,7 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [1077] = 7, - ACTIONS(58), 1, - sym_integer, - ACTIONS(62), 1, - anon_sym_LPAREN, - STATE(51), 1, - aux_sym_list_repeat1, - STATE(58), 1, - sym_value, - ACTIONS(116), 2, - anon_sym_true, - anon_sym_false, - STATE(34), 2, - sym_boolean, - sym_list, - ACTIONS(56), 4, - sym_float, - sym_string, - sym_function, - sym_empty, - [1104] = 2, + [1034] = 2, ACTIONS(138), 6, ts_builtin_sym_end, anon_sym_POUND, @@ -2012,19 +1947,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_false, anon_sym_LPAREN, anon_sym_if, - [1121] = 7, + [1051] = 7, ACTIONS(58), 1, sym_integer, ACTIONS(62), 1, anon_sym_LPAREN, - STATE(49), 1, + STATE(47), 1, aux_sym_list_repeat1, - STATE(58), 1, + STATE(56), 1, sym_value, ACTIONS(116), 2, anon_sym_true, anon_sym_false, - STATE(34), 2, + STATE(33), 2, sym_boolean, sym_list, ACTIONS(56), 4, @@ -2032,27 +1967,7 @@ static const uint16_t ts_small_parse_table[] = { sym_string, sym_function, sym_empty, - [1148] = 7, - ACTIONS(58), 1, - sym_integer, - ACTIONS(62), 1, - anon_sym_LPAREN, - STATE(52), 1, - aux_sym_list_repeat1, - STATE(58), 1, - sym_value, - ACTIONS(116), 2, - anon_sym_true, - anon_sym_false, - STATE(34), 2, - sym_boolean, - sym_list, - ACTIONS(56), 4, - sym_float, - sym_string, - sym_function, - sym_empty, - [1175] = 2, + [1078] = 2, ACTIONS(142), 6, ts_builtin_sym_end, anon_sym_POUND, @@ -2067,7 +1982,47 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_false, anon_sym_LPAREN, anon_sym_if, - [1192] = 3, + [1095] = 7, + ACTIONS(58), 1, + sym_integer, + ACTIONS(62), 1, + anon_sym_LPAREN, + STATE(50), 1, + aux_sym_list_repeat1, + STATE(56), 1, + sym_value, + ACTIONS(116), 2, + anon_sym_true, + anon_sym_false, + STATE(33), 2, + sym_boolean, + sym_list, + ACTIONS(56), 4, + sym_float, + sym_string, + sym_function, + sym_empty, + [1122] = 7, + ACTIONS(58), 1, + sym_integer, + ACTIONS(62), 1, + anon_sym_LPAREN, + STATE(48), 1, + aux_sym_list_repeat1, + STATE(56), 1, + sym_value, + ACTIONS(116), 2, + anon_sym_true, + anon_sym_false, + STATE(33), 2, + sym_boolean, + sym_list, + ACTIONS(56), 4, + sym_float, + sym_string, + sym_function, + sym_empty, + [1149] = 3, ACTIONS(150), 1, anon_sym_COMMA, ACTIONS(148), 2, @@ -2081,7 +2036,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_RPAREN, - [1209] = 2, + [1166] = 2, ACTIONS(154), 4, sym_float, sym_string, @@ -2094,11 +2049,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_false, anon_sym_LPAREN, anon_sym_if, - [1224] = 2, + [1181] = 2, ACTIONS(156), 2, sym_integer, anon_sym_LPAREN, - ACTIONS(132), 7, + ACTIONS(134), 7, sym_float, sym_string, sym_function, @@ -2106,10 +2061,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_RPAREN, - [1238] = 3, + [1195] = 3, ACTIONS(158), 1, sym_close, - STATE(31), 1, + STATE(30), 1, sym_operator, ACTIONS(70), 5, anon_sym_PLUS, @@ -2117,8 +2072,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [1252] = 2, - STATE(31), 1, + [1209] = 2, + STATE(30), 1, sym_operator, ACTIONS(66), 6, sym_close, @@ -2127,8 +2082,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [1264] = 2, - STATE(31), 1, + [1221] = 2, + STATE(30), 1, sym_operator, ACTIONS(70), 6, sym_close, @@ -2137,40 +2092,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [1276] = 2, - ACTIONS(160), 1, - anon_sym_else, - ACTIONS(86), 5, - sym_close, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - anon_sym_then, - [1287] = 1, - ACTIONS(112), 6, - sym_close, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - anon_sym_then, - anon_sym_else, - [1296] = 1, - ACTIONS(74), 6, - sym_close, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - anon_sym_then, - anon_sym_else, - [1305] = 1, - ACTIONS(106), 6, - sym_close, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_EQ, - anon_sym_then, - anon_sym_else, - [1314] = 1, + [1233] = 1, ACTIONS(102), 6, sym_close, anon_sym_PLUS, @@ -2178,86 +2100,111 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, anon_sym_then, anon_sym_else, - [1323] = 1, - ACTIONS(74), 6, + [1242] = 1, + ACTIONS(112), 6, sym_close, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, anon_sym_then, anon_sym_else, - [1332] = 1, - ACTIONS(74), 6, + [1251] = 1, + ACTIONS(78), 6, sym_close, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, anon_sym_then, anon_sym_else, - [1341] = 1, - ACTIONS(74), 6, + [1260] = 2, + ACTIONS(160), 1, + anon_sym_else, + ACTIONS(90), 5, + sym_close, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + anon_sym_then, + [1271] = 1, + ACTIONS(78), 6, sym_close, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, anon_sym_then, anon_sym_else, - [1350] = 2, - ACTIONS(162), 1, - anon_sym_else, - ACTIONS(86), 4, + [1280] = 1, + ACTIONS(78), 6, + sym_close, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, anon_sym_then, - [1360] = 2, - STATE(40), 1, + anon_sym_else, + [1289] = 1, + ACTIONS(106), 6, + sym_close, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + anon_sym_then, + anon_sym_else, + [1298] = 2, + STATE(38), 1, sym_operator, ACTIONS(66), 4, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, anon_sym_then, - [1370] = 3, + [1308] = 2, + ACTIONS(162), 1, + anon_sym_else, + ACTIONS(90), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_EQ, + anon_sym_then, + [1318] = 3, ACTIONS(164), 1, anon_sym_then, - STATE(40), 1, + STATE(38), 1, sym_operator, ACTIONS(98), 3, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [1382] = 3, + [1330] = 3, ACTIONS(166), 1, anon_sym_then, - STATE(40), 1, + STATE(38), 1, sym_operator, ACTIONS(98), 3, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [1394] = 3, + [1342] = 3, ACTIONS(168), 1, anon_sym_then, - STATE(40), 1, + STATE(38), 1, sym_operator, ACTIONS(98), 3, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [1406] = 3, + [1354] = 3, ACTIONS(170), 1, anon_sym_then, - STATE(40), 1, + STATE(38), 1, sym_operator, ACTIONS(98), 3, anon_sym_PLUS, anon_sym_DASH, anon_sym_EQ, - [1418] = 1, + [1366] = 1, ACTIONS(172), 1, ts_builtin_sym_end, - [1422] = 1, + [1370] = 1, ACTIONS(174), 1, aux_sym_comment_token1, }; @@ -2266,149 +2213,146 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(12)] = 0, [SMALL_STATE(13)] = 25, [SMALL_STATE(14)] = 50, - [SMALL_STATE(15)] = 74, - [SMALL_STATE(16)] = 96, - [SMALL_STATE(17)] = 118, - [SMALL_STATE(18)] = 140, - [SMALL_STATE(19)] = 162, + [SMALL_STATE(15)] = 72, + [SMALL_STATE(16)] = 94, + [SMALL_STATE(17)] = 116, + [SMALL_STATE(18)] = 138, + [SMALL_STATE(19)] = 160, [SMALL_STATE(20)] = 184, - [SMALL_STATE(21)] = 208, + [SMALL_STATE(21)] = 206, [SMALL_STATE(22)] = 230, - [SMALL_STATE(23)] = 252, - [SMALL_STATE(24)] = 280, + [SMALL_STATE(23)] = 258, + [SMALL_STATE(24)] = 282, [SMALL_STATE(25)] = 304, [SMALL_STATE(26)] = 326, - [SMALL_STATE(27)] = 348, - [SMALL_STATE(28)] = 372, - [SMALL_STATE(29)] = 393, - [SMALL_STATE(30)] = 414, - [SMALL_STATE(31)] = 435, - [SMALL_STATE(32)] = 474, - [SMALL_STATE(33)] = 495, - [SMALL_STATE(34)] = 534, - [SMALL_STATE(35)] = 555, - [SMALL_STATE(36)] = 576, - [SMALL_STATE(37)] = 615, - [SMALL_STATE(38)] = 654, - [SMALL_STATE(39)] = 675, - [SMALL_STATE(40)] = 696, - [SMALL_STATE(41)] = 735, - [SMALL_STATE(42)] = 774, - [SMALL_STATE(43)] = 795, - [SMALL_STATE(44)] = 834, - [SMALL_STATE(45)] = 855, - [SMALL_STATE(46)] = 876, - [SMALL_STATE(47)] = 897, - [SMALL_STATE(48)] = 918, - [SMALL_STATE(49)] = 957, - [SMALL_STATE(50)] = 987, - [SMALL_STATE(51)] = 1017, - [SMALL_STATE(52)] = 1047, - [SMALL_STATE(53)] = 1077, - [SMALL_STATE(54)] = 1104, - [SMALL_STATE(55)] = 1121, - [SMALL_STATE(56)] = 1148, - [SMALL_STATE(57)] = 1175, - [SMALL_STATE(58)] = 1192, - [SMALL_STATE(59)] = 1209, - [SMALL_STATE(60)] = 1224, - [SMALL_STATE(61)] = 1238, - [SMALL_STATE(62)] = 1252, - [SMALL_STATE(63)] = 1264, - [SMALL_STATE(64)] = 1276, - [SMALL_STATE(65)] = 1287, - [SMALL_STATE(66)] = 1296, - [SMALL_STATE(67)] = 1305, - [SMALL_STATE(68)] = 1314, - [SMALL_STATE(69)] = 1323, - [SMALL_STATE(70)] = 1332, - [SMALL_STATE(71)] = 1341, - [SMALL_STATE(72)] = 1350, - [SMALL_STATE(73)] = 1360, - [SMALL_STATE(74)] = 1370, - [SMALL_STATE(75)] = 1382, - [SMALL_STATE(76)] = 1394, - [SMALL_STATE(77)] = 1406, - [SMALL_STATE(78)] = 1418, - [SMALL_STATE(79)] = 1422, + [SMALL_STATE(27)] = 350, + [SMALL_STATE(28)] = 371, + [SMALL_STATE(29)] = 392, + [SMALL_STATE(30)] = 413, + [SMALL_STATE(31)] = 452, + [SMALL_STATE(32)] = 473, + [SMALL_STATE(33)] = 512, + [SMALL_STATE(34)] = 533, + [SMALL_STATE(35)] = 554, + [SMALL_STATE(36)] = 593, + [SMALL_STATE(37)] = 632, + [SMALL_STATE(38)] = 653, + [SMALL_STATE(39)] = 692, + [SMALL_STATE(40)] = 731, + [SMALL_STATE(41)] = 752, + [SMALL_STATE(42)] = 791, + [SMALL_STATE(43)] = 812, + [SMALL_STATE(44)] = 833, + [SMALL_STATE(45)] = 854, + [SMALL_STATE(46)] = 875, + [SMALL_STATE(47)] = 914, + [SMALL_STATE(48)] = 944, + [SMALL_STATE(49)] = 974, + [SMALL_STATE(50)] = 1004, + [SMALL_STATE(51)] = 1034, + [SMALL_STATE(52)] = 1051, + [SMALL_STATE(53)] = 1078, + [SMALL_STATE(54)] = 1095, + [SMALL_STATE(55)] = 1122, + [SMALL_STATE(56)] = 1149, + [SMALL_STATE(57)] = 1166, + [SMALL_STATE(58)] = 1181, + [SMALL_STATE(59)] = 1195, + [SMALL_STATE(60)] = 1209, + [SMALL_STATE(61)] = 1221, + [SMALL_STATE(62)] = 1233, + [SMALL_STATE(63)] = 1242, + [SMALL_STATE(64)] = 1251, + [SMALL_STATE(65)] = 1260, + [SMALL_STATE(66)] = 1271, + [SMALL_STATE(67)] = 1280, + [SMALL_STATE(68)] = 1289, + [SMALL_STATE(69)] = 1298, + [SMALL_STATE(70)] = 1308, + [SMALL_STATE(71)] = 1318, + [SMALL_STATE(72)] = 1330, + [SMALL_STATE(73)] = 1342, + [SMALL_STATE(74)] = 1354, + [SMALL_STATE(75)] = 1366, + [SMALL_STATE(76)] = 1370, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), [17] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_root, 1), [19] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_root_repeat1, 2), - [21] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(79), - [24] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(38), - [27] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(39), - [30] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(39), - [33] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(42), - [36] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(53), - [39] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(43), - [42] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), - [44] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [46] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [50] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), + [21] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(76), + [24] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(37), + [27] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(28), + [30] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(28), + [33] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(40), + [36] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(55), + [39] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_root_repeat1, 2), SHIFT_REPEAT(41), + [42] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [44] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [46] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), + [50] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), + [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_operation, 3), [68] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_operation, 3), [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_open_statement, 1), [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_open_statement, 1), - [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), - [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), - [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1), - [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1), - [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_value, 1), - [84] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_value, 1), - [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_control_flow, 4), - [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_control_flow, 4), - [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), - [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), - [94] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), - [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), + [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), + [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1), + [84] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_value, 1), + [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_value, 1), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_control_flow, 4), + [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_control_flow, 4), + [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_control_flow, 6), [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_control_flow, 6), [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), [108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), - [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_closed_statement, 2), [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_closed_statement, 2), - [116] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [120] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(34), - [123] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(34), - [126] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(35), - [129] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(56), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), - [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [116] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [122] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(33), + [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(33), + [128] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(34), + [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(54), + [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), + [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 2), [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_item, 1), [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_item, 1), [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 1), [148] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 1), - [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), [152] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_operator, 1), [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_operator, 1), [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), - [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), @@ -2416,7 +2360,7 @@ static const TSParseActionEntry ts_parse_actions[] = { [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), [172] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), }; #ifdef __cplusplus