diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7140f627..5df6b2d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16 - run: npm install - run: npm test test_windows: @@ -26,6 +26,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16 - run: npm install - run: npm run-script test-windows diff --git a/grammar.js b/grammar.js index e9d2f33f..9145bb1d 100644 --- a/grammar.js +++ b/grammar.js @@ -349,7 +349,7 @@ module.exports = grammar({ seq('(', commaSep1($.with_item), ')') ), - with_item: $ => prec.dynamic(-1, seq( + with_item: $ => prec.dynamic(1, seq( field('value', $.expression), )), diff --git a/src/grammar.json b/src/grammar.json index 10498e32..1b077447 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1454,7 +1454,7 @@ }, "with_item": { "type": "PREC_DYNAMIC", - "value": -1, + "value": 1, "content": { "type": "SEQ", "members": [ diff --git a/src/parser.c b/src/parser.c index 7f7be74e..50fc79fc 100644 --- a/src/parser.c +++ b/src/parser.c @@ -5,7 +5,7 @@ #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif -#define LANGUAGE_VERSION 13 +#define LANGUAGE_VERSION 14 #define STATE_COUNT 1497 #define LARGE_STATE_COUNT 153 #define SYMBOL_COUNT 247 @@ -2519,6 +2519,1506 @@ static const uint16_t ts_non_terminal_alias_map[] = { 0, }; +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 6, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 10, + [11] = 11, + [12] = 5, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 18, + [19] = 18, + [20] = 17, + [21] = 7, + [22] = 22, + [23] = 2, + [24] = 3, + [25] = 14, + [26] = 13, + [27] = 27, + [28] = 28, + [29] = 10, + [30] = 11, + [31] = 6, + [32] = 8, + [33] = 33, + [34] = 28, + [35] = 35, + [36] = 36, + [37] = 22, + [38] = 33, + [39] = 39, + [40] = 27, + [41] = 39, + [42] = 42, + [43] = 42, + [44] = 44, + [45] = 44, + [46] = 46, + [47] = 4, + [48] = 48, + [49] = 9, + [50] = 50, + [51] = 51, + [52] = 35, + [53] = 53, + [54] = 54, + [55] = 50, + [56] = 16, + [57] = 54, + [58] = 51, + [59] = 53, + [60] = 46, + [61] = 36, + [62] = 48, + [63] = 15, + [64] = 64, + [65] = 65, + [66] = 65, + [67] = 64, + [68] = 65, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 70, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 74, + [82] = 82, + [83] = 77, + [84] = 79, + [85] = 78, + [86] = 86, + [87] = 87, + [88] = 88, + [89] = 89, + [90] = 90, + [91] = 91, + [92] = 92, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 95, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 101, + [102] = 89, + [103] = 101, + [104] = 104, + [105] = 105, + [106] = 88, + [107] = 107, + [108] = 90, + [109] = 91, + [110] = 110, + [111] = 99, + [112] = 80, + [113] = 113, + [114] = 105, + [115] = 76, + [116] = 86, + [117] = 117, + [118] = 118, + [119] = 118, + [120] = 120, + [121] = 82, + [122] = 92, + [123] = 113, + [124] = 93, + [125] = 117, + [126] = 87, + [127] = 94, + [128] = 96, + [129] = 98, + [130] = 104, + [131] = 100, + [132] = 75, + [133] = 120, + [134] = 107, + [135] = 110, + [136] = 136, + [137] = 137, + [138] = 137, + [139] = 136, + [140] = 137, + [141] = 136, + [142] = 142, + [143] = 143, + [144] = 143, + [145] = 143, + [146] = 143, + [147] = 73, + [148] = 148, + [149] = 149, + [150] = 148, + [151] = 151, + [152] = 151, + [153] = 153, + [154] = 153, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 153, + [161] = 158, + [162] = 162, + [163] = 162, + [164] = 162, + [165] = 162, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 169, + [173] = 169, + [174] = 169, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 177, + [179] = 179, + [180] = 180, + [181] = 180, + [182] = 182, + [183] = 176, + [184] = 184, + [185] = 182, + [186] = 184, + [187] = 177, + [188] = 179, + [189] = 177, + [190] = 182, + [191] = 180, + [192] = 179, + [193] = 193, + [194] = 180, + [195] = 195, + [196] = 182, + [197] = 184, + [198] = 176, + [199] = 184, + [200] = 176, + [201] = 177, + [202] = 179, + [203] = 179, + [204] = 204, + [205] = 205, + [206] = 195, + [207] = 207, + [208] = 208, + [209] = 209, + [210] = 210, + [211] = 211, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 219, + [222] = 216, + [223] = 211, + [224] = 224, + [225] = 225, + [226] = 225, + [227] = 224, + [228] = 228, + [229] = 224, + [230] = 230, + [231] = 225, + [232] = 225, + [233] = 233, + [234] = 224, + [235] = 209, + [236] = 236, + [237] = 237, + [238] = 238, + [239] = 239, + [240] = 236, + [241] = 241, + [242] = 237, + [243] = 243, + [244] = 230, + [245] = 237, + [246] = 233, + [247] = 247, + [248] = 248, + [249] = 236, + [250] = 237, + [251] = 236, + [252] = 247, + [253] = 247, + [254] = 247, + [255] = 241, + [256] = 256, + [257] = 257, + [258] = 258, + [259] = 259, + [260] = 260, + [261] = 261, + [262] = 262, + [263] = 257, + [264] = 264, + [265] = 260, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 269, + [270] = 270, + [271] = 271, + [272] = 272, + [273] = 273, + [274] = 274, + [275] = 275, + [276] = 276, + [277] = 277, + [278] = 262, + [279] = 260, + [280] = 275, + [281] = 281, + [282] = 276, + [283] = 283, + [284] = 284, + [285] = 271, + [286] = 260, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 217, + [291] = 291, + [292] = 292, + [293] = 213, + [294] = 292, + [295] = 215, + [296] = 230, + [297] = 233, + [298] = 298, + [299] = 212, + [300] = 300, + [301] = 288, + [302] = 302, + [303] = 303, + [304] = 220, + [305] = 305, + [306] = 210, + [307] = 303, + [308] = 308, + [309] = 309, + [310] = 214, + [311] = 305, + [312] = 309, + [313] = 313, + [314] = 308, + [315] = 315, + [316] = 298, + [317] = 300, + [318] = 318, + [319] = 319, + [320] = 320, + [321] = 321, + [322] = 322, + [323] = 323, + [324] = 324, + [325] = 325, + [326] = 326, + [327] = 327, + [328] = 328, + [329] = 329, + [330] = 330, + [331] = 331, + [332] = 332, + [333] = 333, + [334] = 334, + [335] = 327, + [336] = 336, + [337] = 320, + [338] = 338, + [339] = 320, + [340] = 340, + [341] = 341, + [342] = 342, + [343] = 342, + [344] = 344, + [345] = 345, + [346] = 336, + [347] = 340, + [348] = 348, + [349] = 349, + [350] = 334, + [351] = 326, + [352] = 352, + [353] = 319, + [354] = 354, + [355] = 327, + [356] = 327, + [357] = 349, + [358] = 324, + [359] = 359, + [360] = 360, + [361] = 329, + [362] = 341, + [363] = 330, + [364] = 333, + [365] = 338, + [366] = 366, + [367] = 329, + [368] = 349, + [369] = 330, + [370] = 345, + [371] = 371, + [372] = 372, + [373] = 373, + [374] = 333, + [375] = 375, + [376] = 376, + [377] = 377, + [378] = 378, + [379] = 379, + [380] = 352, + [381] = 338, + [382] = 382, + [383] = 383, + [384] = 384, + [385] = 349, + [386] = 318, + [387] = 329, + [388] = 366, + [389] = 378, + [390] = 376, + [391] = 341, + [392] = 330, + [393] = 320, + [394] = 359, + [395] = 371, + [396] = 333, + [397] = 341, + [398] = 338, + [399] = 328, + [400] = 400, + [401] = 401, + [402] = 402, + [403] = 377, + [404] = 379, + [405] = 376, + [406] = 323, + [407] = 407, + [408] = 408, + [409] = 376, + [410] = 336, + [411] = 348, + [412] = 375, + [413] = 413, + [414] = 413, + [415] = 415, + [416] = 416, + [417] = 417, + [418] = 418, + [419] = 419, + [420] = 420, + [421] = 421, + [422] = 422, + [423] = 423, + [424] = 424, + [425] = 425, + [426] = 426, + [427] = 421, + [428] = 419, + [429] = 420, + [430] = 430, + [431] = 425, + [432] = 432, + [433] = 416, + [434] = 422, + [435] = 415, + [436] = 430, + [437] = 437, + [438] = 437, + [439] = 432, + [440] = 418, + [441] = 426, + [442] = 417, + [443] = 423, + [444] = 424, + [445] = 445, + [446] = 446, + [447] = 447, + [448] = 448, + [449] = 449, + [450] = 450, + [451] = 451, + [452] = 452, + [453] = 453, + [454] = 454, + [455] = 454, + [456] = 452, + [457] = 453, + [458] = 458, + [459] = 448, + [460] = 445, + [461] = 451, + [462] = 458, + [463] = 450, + [464] = 447, + [465] = 449, + [466] = 446, + [467] = 467, + [468] = 468, + [469] = 469, + [470] = 470, + [471] = 471, + [472] = 472, + [473] = 473, + [474] = 474, + [475] = 467, + [476] = 476, + [477] = 477, + [478] = 468, + [479] = 479, + [480] = 480, + [481] = 481, + [482] = 482, + [483] = 483, + [484] = 484, + [485] = 485, + [486] = 486, + [487] = 487, + [488] = 488, + [489] = 489, + [490] = 490, + [491] = 491, + [492] = 492, + [493] = 493, + [494] = 490, + [495] = 492, + [496] = 489, + [497] = 487, + [498] = 470, + [499] = 484, + [500] = 483, + [501] = 480, + [502] = 491, + [503] = 503, + [504] = 504, + [505] = 505, + [506] = 488, + [507] = 507, + [508] = 486, + [509] = 509, + [510] = 485, + [511] = 511, + [512] = 512, + [513] = 482, + [514] = 481, + [515] = 479, + [516] = 476, + [517] = 517, + [518] = 473, + [519] = 519, + [520] = 471, + [521] = 469, + [522] = 505, + [523] = 523, + [524] = 523, + [525] = 503, + [526] = 493, + [527] = 512, + [528] = 507, + [529] = 511, + [530] = 474, + [531] = 509, + [532] = 477, + [533] = 517, + [534] = 519, + [535] = 504, + [536] = 472, + [537] = 537, + [538] = 538, + [539] = 539, + [540] = 540, + [541] = 541, + [542] = 542, + [543] = 543, + [544] = 544, + [545] = 545, + [546] = 546, + [547] = 547, + [548] = 548, + [549] = 542, + [550] = 550, + [551] = 551, + [552] = 552, + [553] = 553, + [554] = 554, + [555] = 555, + [556] = 556, + [557] = 557, + [558] = 558, + [559] = 559, + [560] = 554, + [561] = 561, + [562] = 562, + [563] = 563, + [564] = 564, + [565] = 565, + [566] = 566, + [567] = 567, + [568] = 568, + [569] = 569, + [570] = 568, + [571] = 571, + [572] = 572, + [573] = 566, + [574] = 574, + [575] = 572, + [576] = 569, + [577] = 571, + [578] = 578, + [579] = 567, + [580] = 565, + [581] = 563, + [582] = 561, + [583] = 559, + [584] = 550, + [585] = 585, + [586] = 586, + [587] = 587, + [588] = 588, + [589] = 538, + [590] = 590, + [591] = 591, + [592] = 592, + [593] = 556, + [594] = 558, + [595] = 555, + [596] = 547, + [597] = 597, + [598] = 537, + [599] = 599, + [600] = 600, + [601] = 600, + [602] = 553, + [603] = 591, + [604] = 590, + [605] = 605, + [606] = 546, + [607] = 562, + [608] = 597, + [609] = 592, + [610] = 539, + [611] = 599, + [612] = 540, + [613] = 588, + [614] = 614, + [615] = 614, + [616] = 586, + [617] = 587, + [618] = 618, + [619] = 543, + [620] = 544, + [621] = 552, + [622] = 564, + [623] = 551, + [624] = 541, + [625] = 625, + [626] = 626, + [627] = 627, + [628] = 628, + [629] = 626, + [630] = 625, + [631] = 631, + [632] = 632, + [633] = 633, + [634] = 634, + [635] = 635, + [636] = 636, + [637] = 637, + [638] = 638, + [639] = 639, + [640] = 640, + [641] = 641, + [642] = 642, + [643] = 643, + [644] = 644, + [645] = 645, + [646] = 646, + [647] = 647, + [648] = 648, + [649] = 545, + [650] = 650, + [651] = 578, + [652] = 652, + [653] = 605, + [654] = 654, + [655] = 655, + [656] = 656, + [657] = 657, + [658] = 658, + [659] = 659, + [660] = 660, + [661] = 661, + [662] = 637, + [663] = 663, + [664] = 664, + [665] = 665, + [666] = 666, + [667] = 667, + [668] = 668, + [669] = 669, + [670] = 670, + [671] = 671, + [672] = 667, + [673] = 663, + [674] = 578, + [675] = 633, + [676] = 676, + [677] = 677, + [678] = 665, + [679] = 660, + [680] = 680, + [681] = 681, + [682] = 668, + [683] = 644, + [684] = 669, + [685] = 637, + [686] = 632, + [687] = 545, + [688] = 670, + [689] = 637, + [690] = 664, + [691] = 680, + [692] = 681, + [693] = 693, + [694] = 671, + [695] = 661, + [696] = 605, + [697] = 643, + [698] = 641, + [699] = 663, + [700] = 646, + [701] = 664, + [702] = 667, + [703] = 663, + [704] = 670, + [705] = 659, + [706] = 640, + [707] = 669, + [708] = 668, + [709] = 660, + [710] = 665, + [711] = 655, + [712] = 648, + [713] = 638, + [714] = 647, + [715] = 212, + [716] = 661, + [717] = 636, + [718] = 654, + [719] = 652, + [720] = 658, + [721] = 671, + [722] = 217, + [723] = 215, + [724] = 214, + [725] = 657, + [726] = 642, + [727] = 210, + [728] = 220, + [729] = 213, + [730] = 730, + [731] = 731, + [732] = 645, + [733] = 664, + [734] = 667, + [735] = 670, + [736] = 669, + [737] = 668, + [738] = 660, + [739] = 665, + [740] = 661, + [741] = 731, + [742] = 635, + [743] = 639, + [744] = 677, + [745] = 676, + [746] = 693, + [747] = 731, + [748] = 671, + [749] = 634, + [750] = 731, + [751] = 731, + [752] = 731, + [753] = 650, + [754] = 656, + [755] = 755, + [756] = 756, + [757] = 756, + [758] = 758, + [759] = 759, + [760] = 760, + [761] = 761, + [762] = 762, + [763] = 763, + [764] = 664, + [765] = 633, + [766] = 667, + [767] = 767, + [768] = 730, + [769] = 670, + [770] = 770, + [771] = 669, + [772] = 772, + [773] = 773, + [774] = 668, + [775] = 660, + [776] = 665, + [777] = 777, + [778] = 778, + [779] = 773, + [780] = 762, + [781] = 761, + [782] = 782, + [783] = 760, + [784] = 681, + [785] = 755, + [786] = 680, + [787] = 773, + [788] = 759, + [789] = 770, + [790] = 758, + [791] = 770, + [792] = 773, + [793] = 756, + [794] = 782, + [795] = 289, + [796] = 671, + [797] = 797, + [798] = 545, + [799] = 782, + [800] = 773, + [801] = 758, + [802] = 762, + [803] = 761, + [804] = 760, + [805] = 770, + [806] = 755, + [807] = 759, + [808] = 758, + [809] = 756, + [810] = 759, + [811] = 782, + [812] = 755, + [813] = 760, + [814] = 782, + [815] = 761, + [816] = 762, + [817] = 761, + [818] = 770, + [819] = 760, + [820] = 762, + [821] = 578, + [822] = 773, + [823] = 291, + [824] = 755, + [825] = 762, + [826] = 761, + [827] = 760, + [828] = 755, + [829] = 759, + [830] = 758, + [831] = 756, + [832] = 782, + [833] = 663, + [834] = 770, + [835] = 835, + [836] = 759, + [837] = 756, + [838] = 758, + [839] = 605, + [840] = 632, + [841] = 661, + [842] = 656, + [843] = 657, + [844] = 658, + [845] = 647, + [846] = 652, + [847] = 638, + [848] = 648, + [849] = 650, + [850] = 639, + [851] = 676, + [852] = 642, + [853] = 853, + [854] = 677, + [855] = 654, + [856] = 665, + [857] = 660, + [858] = 640, + [859] = 668, + [860] = 636, + [861] = 669, + [862] = 322, + [863] = 863, + [864] = 641, + [865] = 670, + [866] = 659, + [867] = 332, + [868] = 661, + [869] = 667, + [870] = 354, + [871] = 664, + [872] = 322, + [873] = 635, + [874] = 354, + [875] = 643, + [876] = 693, + [877] = 644, + [878] = 634, + [879] = 344, + [880] = 644, + [881] = 671, + [882] = 332, + [883] = 655, + [884] = 646, + [885] = 663, + [886] = 645, + [887] = 344, + [888] = 778, + [889] = 889, + [890] = 633, + [891] = 777, + [892] = 632, + [893] = 650, + [894] = 652, + [895] = 676, + [896] = 677, + [897] = 217, + [898] = 654, + [899] = 853, + [900] = 634, + [901] = 635, + [902] = 693, + [903] = 645, + [904] = 643, + [905] = 639, + [906] = 213, + [907] = 767, + [908] = 215, + [909] = 763, + [910] = 642, + [911] = 636, + [912] = 214, + [913] = 220, + [914] = 210, + [915] = 656, + [916] = 641, + [917] = 212, + [918] = 658, + [919] = 647, + [920] = 638, + [921] = 648, + [922] = 657, + [923] = 646, + [924] = 659, + [925] = 640, + [926] = 655, + [927] = 927, + [928] = 928, + [929] = 927, + [930] = 928, + [931] = 927, + [932] = 927, + [933] = 928, + [934] = 934, + [935] = 928, + [936] = 936, + [937] = 927, + [938] = 938, + [939] = 939, + [940] = 940, + [941] = 941, + [942] = 942, + [943] = 928, + [944] = 944, + [945] = 945, + [946] = 927, + [947] = 947, + [948] = 928, + [949] = 949, + [950] = 950, + [951] = 950, + [952] = 950, + [953] = 953, + [954] = 950, + [955] = 955, + [956] = 956, + [957] = 956, + [958] = 958, + [959] = 959, + [960] = 958, + [961] = 961, + [962] = 961, + [963] = 963, + [964] = 963, + [965] = 963, + [966] = 963, + [967] = 967, + [968] = 968, + [969] = 969, + [970] = 970, + [971] = 969, + [972] = 972, + [973] = 973, + [974] = 974, + [975] = 973, + [976] = 969, + [977] = 977, + [978] = 974, + [979] = 969, + [980] = 980, + [981] = 981, + [982] = 968, + [983] = 983, + [984] = 984, + [985] = 977, + [986] = 970, + [987] = 987, + [988] = 977, + [989] = 977, + [990] = 980, + [991] = 970, + [992] = 992, + [993] = 970, + [994] = 983, + [995] = 995, + [996] = 996, + [997] = 987, + [998] = 984, + [999] = 981, + [1000] = 972, + [1001] = 995, + [1002] = 995, + [1003] = 1003, + [1004] = 995, + [1005] = 1005, + [1006] = 967, + [1007] = 1007, + [1008] = 1008, + [1009] = 1008, + [1010] = 1008, + [1011] = 1008, + [1012] = 995, + [1013] = 1008, + [1014] = 967, + [1015] = 983, + [1016] = 1016, + [1017] = 981, + [1018] = 980, + [1019] = 973, + [1020] = 983, + [1021] = 968, + [1022] = 981, + [1023] = 984, + [1024] = 984, + [1025] = 974, + [1026] = 1026, + [1027] = 1027, + [1028] = 972, + [1029] = 987, + [1030] = 1030, + [1031] = 972, + [1032] = 1032, + [1033] = 987, + [1034] = 1034, + [1035] = 967, + [1036] = 1036, + [1037] = 1037, + [1038] = 1038, + [1039] = 1039, + [1040] = 1040, + [1041] = 1041, + [1042] = 1042, + [1043] = 1043, + [1044] = 1044, + [1045] = 1045, + [1046] = 1045, + [1047] = 1016, + [1048] = 1048, + [1049] = 1049, + [1050] = 1050, + [1051] = 1051, + [1052] = 1052, + [1053] = 1045, + [1054] = 1054, + [1055] = 1055, + [1056] = 1056, + [1057] = 1057, + [1058] = 1058, + [1059] = 1057, + [1060] = 1060, + [1061] = 1061, + [1062] = 1062, + [1063] = 1063, + [1064] = 1045, + [1065] = 1043, + [1066] = 1049, + [1067] = 1067, + [1068] = 1068, + [1069] = 1069, + [1070] = 1070, + [1071] = 1071, + [1072] = 1068, + [1073] = 1073, + [1074] = 1074, + [1075] = 1073, + [1076] = 1076, + [1077] = 1077, + [1078] = 1074, + [1079] = 1079, + [1080] = 1080, + [1081] = 1081, + [1082] = 1082, + [1083] = 1083, + [1084] = 1050, + [1085] = 1042, + [1086] = 1086, + [1087] = 1038, + [1088] = 1088, + [1089] = 1089, + [1090] = 1090, + [1091] = 1091, + [1092] = 1073, + [1093] = 1093, + [1094] = 1081, + [1095] = 1095, + [1096] = 1096, + [1097] = 1097, + [1098] = 1098, + [1099] = 1037, + [1100] = 1039, + [1101] = 1044, + [1102] = 1091, + [1103] = 1103, + [1104] = 1091, + [1105] = 1088, + [1106] = 1091, + [1107] = 1107, + [1108] = 1108, + [1109] = 1051, + [1110] = 1110, + [1111] = 1111, + [1112] = 1112, + [1113] = 1113, + [1114] = 1114, + [1115] = 1114, + [1116] = 1049, + [1117] = 1117, + [1118] = 1118, + [1119] = 1119, + [1120] = 1110, + [1121] = 1121, + [1122] = 1122, + [1123] = 1123, + [1124] = 1124, + [1125] = 1113, + [1126] = 1126, + [1127] = 1127, + [1128] = 1128, + [1129] = 1129, + [1130] = 1130, + [1131] = 1128, + [1132] = 1122, + [1133] = 1119, + [1134] = 1124, + [1135] = 1056, + [1136] = 1136, + [1137] = 1137, + [1138] = 1138, + [1139] = 1139, + [1140] = 1140, + [1141] = 1141, + [1142] = 1142, + [1143] = 1143, + [1144] = 1144, + [1145] = 1145, + [1146] = 1138, + [1147] = 1142, + [1148] = 1034, + [1149] = 1144, + [1150] = 1150, + [1151] = 1151, + [1152] = 1152, + [1153] = 1153, + [1154] = 1154, + [1155] = 1155, + [1156] = 1156, + [1157] = 1157, + [1158] = 1158, + [1159] = 1159, + [1160] = 1160, + [1161] = 1161, + [1162] = 1162, + [1163] = 1141, + [1164] = 1155, + [1165] = 1141, + [1166] = 1166, + [1167] = 1166, + [1168] = 1156, + [1169] = 1169, + [1170] = 1145, + [1171] = 1140, + [1172] = 1169, + [1173] = 1153, + [1174] = 1141, + [1175] = 1175, + [1176] = 1158, + [1177] = 1177, + [1178] = 1152, + [1179] = 1179, + [1180] = 1180, + [1181] = 1181, + [1182] = 1182, + [1183] = 1183, + [1184] = 1184, + [1185] = 1185, + [1186] = 1186, + [1187] = 1159, + [1188] = 1188, + [1189] = 1189, + [1190] = 1190, + [1191] = 1191, + [1192] = 1192, + [1193] = 1193, + [1194] = 1194, + [1195] = 1195, + [1196] = 1196, + [1197] = 1197, + [1198] = 1198, + [1199] = 1199, + [1200] = 1200, + [1201] = 1201, + [1202] = 1202, + [1203] = 1203, + [1204] = 1204, + [1205] = 1205, + [1206] = 1206, + [1207] = 1154, + [1208] = 1208, + [1209] = 1209, + [1210] = 1210, + [1211] = 1175, + [1212] = 1139, + [1213] = 1213, + [1214] = 1214, + [1215] = 1188, + [1216] = 1216, + [1217] = 1217, + [1218] = 1218, + [1219] = 1219, + [1220] = 1220, + [1221] = 1221, + [1222] = 1222, + [1223] = 1223, + [1224] = 1224, + [1225] = 1225, + [1226] = 1226, + [1227] = 1227, + [1228] = 1219, + [1229] = 1229, + [1230] = 1230, + [1231] = 1231, + [1232] = 1232, + [1233] = 1222, + [1234] = 1234, + [1235] = 1235, + [1236] = 1232, + [1237] = 1237, + [1238] = 1238, + [1239] = 1208, + [1240] = 1144, + [1241] = 1241, + [1242] = 633, + [1243] = 1243, + [1244] = 1243, + [1245] = 1245, + [1246] = 1246, + [1247] = 1247, + [1248] = 1248, + [1249] = 1245, + [1250] = 1210, + [1251] = 1224, + [1252] = 1252, + [1253] = 1253, + [1254] = 1254, + [1255] = 1225, + [1256] = 1253, + [1257] = 1257, + [1258] = 1258, + [1259] = 1226, + [1260] = 1260, + [1261] = 1261, + [1262] = 632, + [1263] = 1217, + [1264] = 1222, + [1265] = 1237, + [1266] = 1266, + [1267] = 1267, + [1268] = 1245, + [1269] = 1269, + [1270] = 1243, + [1271] = 1271, + [1272] = 1272, + [1273] = 1273, + [1274] = 1274, + [1275] = 1224, + [1276] = 1184, + [1277] = 1277, + [1278] = 1261, + [1279] = 1225, + [1280] = 1280, + [1281] = 1201, + [1282] = 1232, + [1283] = 1266, + [1284] = 1273, + [1285] = 1285, + [1286] = 1226, + [1287] = 1287, + [1288] = 1288, + [1289] = 1287, + [1290] = 1290, + [1291] = 1254, + [1292] = 1292, + [1293] = 1293, + [1294] = 1294, + [1295] = 1257, + [1296] = 1252, + [1297] = 1297, + [1298] = 1232, + [1299] = 1299, + [1300] = 1222, + [1301] = 1245, + [1302] = 1302, + [1303] = 1303, + [1304] = 1304, + [1305] = 1257, + [1306] = 1224, + [1307] = 1179, + [1308] = 1220, + [1309] = 1254, + [1310] = 1254, + [1311] = 1225, + [1312] = 1186, + [1313] = 1226, + [1314] = 1153, + [1315] = 1266, + [1316] = 1266, + [1317] = 1317, + [1318] = 1318, + [1319] = 1319, + [1320] = 1261, + [1321] = 1267, + [1322] = 1319, + [1323] = 1253, + [1324] = 1324, + [1325] = 1243, + [1326] = 1258, + [1327] = 1253, + [1328] = 1328, + [1329] = 318, + [1330] = 1330, + [1331] = 1331, + [1332] = 1332, + [1333] = 1333, + [1334] = 1192, + [1335] = 1335, + [1336] = 1336, + [1337] = 1337, + [1338] = 1338, + [1339] = 1339, + [1340] = 1340, + [1341] = 1339, + [1342] = 1342, + [1343] = 1343, + [1344] = 1344, + [1345] = 1345, + [1346] = 371, + [1347] = 1347, + [1348] = 1348, + [1349] = 1349, + [1350] = 375, + [1351] = 1269, + [1352] = 378, + [1353] = 1353, + [1354] = 345, + [1355] = 1345, + [1356] = 1356, + [1357] = 1357, + [1358] = 1358, + [1359] = 1359, + [1360] = 1360, + [1361] = 1361, + [1362] = 1357, + [1363] = 1363, + [1364] = 1364, + [1365] = 1365, + [1366] = 1280, + [1367] = 1367, + [1368] = 1338, + [1369] = 1260, + [1370] = 1370, + [1371] = 1371, + [1372] = 1372, + [1373] = 1373, + [1374] = 1374, + [1375] = 1375, + [1376] = 1376, + [1377] = 1377, + [1378] = 1378, + [1379] = 1379, + [1380] = 1380, + [1381] = 1381, + [1382] = 1370, + [1383] = 1383, + [1384] = 1384, + [1385] = 1385, + [1386] = 1386, + [1387] = 1387, + [1388] = 1388, + [1389] = 1389, + [1390] = 1376, + [1391] = 1383, + [1392] = 1381, + [1393] = 1380, + [1394] = 1377, + [1395] = 1376, + [1396] = 1396, + [1397] = 1386, + [1398] = 1385, + [1399] = 1399, + [1400] = 1370, + [1401] = 1370, + [1402] = 1402, + [1403] = 1370, + [1404] = 1404, + [1405] = 1375, + [1406] = 1406, + [1407] = 1374, + [1408] = 1373, + [1409] = 1409, + [1410] = 1410, + [1411] = 1372, + [1412] = 1412, + [1413] = 1413, + [1414] = 1389, + [1415] = 1415, + [1416] = 1406, + [1417] = 1375, + [1418] = 1418, + [1419] = 1389, + [1420] = 1420, + [1421] = 1418, + [1422] = 1422, + [1423] = 1383, + [1424] = 1424, + [1425] = 1381, + [1426] = 1426, + [1427] = 1380, + [1428] = 1428, + [1429] = 1429, + [1430] = 1377, + [1431] = 1376, + [1432] = 1432, + [1433] = 1413, + [1434] = 1371, + [1435] = 1432, + [1436] = 1436, + [1437] = 1370, + [1438] = 1428, + [1439] = 1439, + [1440] = 1440, + [1441] = 1441, + [1442] = 1442, + [1443] = 1443, + [1444] = 1444, + [1445] = 1445, + [1446] = 1375, + [1447] = 1399, + [1448] = 1448, + [1449] = 1402, + [1450] = 1450, + [1451] = 1412, + [1452] = 1452, + [1453] = 1453, + [1454] = 1454, + [1455] = 1374, + [1456] = 1373, + [1457] = 1457, + [1458] = 1372, + [1459] = 1429, + [1460] = 1426, + [1461] = 1418, + [1462] = 1413, + [1463] = 1463, + [1464] = 1410, + [1465] = 1389, + [1466] = 1418, + [1467] = 1445, + [1468] = 1468, + [1469] = 1469, + [1470] = 1470, + [1471] = 1420, + [1472] = 1472, + [1473] = 1453, + [1474] = 1474, + [1475] = 1474, + [1476] = 1454, + [1477] = 1477, + [1478] = 1478, + [1479] = 1479, + [1480] = 1480, + [1481] = 1472, + [1482] = 1383, + [1483] = 1441, + [1484] = 1413, + [1485] = 1372, + [1486] = 1486, + [1487] = 1373, + [1488] = 1480, + [1489] = 1424, + [1490] = 1377, + [1491] = 1448, + [1492] = 1384, + [1493] = 1374, + [1494] = 1404, + [1495] = 1381, + [1496] = 1380, +}; + static inline bool sym_identifier_character_set_1(int32_t c) { return (c < 43514 ? (c < 4193 @@ -75803,7 +77303,7 @@ static const TSParseActionEntry ts_parse_actions[] = { [1945] = {.entry = {.count = 1, .reusable = true}}, SHIFT(713), [1947] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), [1949] = {.entry = {.count = 1, .reusable = true}}, SHIFT(719), - [1951] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = -1, .production_id = 6), SHIFT(170), + [1951] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = 1, .production_id = 6), SHIFT(170), [1954] = {.entry = {.count = 1, .reusable = true}}, SHIFT(652), [1956] = {.entry = {.count = 1, .reusable = true}}, SHIFT(374), [1958] = {.entry = {.count = 1, .reusable = true}}, SHIFT(381), @@ -75964,7 +77464,7 @@ static const TSParseActionEntry ts_parse_actions[] = { [2275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(903), [2277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_subscript_repeat1, 2, .production_id = 68), [2279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(376), - [2281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = -1, .production_id = 6), + [2281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = 1, .production_id = 6), [2283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_keyword_argument, 3, .production_id = 20), [2285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_keyword_argument, 3, .production_id = 67), [2287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dotted_name_repeat1, 2), @@ -76377,6 +77877,7 @@ extern const TSLanguage *tree_sitter_python(void) { tree_sitter_python_external_scanner_serialize, tree_sitter_python_external_scanner_deserialize, }, + .primary_state_ids = ts_primary_state_ids, }; return &language; } diff --git a/test/corpus/statements.txt b/test/corpus/statements.txt index cac5e054..ce6d63a9 100644 --- a/test/corpus/statements.txt +++ b/test/corpus/statements.txt @@ -563,25 +563,24 @@ with (open('d') as d, (with_statement (with_clause (with_item - (tuple - (as_pattern - (call - (identifier) - (argument_list - (string))) - (as_pattern_target - (identifier))) - (as_pattern - (call - (identifier) - (argument_list - (string))) - (as_pattern_target - (identifier)))))) + (as_pattern + (call + (identifier) + (argument_list + (string))) + (as_pattern_target + (identifier)))) + (with_item + (as_pattern + (call + (identifier) + (argument_list + (string))) + (as_pattern_target + (identifier))))) (block (expression_statement (identifier))))) - ================================================================================ Async Function definitions ================================================================================