diff --git a/Cargo.lock b/Cargo.lock index 6b20687..d9c7a82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,9 +188,9 @@ checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" [[package]] name = "willbooster-tree-sitter" -version = "14.0.4" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c3320162d4700741e7df550e6e78d549e702892c0b38542546c9675252700ff" +checksum = "94429cbf1391eed673fd9f4f639a784afef51913c33e83207a63b6f51aa30fa9" dependencies = [ "cc", "regex", diff --git a/Cargo.toml b/Cargo.toml index e2456af..5ff1dc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,4 +25,4 @@ tree-sitter-language = "0.1" cc = "1.2" [dev-dependencies] -tree-sitter = { package = "willbooster-tree-sitter", version = "14.0.0" } +tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" } diff --git a/README.md b/README.md index 49fd9bb..6e1b7ec 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ Annotation interface declarations expose separate `@` and `interface` tokens. Postfix updates appear inside surrounding cast or unary nodes. An `update_expression` has a primary expression as its operand. The parser ships as compact tables under the [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) -fork's ABI (`0x5742000a`). This package is tested with runtime 14.0.4. Runtimes with a different ABI, including +fork's ABI (`0x5742000b`). This package is tested with runtime 15.0.0. Runtimes with a different ABI, including upstream's tree-sitter, reject the parser. ## Usage The npm package ships `tree-sitter-java.wasm` for -[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 14.0.0 or later within major version 14, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path: +[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 15.0.0 or later within major version 15, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path: ```js import { fileURLToPath } from 'node:url'; @@ -144,8 +144,8 @@ fuzzed with: ```toml [dependencies] -tree-sitter = { package = "willbooster-tree-sitter", version = "14.0.0" } -tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "12" } +tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" } +tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "13" } ``` ```rust diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index b5840df..9d082db 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,8 +1,8 @@ //! This crate provides Java language support for the [tree-sitter] parsing library. //! -//! The parser carries the ABI number of the WillBooster fork (`0x5742000a`) and is tested with the -//! [`willbooster-tree-sitter`] runtime 14.0.4 (depend on it as -//! `tree-sitter = { package = "willbooster-tree-sitter", version = "14.0.0" }`). Runtimes with a different ABI, +//! The parser carries the ABI number of the WillBooster fork (`0x5742000b`) and is tested with the +//! [`willbooster-tree-sitter`] runtime 15.0.0 (depend on it as +//! `tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }`). Runtimes with a different ABI, //! including upstream's `tree-sitter` crate, reject it with a `LanguageError`. //! //! Typically, you will use the [`LANGUAGE`] constant to add this language to a @@ -19,7 +19,7 @@ //! assert!(!tree.root_node().has_error()); //! ``` //! -//! [`Parser`]: https://docs.rs/willbooster-tree-sitter/14/tree_sitter/struct.Parser.html +//! [`Parser`]: https://docs.rs/willbooster-tree-sitter/15.0.0/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ //! [`willbooster-tree-sitter`]: https://crates.io/crates/willbooster-tree-sitter diff --git a/bun.lock b/bun.lock index 6dc2343..9478ace 100644 --- a/bun.lock +++ b/bun.lock @@ -10,7 +10,7 @@ "@vitest/browser-playwright": "5.0.5", "@willbooster/oxlint-config": "1.4.9", "@willbooster/wb": "22.29.3", - "@willbooster/web-tree-sitter": "14.0.4", + "@willbooster/web-tree-sitter": "15.0.0", "conventional-changelog-conventionalcommits": "10.4.1", "lefthook": "2.2.2", "oxlint": "1.88.0", @@ -21,7 +21,7 @@ "wrangler": "4.151.1", }, "peerDependencies": { - "@willbooster/web-tree-sitter": "^14.0.0", + "@willbooster/web-tree-sitter": "^15.0.0", }, "optionalPeers": [ "@willbooster/web-tree-sitter", @@ -389,7 +389,7 @@ "@willbooster/wb": ["@willbooster/wb@22.29.3", "", { "dependencies": { "@textlint-rule/textlint-rule-no-invalid-control-character": "3.0.0", "@textlint/kernel": "15.8.0", "@textlint/module-interop": "15.8.0", "@textlint/textlint-plugin-markdown": "15.8.0", "chalk": "6.0.1", "code-gauge": "10.2.4", "dotenv": "18.0.8", "dotenv-expand": "13.0.0", "fast-glob": "3.3.3", "fastest-levenshtein": "1.0.16", "globby": "16.2.4", "jsonc-parser": "3.3.1", "minimal-promise-pool": "6.0.4", "semver": "7.8.5", "smol-toml": "1.9.1", "textlint-filter-rule-node-types": "1.1.0", "textlint-rule-ja-space-between-half-and-full-width": "3.0.4", "textlint-rule-no-zero-width-spaces": "1.0.1", "yargs": "18.2.0", "zod": "4.6.7" }, "bin": { "wb": "bin/index.js" } }, "sha512-S5LXu3YvEzggR2ybmvUyXKU2AT4EunqNgLnjNOQiSU/lEopEyljklI4pFeWqZt9YieHq7tn5zh38hpWi+hD4Vg=="], - "@willbooster/web-tree-sitter": ["@willbooster/web-tree-sitter@14.0.4", "", { "dependencies": { "@types/emscripten": "^1.41.5" } }, "sha512-pk/7RgtvRWjgjHHDxEWPdLXhuWW7ZFk0y1oK7fBo+WXZ4SdJ0g4UHR0GOMvqidt2fLI8+ty2qp6HrGB5P1fGBw=="], + "@willbooster/web-tree-sitter": ["@willbooster/web-tree-sitter@15.0.0", "", { "dependencies": { "@types/emscripten": "^1.41.5" } }, "sha512-XvcQ+GZ0bf3BqXcmnf9u1inKE67b2w2745dnc09RdmpeSib2KcNUNo4XnPqoDliKLWWRlOdPQ23eb62ZNej7TA=="], "agent-base": ["agent-base@9.0.0", "", {}, "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA=="], diff --git a/package.json b/package.json index 3696a04..a31e9b8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@vitest/browser-playwright": "5.0.5", "@willbooster/oxlint-config": "1.4.9", "@willbooster/wb": "22.29.3", - "@willbooster/web-tree-sitter": "14.0.4", + "@willbooster/web-tree-sitter": "15.0.0", "conventional-changelog-conventionalcommits": "10.4.1", "lefthook": "2.2.2", "oxlint": "1.88.0", @@ -61,7 +61,7 @@ "wrangler": "4.151.1" }, "peerDependencies": { - "@willbooster/web-tree-sitter": "^14.0.0" + "@willbooster/web-tree-sitter": "^15.0.0" }, "peerDependenciesMeta": { "@willbooster/web-tree-sitter": { diff --git a/src/parser.c b/src/parser.c index 1bcc861..82df5dc 100644 --- a/src/parser.c +++ b/src/parser.c @@ -7,7 +7,7 @@ #endif #define TS_GENERATION_PROFILED 1 -#define LANGUAGE_VERSION 0x5742000a +#define LANGUAGE_VERSION 0x5742000b #define STATE_COUNT 1627 #define LARGE_STATE_COUNT 128 #define LEX_STATE_COUNT 221 @@ -3637,1634 +3637,20 @@ 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] = 12, - [13] = 13, - [14] = 14, - [15] = 15, - [16] = 16, - [17] = 17, - [18] = 18, - [19] = 19, - [20] = 20, - [21] = 21, - [22] = 22, - [23] = 23, - [24] = 24, - [25] = 25, - [26] = 26, - [27] = 27, - [28] = 28, - [29] = 29, - [30] = 30, - [31] = 31, - [32] = 32, - [33] = 33, - [34] = 34, - [35] = 35, - [36] = 36, - [37] = 37, - [38] = 38, - [39] = 39, - [40] = 40, - [41] = 41, - [42] = 42, - [43] = 43, - [44] = 44, - [45] = 45, - [46] = 46, - [47] = 47, - [48] = 48, - [49] = 49, - [50] = 50, - [51] = 51, - [52] = 52, - [53] = 53, - [54] = 54, - [55] = 55, - [56] = 56, - [57] = 57, - [58] = 58, - [59] = 22, - [60] = 60, - [61] = 61, - [62] = 62, - [63] = 63, - [64] = 64, - [65] = 65, - [66] = 65, - [67] = 67, - [68] = 68, - [69] = 69, - [70] = 70, - [71] = 71, - [72] = 72, - [73] = 73, - [74] = 74, - [75] = 51, - [76] = 76, - [77] = 77, - [78] = 78, - [79] = 79, - [80] = 80, - [81] = 81, - [82] = 82, - [83] = 83, - [84] = 84, - [85] = 85, - [86] = 86, - [87] = 87, - [88] = 88, - [89] = 89, - [90] = 4, - [91] = 91, - [92] = 92, - [93] = 93, - [94] = 94, - [95] = 95, - [96] = 96, - [97] = 97, - [98] = 98, - [99] = 99, - [100] = 100, - [101] = 101, - [102] = 102, - [103] = 103, - [104] = 104, - [105] = 105, - [106] = 106, - [107] = 107, - [108] = 108, - [109] = 109, - [110] = 110, - [111] = 111, - [112] = 112, - [113] = 113, - [114] = 114, - [115] = 115, - [116] = 116, - [117] = 117, - [118] = 118, - [119] = 115, - [120] = 120, - [121] = 121, - [122] = 122, - [123] = 123, - [124] = 124, - [125] = 125, - [126] = 126, - [127] = 127, - [128] = 128, - [129] = 129, - [130] = 130, - [131] = 131, - [132] = 132, - [133] = 133, - [134] = 134, - [135] = 135, - [136] = 136, - [137] = 137, - [138] = 138, - [139] = 139, - [140] = 140, - [141] = 141, - [142] = 142, - [143] = 143, - [144] = 144, - [145] = 145, - [146] = 146, - [147] = 147, - [148] = 148, - [149] = 149, - [150] = 150, - [151] = 147, - [152] = 152, - [153] = 153, - [154] = 154, - [155] = 155, - [156] = 64, - [157] = 157, - [158] = 63, - [159] = 159, - [160] = 160, - [161] = 102, - [162] = 104, - [163] = 105, - [164] = 164, - [165] = 165, - [166] = 166, - [167] = 167, - [168] = 62, - [169] = 169, - [170] = 170, - [171] = 171, - [172] = 172, - [173] = 173, - [174] = 174, - [175] = 175, - [176] = 176, - [177] = 177, - [178] = 178, - [179] = 179, - [180] = 180, - [181] = 181, - [182] = 182, - [183] = 183, - [184] = 184, - [185] = 185, - [186] = 186, - [187] = 187, - [188] = 188, - [189] = 189, - [190] = 190, - [191] = 191, - [192] = 192, - [193] = 193, - [194] = 194, - [195] = 195, - [196] = 196, - [197] = 197, - [198] = 198, - [199] = 199, - [200] = 200, - [201] = 114, - [202] = 202, - [203] = 203, - [204] = 204, - [205] = 205, - [206] = 206, - [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] = 221, - [222] = 222, - [223] = 223, - [224] = 224, - [225] = 225, - [226] = 226, - [227] = 227, - [228] = 228, - [229] = 229, - [230] = 230, - [231] = 231, - [232] = 232, - [233] = 233, - [234] = 234, - [235] = 235, - [236] = 236, - [237] = 237, - [238] = 238, - [239] = 239, - [240] = 240, - [241] = 136, - [242] = 242, - [243] = 243, - [244] = 244, - [245] = 137, - [246] = 246, - [247] = 247, - [248] = 248, - [249] = 249, - [250] = 250, - [251] = 251, - [252] = 252, - [253] = 253, - [254] = 254, - [255] = 255, - [256] = 256, - [257] = 257, - [258] = 258, - [259] = 259, - [260] = 260, - [261] = 261, - [262] = 262, - [263] = 263, - [264] = 145, - [265] = 265, - [266] = 78, - [267] = 243, - [268] = 268, - [269] = 269, - [270] = 270, - [271] = 271, - [272] = 272, - [273] = 273, - [274] = 274, - [275] = 275, - [276] = 276, - [277] = 277, - [278] = 278, - [279] = 271, - [280] = 280, - [281] = 72, - [282] = 282, - [283] = 283, - [284] = 284, - [285] = 53, - [286] = 286, - [287] = 287, - [288] = 129, - [289] = 289, - [290] = 290, - [291] = 291, - [292] = 292, - [293] = 293, - [294] = 294, - [295] = 295, - [296] = 296, - [297] = 297, - [298] = 298, - [299] = 299, - [300] = 174, - [301] = 301, - [302] = 302, - [303] = 303, - [304] = 304, - [305] = 305, - [306] = 306, - [307] = 307, - [308] = 278, - [309] = 309, - [310] = 310, - [311] = 311, - [312] = 192, - [313] = 313, - [314] = 314, - [315] = 315, - [316] = 316, - [317] = 317, - [318] = 318, - [319] = 319, - [320] = 320, - [321] = 86, - [322] = 322, - [323] = 323, - [324] = 324, - [325] = 157, - [326] = 223, - [327] = 327, - [328] = 328, - [329] = 329, - [330] = 330, - [331] = 331, - [332] = 332, - [333] = 333, - [334] = 334, - [335] = 335, - [336] = 336, - [337] = 337, - [338] = 338, - [339] = 339, - [340] = 340, - [341] = 341, - [342] = 342, - [343] = 343, - [344] = 344, - [345] = 345, - [346] = 346, - [347] = 277, - [348] = 348, - [349] = 349, - [350] = 350, - [351] = 351, - [352] = 352, - [353] = 353, - [354] = 354, - [355] = 244, - [356] = 356, - [357] = 357, - [358] = 358, - [359] = 359, - [360] = 360, - [361] = 361, - [362] = 253, - [363] = 363, - [364] = 364, - [365] = 365, - [366] = 366, - [367] = 231, - [368] = 368, - [369] = 369, - [370] = 370, - [371] = 371, - [372] = 372, - [373] = 258, - [374] = 374, - [375] = 375, - [376] = 376, - [377] = 377, - [378] = 378, - [379] = 379, - [380] = 78, - [381] = 381, - [382] = 382, - [383] = 383, - [384] = 384, - [385] = 385, - [386] = 83, - [387] = 387, - [388] = 388, - [389] = 389, - [390] = 390, - [391] = 391, - [392] = 392, - [393] = 393, - [394] = 394, - [395] = 395, - [396] = 396, - [397] = 397, - [398] = 398, - [399] = 399, - [400] = 400, - [401] = 401, - [402] = 402, - [403] = 403, - [404] = 404, - [405] = 405, - [406] = 406, - [407] = 407, - [408] = 408, - [409] = 409, - [410] = 410, - [411] = 411, - [412] = 412, - [413] = 413, - [414] = 414, - [415] = 415, - [416] = 416, - [417] = 417, - [418] = 18, - [419] = 108, - [420] = 420, - [421] = 421, - [422] = 71, - [423] = 423, - [424] = 424, - [425] = 425, - [426] = 426, - [427] = 427, - [428] = 428, - [429] = 429, - [430] = 430, - [431] = 431, - [432] = 432, - [433] = 433, - [434] = 434, - [435] = 5, - [436] = 436, - [437] = 437, - [438] = 438, - [439] = 439, - [440] = 440, - [441] = 441, - [442] = 109, - [443] = 251, - [444] = 444, - [445] = 445, - [446] = 192, - [447] = 447, - [448] = 448, - [449] = 449, - [450] = 450, - [451] = 451, - [452] = 452, - [453] = 453, - [454] = 454, - [455] = 455, - [456] = 456, - [457] = 457, - [458] = 458, - [459] = 459, - [460] = 460, - [461] = 461, - [462] = 462, - [463] = 463, - [464] = 464, - [465] = 465, - [466] = 466, - [467] = 467, - [468] = 468, - [469] = 469, - [470] = 470, - [471] = 471, - [472] = 472, - [473] = 473, - [474] = 474, - [475] = 138, - [476] = 476, - [477] = 477, - [478] = 478, - [479] = 479, - [480] = 480, - [481] = 124, - [482] = 268, - [483] = 76, - [484] = 484, - [485] = 485, - [486] = 484, - [487] = 485, - [488] = 488, - [489] = 489, - [490] = 490, - [491] = 491, - [492] = 492, - [493] = 493, - [494] = 494, - [495] = 495, - [496] = 496, - [497] = 497, - [498] = 498, - [499] = 499, - [500] = 500, - [501] = 501, - [502] = 91, - [503] = 194, - [504] = 191, - [505] = 287, - [506] = 506, - [507] = 507, - [508] = 508, - [509] = 509, - [510] = 510, - [511] = 511, - [512] = 512, - [513] = 513, - [514] = 514, - [515] = 515, - [516] = 516, - [517] = 123, - [518] = 126, - [519] = 77, - [520] = 515, - [521] = 521, - [522] = 522, - [523] = 523, - [524] = 19, - [525] = 525, - [526] = 526, - [527] = 527, - [528] = 528, - [529] = 527, - [530] = 129, - [531] = 531, - [532] = 532, - [533] = 533, - [534] = 534, - [535] = 535, - [536] = 536, - [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] = 549, - [550] = 550, - [551] = 551, - [552] = 552, - [553] = 553, - [554] = 292, - [555] = 555, - [556] = 556, - [557] = 557, - [558] = 558, - [559] = 559, - [560] = 560, - [561] = 561, - [562] = 562, - [563] = 563, - [564] = 564, - [565] = 127, - [566] = 566, - [567] = 567, - [568] = 568, - [569] = 569, - [570] = 570, - [571] = 571, - [572] = 572, - [573] = 573, - [574] = 574, - [575] = 575, - [576] = 576, - [577] = 577, - [578] = 578, - [579] = 579, - [580] = 580, - [581] = 581, - [582] = 582, - [583] = 94, - [584] = 70, - [585] = 585, - [586] = 586, - [587] = 587, - [588] = 588, - [589] = 589, - [590] = 79, - [591] = 591, - [592] = 478, - [593] = 230, - [594] = 231, - [595] = 595, - [596] = 596, - [597] = 353, - [598] = 480, - [599] = 382, - [600] = 600, - [601] = 601, - [602] = 602, - [603] = 603, - [604] = 604, - [605] = 605, - [606] = 606, - [607] = 607, - [608] = 608, - [609] = 609, - [610] = 610, - [611] = 611, - [612] = 612, - [613] = 613, - [614] = 614, - [615] = 615, - [616] = 616, - [617] = 617, - [618] = 618, - [619] = 619, - [620] = 620, - [621] = 621, - [622] = 622, - [623] = 623, - [624] = 624, - [625] = 624, - [626] = 72, - [627] = 627, - [628] = 628, - [629] = 629, - [630] = 231, - [631] = 334, - [632] = 233, - [633] = 633, - [634] = 634, - [635] = 230, - [636] = 51, - [637] = 368, - [638] = 52, - [639] = 639, - [640] = 640, - [641] = 69, - [642] = 642, - [643] = 20, - [644] = 644, - [645] = 645, - [646] = 646, - [647] = 647, - [648] = 385, - [649] = 649, - [650] = 650, - [651] = 651, - [652] = 652, - [653] = 653, - [654] = 654, - [655] = 655, - [656] = 656, - [657] = 332, - [658] = 658, - [659] = 659, - [660] = 660, - [661] = 661, - [662] = 662, - [663] = 663, - [664] = 664, - [665] = 499, - [666] = 666, - [667] = 667, - [668] = 668, - [669] = 499, - [670] = 670, - [671] = 393, - [672] = 672, - [673] = 673, - [674] = 674, - [675] = 675, - [676] = 394, - [677] = 677, - [678] = 60, - [679] = 192, - [680] = 680, - [681] = 681, - [682] = 682, - [683] = 683, - [684] = 684, - [685] = 685, - [686] = 686, - [687] = 687, - [688] = 688, - [689] = 689, - [690] = 690, - [691] = 691, - [692] = 692, - [693] = 693, - [694] = 694, - [695] = 695, - [696] = 696, - [697] = 697, - [698] = 698, - [699] = 699, - [700] = 700, - [701] = 701, - [702] = 702, - [703] = 703, - [704] = 704, - [705] = 705, - [706] = 706, - [707] = 707, - [708] = 708, - [709] = 709, - [710] = 710, - [711] = 711, - [712] = 712, - [713] = 713, - [714] = 714, - [715] = 715, - [716] = 716, - [717] = 717, - [718] = 718, - [719] = 719, - [720] = 720, - [721] = 721, - [722] = 722, - [723] = 723, - [724] = 724, - [725] = 725, - [726] = 462, - [727] = 727, - [728] = 408, - [729] = 729, - [730] = 730, - [731] = 731, - [732] = 732, - [733] = 733, - [734] = 734, - [735] = 735, - [736] = 736, - [737] = 737, - [738] = 738, - [739] = 299, - [740] = 740, - [741] = 741, - [742] = 742, - [743] = 743, - [744] = 744, - [745] = 745, - [746] = 746, - [747] = 239, - [748] = 748, - [749] = 13, - [750] = 750, - [751] = 751, - [752] = 752, - [753] = 753, - [754] = 754, - [755] = 755, - [756] = 180, - [757] = 757, - [758] = 758, - [759] = 759, - [760] = 760, - [761] = 761, - [762] = 762, - [763] = 763, - [764] = 764, - [765] = 750, - [766] = 766, - [767] = 767, - [768] = 768, - [769] = 769, - [770] = 770, - [771] = 771, - [772] = 772, - [773] = 173, - [774] = 774, - [775] = 775, - [776] = 774, - [777] = 775, - [778] = 751, - [779] = 752, - [780] = 753, - [781] = 754, - [782] = 755, - [783] = 757, - [784] = 758, - [785] = 759, - [786] = 760, - [787] = 761, - [788] = 476, - [789] = 762, - [790] = 477, - [791] = 763, - [792] = 764, - [793] = 793, - [794] = 750, - [795] = 766, - [796] = 767, - [797] = 768, - [798] = 769, - [799] = 770, - [800] = 771, - [801] = 772, - [802] = 173, - [803] = 136, - [804] = 180, - [805] = 138, - [806] = 774, - [807] = 775, - [808] = 751, - [809] = 752, - [810] = 753, - [811] = 754, - [812] = 755, - [813] = 757, - [814] = 758, - [815] = 759, - [816] = 760, - [817] = 761, - [818] = 476, - [819] = 762, - [820] = 477, - [821] = 763, - [822] = 764, - [823] = 588, - [824] = 766, - [825] = 767, - [826] = 768, - [827] = 769, - [828] = 770, - [829] = 771, - [830] = 772, - [831] = 588, - [832] = 78, - [833] = 352, - [834] = 352, - [835] = 835, - [836] = 836, - [837] = 837, - [838] = 589, - [839] = 839, - [840] = 840, - [841] = 841, - [842] = 842, - [843] = 841, - [844] = 842, - [845] = 845, - [846] = 846, - [847] = 478, - [848] = 848, - [849] = 848, - [850] = 850, - [851] = 846, - [852] = 848, - [853] = 853, - [854] = 854, - [855] = 855, - [856] = 478, - [857] = 848, - [858] = 858, - [859] = 859, - [860] = 859, - [861] = 55, - [862] = 853, - [863] = 392, - [864] = 591, - [865] = 850, - [866] = 866, - [867] = 858, - [868] = 859, - [869] = 846, - [870] = 853, - [871] = 392, - [872] = 591, - [873] = 850, - [874] = 866, - [875] = 855, - [876] = 479, - [877] = 596, - [878] = 854, - [879] = 858, - [880] = 855, - [881] = 479, - [882] = 596, - [883] = 854, - [884] = 866, - [885] = 405, - [886] = 886, - [887] = 107, - [888] = 215, - [889] = 600, - [890] = 354, - [891] = 601, - [892] = 602, - [893] = 424, - [894] = 166, - [895] = 895, - [896] = 896, - [897] = 897, - [898] = 383, - [899] = 899, - [900] = 886, - [901] = 901, - [902] = 382, - [903] = 899, - [904] = 40, - [905] = 905, - [906] = 897, - [907] = 907, - [908] = 405, - [909] = 897, - [910] = 910, - [911] = 911, - [912] = 912, - [913] = 913, - [914] = 914, - [915] = 915, - [916] = 916, - [917] = 917, - [918] = 918, - [919] = 919, - [920] = 920, - [921] = 921, - [922] = 922, - [923] = 923, - [924] = 924, - [925] = 925, - [926] = 926, - [927] = 927, - [928] = 928, - [929] = 929, - [930] = 930, - [931] = 931, - [932] = 932, - [933] = 933, - [934] = 934, - [935] = 935, - [936] = 936, - [937] = 937, - [938] = 938, - [939] = 939, - [940] = 940, - [941] = 941, - [942] = 942, - [943] = 943, - [944] = 944, - [945] = 945, - [946] = 946, - [947] = 947, - [948] = 948, - [949] = 949, - [950] = 950, - [951] = 951, - [952] = 952, - [953] = 953, - [954] = 954, - [955] = 955, - [956] = 956, - [957] = 957, - [958] = 958, - [959] = 959, - [960] = 960, - [961] = 961, - [962] = 962, - [963] = 963, - [964] = 964, - [965] = 965, - [966] = 966, - [967] = 967, - [968] = 968, - [969] = 969, - [970] = 970, - [971] = 971, - [972] = 972, - [973] = 973, - [974] = 974, - [975] = 975, - [976] = 976, - [977] = 977, - [978] = 978, - [979] = 979, - [980] = 980, - [981] = 981, - [982] = 982, - [983] = 983, - [984] = 984, - [985] = 985, - [986] = 986, - [987] = 987, - [988] = 988, - [989] = 989, - [990] = 990, - [991] = 991, - [992] = 992, - [993] = 993, - [994] = 994, - [995] = 995, - [996] = 996, - [997] = 997, - [998] = 998, - [999] = 999, - [1000] = 246, - [1001] = 1001, - [1002] = 1002, - [1003] = 1003, - [1004] = 1004, - [1005] = 1005, - [1006] = 12, - [1007] = 43, - [1008] = 65, - [1009] = 1009, - [1010] = 1010, - [1011] = 488, - [1012] = 224, - [1013] = 1013, - [1014] = 1014, - [1015] = 1015, - [1016] = 647, - [1017] = 22, - [1018] = 1013, - [1019] = 628, - [1020] = 307, - [1021] = 1021, - [1022] = 1022, - [1023] = 307, - [1024] = 926, - [1025] = 633, - [1026] = 656, - [1027] = 1021, - [1028] = 511, - [1029] = 1029, - [1030] = 225, - [1031] = 1031, - [1032] = 1032, - [1033] = 333, - [1034] = 508, - [1035] = 247, - [1036] = 1022, - [1037] = 647, - [1038] = 429, - [1039] = 129, - [1040] = 159, - [1041] = 1032, - [1042] = 21, - [1043] = 192, - [1044] = 231, - [1045] = 364, - [1046] = 1046, - [1047] = 1047, - [1048] = 69, - [1049] = 1049, - [1050] = 1050, - [1051] = 1051, - [1052] = 1052, - [1053] = 1053, - [1054] = 1054, - [1055] = 1010, - [1056] = 1056, - [1057] = 656, - [1058] = 488, - [1059] = 224, - [1060] = 1060, - [1061] = 1061, - [1062] = 1062, - [1063] = 1063, - [1064] = 1064, - [1065] = 431, - [1066] = 229, - [1067] = 1067, - [1068] = 1068, - [1069] = 1052, - [1070] = 1054, - [1071] = 1053, - [1072] = 640, - [1073] = 1073, - [1074] = 639, - [1075] = 1047, - [1076] = 1049, - [1077] = 1050, - [1078] = 1010, - [1079] = 1056, - [1080] = 1051, - [1081] = 1081, - [1082] = 1082, - [1083] = 1083, - [1084] = 1015, - [1085] = 385, - [1086] = 1014, - [1087] = 1087, - [1088] = 1088, - [1089] = 1089, - [1090] = 1090, - [1091] = 1091, - [1092] = 1092, - [1093] = 1093, - [1094] = 1094, - [1095] = 1095, - [1096] = 1096, - [1097] = 1097, - [1098] = 1098, - [1099] = 1099, - [1100] = 1100, - [1101] = 1101, - [1102] = 1102, - [1103] = 1103, - [1104] = 1104, - [1105] = 357, - [1106] = 1106, - [1107] = 1061, - [1108] = 1108, - [1109] = 510, - [1110] = 1110, - [1111] = 1111, - [1112] = 56, - [1113] = 1113, - [1114] = 113, - [1115] = 1068, - [1116] = 82, - [1117] = 155, - [1118] = 210, - [1119] = 110, - [1120] = 1062, - [1121] = 1046, - [1122] = 1088, - [1123] = 1089, - [1124] = 1104, - [1125] = 327, - [1126] = 1099, - [1127] = 1092, - [1128] = 1094, - [1129] = 1095, - [1130] = 1096, - [1131] = 1097, - [1132] = 1098, - [1133] = 47, - [1134] = 1014, - [1135] = 432, - [1136] = 567, - [1137] = 644, - [1138] = 1100, - [1139] = 1101, - [1140] = 1102, - [1141] = 1103, - [1142] = 165, - [1143] = 595, - [1144] = 1081, - [1145] = 1082, - [1146] = 1083, - [1147] = 1090, - [1148] = 1093, - [1149] = 81, - [1150] = 248, - [1151] = 20, - [1152] = 1152, - [1153] = 1153, - [1154] = 1015, - [1155] = 358, - [1156] = 433, - [1157] = 646, - [1158] = 472, - [1159] = 9, - [1160] = 1160, - [1161] = 1087, - [1162] = 1091, - [1163] = 1064, - [1164] = 1067, - [1165] = 1073, - [1166] = 642, - [1167] = 1167, - [1168] = 1168, - [1169] = 1169, - [1170] = 1170, - [1171] = 835, - [1172] = 1172, - [1173] = 1173, - [1174] = 1174, - [1175] = 1175, - [1176] = 14, - [1177] = 1177, - [1178] = 1178, - [1179] = 1029, - [1180] = 1031, - [1181] = 58, - [1182] = 653, - [1183] = 654, - [1184] = 655, - [1185] = 441, - [1186] = 101, - [1187] = 217, - [1188] = 1188, - [1189] = 1189, - [1190] = 1190, - [1191] = 1191, - [1192] = 1192, - [1193] = 157, - [1194] = 129, - [1195] = 1195, - [1196] = 112, - [1197] = 659, - [1198] = 1198, - [1199] = 1190, - [1200] = 1195, - [1201] = 1191, - [1202] = 1192, - [1203] = 521, - [1204] = 660, - [1205] = 1205, - [1206] = 1189, - [1207] = 1190, - [1208] = 1195, - [1209] = 1191, - [1210] = 1192, - [1211] = 521, - [1212] = 660, - [1213] = 1205, - [1214] = 1189, - [1215] = 1205, - [1216] = 658, - [1217] = 658, - [1218] = 1218, - [1219] = 1219, - [1220] = 1220, - [1221] = 1221, - [1222] = 1222, - [1223] = 57, - [1224] = 1224, - [1225] = 1225, - [1226] = 393, - [1227] = 149, - [1228] = 1228, - [1229] = 1229, - [1230] = 1230, - [1231] = 1231, - [1232] = 526, - [1233] = 19, - [1234] = 1228, - [1235] = 365, - [1236] = 1236, - [1237] = 526, - [1238] = 525, - [1239] = 1228, - [1240] = 1231, - [1241] = 391, - [1242] = 668, - [1243] = 1229, - [1244] = 1231, - [1245] = 391, - [1246] = 668, - [1247] = 1230, - [1248] = 1229, - [1249] = 1249, - [1250] = 196, - [1251] = 1251, - [1252] = 1060, - [1253] = 1253, - [1254] = 500, - [1255] = 531, - [1256] = 1256, - [1257] = 196, - [1258] = 531, - [1259] = 673, - [1260] = 1260, - [1261] = 1249, - [1262] = 509, - [1263] = 1263, - [1264] = 500, - [1265] = 1265, - [1266] = 677, - [1267] = 60, - [1268] = 680, - [1269] = 1265, - [1270] = 1270, - [1271] = 1270, - [1272] = 1272, - [1273] = 1273, - [1274] = 1273, - [1275] = 1275, - [1276] = 1273, - [1277] = 1277, - [1278] = 1278, - [1279] = 197, - [1280] = 535, - [1281] = 532, - [1282] = 1277, - [1283] = 535, - [1284] = 532, - [1285] = 1277, - [1286] = 197, - [1287] = 369, - [1288] = 369, - [1289] = 1289, - [1290] = 536, - [1291] = 1291, - [1292] = 1289, - [1293] = 1293, - [1294] = 536, - [1295] = 1295, - [1296] = 1289, - [1297] = 633, - [1298] = 1298, - [1299] = 1299, - [1300] = 1300, - [1301] = 1299, - [1302] = 1302, - [1303] = 1298, - [1304] = 1304, - [1305] = 1022, - [1306] = 1299, - [1307] = 1307, - [1308] = 1304, - [1309] = 1021, - [1310] = 511, - [1311] = 1311, - [1312] = 1307, - [1313] = 1307, - [1314] = 1304, - [1315] = 1298, - [1316] = 1316, - [1317] = 1316, - [1318] = 1318, - [1319] = 1316, - [1320] = 1320, - [1321] = 1321, - [1322] = 1322, - [1323] = 1323, - [1324] = 1324, - [1325] = 1325, - [1326] = 1326, - [1327] = 231, - [1328] = 1328, - [1329] = 1329, - [1330] = 116, - [1331] = 450, - [1332] = 257, - [1333] = 1329, - [1334] = 1334, - [1335] = 533, - [1336] = 1336, - [1337] = 84, - [1338] = 1338, - [1339] = 1339, - [1340] = 1340, - [1341] = 1341, - [1342] = 1342, - [1343] = 1343, - [1344] = 1344, - [1345] = 1345, - [1346] = 1346, - [1347] = 103, - [1348] = 80, - [1349] = 226, - [1350] = 1350, - [1351] = 1351, - [1352] = 1344, - [1353] = 1353, - [1354] = 1353, - [1355] = 1355, - [1356] = 1339, - [1357] = 1357, - [1358] = 1358, - [1359] = 709, - [1360] = 1346, - [1361] = 709, - [1362] = 1346, - [1363] = 1363, - [1364] = 1346, - [1365] = 1365, - [1366] = 1366, - [1367] = 714, - [1368] = 1368, - [1369] = 1369, - [1370] = 1370, - [1371] = 1371, - [1372] = 1063, - [1373] = 1373, - [1374] = 366, - [1375] = 1375, - [1376] = 1376, - [1377] = 681, - [1378] = 1378, - [1379] = 1379, - [1380] = 1380, - [1381] = 674, - [1382] = 1371, - [1383] = 1383, - [1384] = 1380, - [1385] = 97, - [1386] = 1369, - [1387] = 1370, - [1388] = 1383, - [1389] = 1389, - [1390] = 1390, - [1391] = 1391, - [1392] = 1392, - [1393] = 1375, - [1394] = 1376, - [1395] = 1378, - [1396] = 254, - [1397] = 341, - [1398] = 1379, - [1399] = 1389, - [1400] = 1400, - [1401] = 1401, - [1402] = 374, - [1403] = 1403, - [1404] = 1404, - [1405] = 1405, - [1406] = 1406, - [1407] = 1407, - [1408] = 1408, - [1409] = 1409, - [1410] = 1410, - [1411] = 1411, - [1412] = 1412, - [1413] = 1413, - [1414] = 1414, - [1415] = 1415, - [1416] = 1416, - [1417] = 1417, - [1418] = 1418, - [1419] = 1419, - [1420] = 1420, - [1421] = 1421, - [1422] = 1409, - [1423] = 1423, - [1424] = 404, - [1425] = 1409, - [1426] = 404, - [1427] = 1427, - [1428] = 1428, - [1429] = 1429, - [1430] = 1430, - [1431] = 1431, - [1432] = 1432, - [1433] = 1433, - [1434] = 1434, - [1435] = 1435, - [1436] = 1436, - [1437] = 1437, - [1438] = 1438, - [1439] = 1439, - [1440] = 1440, - [1441] = 1441, - [1442] = 1442, - [1443] = 1443, - [1444] = 1444, - [1445] = 1445, - [1446] = 1446, - [1447] = 1447, - [1448] = 1432, - [1449] = 1449, - [1450] = 1450, - [1451] = 1451, - [1452] = 219, - [1453] = 1429, - [1454] = 1454, - [1455] = 1455, - [1456] = 1456, - [1457] = 262, - [1458] = 1458, - [1459] = 1459, - [1460] = 1460, - [1461] = 1451, - [1462] = 1427, - [1463] = 727, - [1464] = 1438, - [1465] = 1439, - [1466] = 1428, - [1467] = 1444, - [1468] = 1460, - [1469] = 1427, - [1470] = 1470, - [1471] = 1471, - [1472] = 1472, - [1473] = 1473, - [1474] = 1474, - [1475] = 1475, - [1476] = 1476, - [1477] = 363, - [1478] = 1451, - [1479] = 566, - [1480] = 1459, - [1481] = 1438, - [1482] = 1439, - [1483] = 1483, - [1484] = 1444, - [1485] = 1460, - [1486] = 1470, - [1487] = 1470, - [1488] = 1441, - [1489] = 1489, - [1490] = 1490, - [1491] = 1491, - [1492] = 1492, - [1493] = 1493, - [1494] = 1494, - [1495] = 1454, - [1496] = 1496, - [1497] = 1447, - [1498] = 1498, - [1499] = 1499, - [1500] = 1447, - [1501] = 1501, - [1502] = 1483, - [1503] = 1473, - [1504] = 1459, - [1505] = 451, - [1506] = 1506, - [1507] = 1507, - [1508] = 1508, - [1509] = 1509, - [1510] = 1510, - [1511] = 1511, - [1512] = 1512, - [1513] = 1513, - [1514] = 1514, - [1515] = 1515, - [1516] = 1516, - [1517] = 1517, - [1518] = 1518, - [1519] = 1519, - [1520] = 1520, - [1521] = 1521, - [1522] = 1522, - [1523] = 1523, - [1524] = 735, - [1525] = 1525, - [1526] = 1526, - [1527] = 1527, - [1528] = 1528, - [1529] = 178, - [1530] = 1530, - [1531] = 1531, - [1532] = 1532, - [1533] = 1507, - [1534] = 1534, - [1535] = 1535, - [1536] = 1536, - [1537] = 1537, - [1538] = 1538, - [1539] = 89, - [1540] = 1511, - [1541] = 1541, - [1542] = 735, - [1543] = 1543, - [1544] = 1544, - [1545] = 1545, - [1546] = 1546, - [1547] = 1547, - [1548] = 1548, - [1549] = 1549, - [1550] = 1550, - [1551] = 1551, - [1552] = 1552, - [1553] = 1553, - [1554] = 1554, - [1555] = 1522, - [1556] = 1547, - [1557] = 1557, - [1558] = 178, - [1559] = 145, - [1560] = 1560, - [1561] = 1561, - [1562] = 1562, - [1563] = 137, - [1564] = 1560, - [1565] = 1565, - [1566] = 1566, - [1567] = 1567, - [1568] = 1568, - [1569] = 1516, - [1570] = 1570, - [1571] = 1562, - [1572] = 1572, - [1573] = 1573, - [1574] = 238, - [1575] = 1575, - [1576] = 1576, - [1577] = 1577, - [1578] = 1578, - [1579] = 1579, - [1580] = 1568, - [1581] = 1581, - [1582] = 1573, - [1583] = 1583, - [1584] = 1575, - [1585] = 1583, - [1586] = 1514, - [1587] = 1587, - [1588] = 1588, - [1589] = 1589, - [1590] = 710, - [1591] = 1591, - [1592] = 1592, - [1593] = 416, - [1594] = 1594, - [1595] = 1595, - [1596] = 1596, - [1597] = 1597, - [1598] = 1598, - [1599] = 1599, - [1600] = 1600, - [1601] = 1601, - [1602] = 106, - [1603] = 710, - [1604] = 1592, - [1605] = 1605, - [1606] = 1606, - [1607] = 746, - [1608] = 1601, - [1609] = 1592, - [1610] = 1610, - [1611] = 1611, - [1612] = 1595, - [1613] = 1613, - [1614] = 1614, - [1615] = 1615, - [1616] = 1616, - [1617] = 240, - [1618] = 1618, - [1619] = 239, - [1620] = 471, - [1621] = 379, - [1622] = 1622, - [1623] = 379, - [1624] = 1624, - [1625] = 1625, - [1626] = 576, +static const uint8_t ts_primary_state_bitmap[] = { + 255, 255, 255, 255, 255, 255, 255, 247, 251, 247, 255, 251, 255, 255, 127, 255, + 255, 255, 127, 175, 241, 254, 255, 255, 255, 253, 255, 255, 255, 255, 221, 255, + 255, 242, 127, 221, 254, 239, 239, 254, 157, 255, 255, 247, 247, 123, 223, 239, + 251, 255, 255, 255, 179, 255, 247, 179, 255, 255, 255, 247, 49, 255, 63, 252, + 31, 238, 249, 255, 255, 251, 223, 255, 127, 190, 24, 255, 255, 255, 57, 134, + 245, 254, 253, 93, 47, 255, 255, 255, 255, 255, 191, 254, 247, 215, 239, 223, + 223, 0, 0, 2, 0, 0, 0, 0, 184, 103, 229, 12, 4, 0, 64, 128, + 43, 202, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 230, 96, + 160, 1, 192, 126, 241, 25, 2, 142, 255, 255, 213, 2, 0, 0, 0, 0, + 3, 129, 247, 6, 240, 73, 32, 0, 124, 243, 16, 0, 42, 145, 66, 107, + 0, 170, 92, 137, 80, 127, 67, 253, 199, 106, 104, 175, 157, 224, 1, 251, + 255, 191, 248, 255, 255, 206, 29, 192, 31, 8, 126, 45, 252, 255, 239, 221, + 167, 255, 39, 231, 181, 175, 184, 253, 99, 236, 69, 3, }; static const TSSymbol ts_supertype_symbols[SUPERTYPE_COUNT] = { @@ -7990,7 +6376,7 @@ static const TSLexerMode ts_lex_modes[] = { [52] = {.lex_state = 1, .lex_state_after_extra = 1, .external_lex_state = 0, .external_lex_state_after_extra = 0, .reserved_word_set_id = 43}, }; -static const uint16_t ts_lex_mode_ids[STATE_COUNT] = { +static const uint8_t ts_lex_mode_ids[STATE_COUNT] = { 0, 1, 2, 3, 4, 2, 1, 0, 5, 2, 5, 3, 6, 7, 8, 7, 0, 9, 7, 5, 10, 11, 11, 12, 1, 3, 5, 3, 0, 13, 1, 0, 0, 1, 14, 14, 0, 0, 0, 14, 13, 12, 0, 6, 12, 5, 13, 15, @@ -25423,7 +23809,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_java(void) { .keyword_lex_fn = ts_lex_keywords, .keyword_lookup_fn = ts_keyword_lookup, .keyword_capture_token = sym_identifier, - .primary_state_ids = ts_primary_state_ids, + .primary_state_bitmap = ts_primary_state_bitmap, .name = "java", .reserved_words = ts_reserved_words, .reserved_word_slices = ts_reserved_word_slices, diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index bb0b916..3544256 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -166,7 +166,7 @@ struct TSLanguage { unsigned (*serialize)(void *, char *); void (*deserialize)(void *, const char *, unsigned); } external_scanner; - const TSStateId *primary_state_ids; + const uint8_t *primary_state_bitmap; const char *name; const TSSymbol *reserved_words; uint16_t max_reserved_word_set_size; @@ -177,7 +177,7 @@ struct TSLanguage { TSLanguageMetadata metadata; const uint32_t *alias_sequence_offsets; uint32_t alias_sequence_count; - const uint16_t *lex_mode_ids; + const void *lex_mode_ids; uint32_t lex_mode_count; const TSMapSlice *reserved_word_slices; uint32_t external_state_stride;