From 4fd132df3dd4b7bc109d3e2115bbd653259b04f8 Mon Sep 17 00:00:00 2001 From: Shadaj Laddad Date: Thu, 10 Oct 2024 13:37:05 -0700 Subject: [PATCH] Bump Tree Sitter to 0.24.3 --- .github/workflows/ci.yml | 6 +- Cargo.lock | 971 +++++++-------------------------------- common/Cargo.toml | 4 +- common/src/lib.rs | 2 +- example/Cargo.toml | 2 +- macro/Cargo.toml | 10 +- macro/src/expansion.rs | 12 +- macro/src/lib.rs | 6 +- runtime/Cargo.toml | 6 +- tool/Cargo.toml | 18 +- tool/src/expansion.rs | 23 +- tool/src/lib.rs | 31 +- 12 files changed, 231 insertions(+), 860 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 281c6a9..9070138 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,11 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build - run: cargo build --verbose + run: cargo build - name: Run tests - run: cargo test --verbose + run: cargo test + - name: Run macro tests + run: cargo test -p rust-sitter-macro -- tests test-wasm: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index ac0e47d..be6278c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,86 +11,17 @@ dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" - -[[package]] -name = "ascii" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" @@ -98,12 +29,6 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - [[package]] name = "c2rust-bitfields" version = "0.3.0" @@ -126,15 +51,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.94" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -142,58 +64,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "chunked_transfer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" - -[[package]] -name = "clap" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - [[package]] name = "codemap" version = "0.1.3" @@ -210,22 +80,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "console" version = "0.15.8" @@ -248,59 +102,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "ctrlc" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" -dependencies = [ - "nix", - "windows-sys 0.52.0", -] - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -315,9 +116,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -325,21 +126,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys 0.52.0", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "form_urlencoded" @@ -350,38 +139,11 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs4" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dabded2e32cd57ded879041205c60a4a4c4bab47bd0fd2fa8b01f30849f02b" -dependencies = [ - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "getrandom" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -389,30 +151,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "html-escape" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" -dependencies = [ - "utf8-width", -] - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "idna" version = "0.5.0" @@ -425,9 +163,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -441,9 +179,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "insta" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "lazy_static", @@ -457,68 +195,26 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if", - "windows-targets 0.52.5", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "linked-hash-map" @@ -528,56 +224,30 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "ndk-context" -version = "0.1.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "nix" -version = "0.28.0" +name = "minicov" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", + "cc", + "walkdir", ] [[package]] @@ -586,12 +256,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -600,53 +264,27 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -656,9 +294,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -667,9 +305,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rust-sitter" @@ -687,7 +325,7 @@ name = "rust-sitter-common" version = "0.4.2" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.75", ] [[package]] @@ -710,7 +348,7 @@ dependencies = [ "proc-macro2", "quote", "rust-sitter-common", - "syn 1.0.109", + "syn 2.0.75", "tempfile", ] @@ -723,26 +361,26 @@ dependencies = [ "rust-sitter-common", "serde", "serde_json", - "syn 1.0.109", + "syn 2.0.75", "syn-inline-mod", "tempfile", "tree-sitter", - "tree-sitter-cli", + "tree-sitter-generate", ] [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -751,9 +389,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -772,47 +410,57 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "serde" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "indexmap", "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "similar" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "smallbitvec" @@ -821,10 +469,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3fc564a4b53fd1e8589628efafe57602d91bde78be18186b5f61e8faea470" [[package]] -name = "strsim" -version = "0.11.1" +name = "streaming-iterator" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" [[package]] name = "syn" @@ -839,9 +487,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -850,24 +498,25 @@ dependencies = [ [[package]] name = "syn-inline-mod" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b670f535364c67358ecffb60b9f2579f9b45d3c71e8cca6d45d22ee0fadaa7eb" +checksum = "2fa6dca1fdb7b2ed46dd534a326725419d4fb10f23d8c85a8b2860e5eb25d0f9" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.75", ] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -879,43 +528,11 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "thiserror" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "tiny_http" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" -dependencies = [ - "ascii", - "chunked_transfer", - "httpdate", - "log", -] - [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -928,123 +545,59 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tree-sitter" -version = "0.22.5" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688200d842c76dd88f9a7719ecb0483f79f5a766fb1c100756d5d8a059abc71b" +checksum = "f9871f16d6cf5c4757dcf30d5d2172a2df6987c510c017bbb7abfb7f9aa24d06" dependencies = [ "cc", "regex", + "regex-syntax", + "streaming-iterator", + "tree-sitter-language", ] [[package]] name = "tree-sitter-c2rust" -version = "0.22.5" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b6691846f063193072c546a0c1722d3ccce95ecf8adbb31ab371553e250629a" +checksum = "a5f97c8ed19295f92e02af90c915c72d0836e08132f155709bc45b66acdfde35" dependencies = [ "c2rust-bitfields", "once_cell", "regex", + "regex-syntax", + "streaming-iterator", + "tree-sitter-language", ] [[package]] -name = "tree-sitter-cli" -version = "0.22.5" +name = "tree-sitter-generate" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea7bd10965fc22a4701c893f5ab0396c8bc546d6ee14ed02748097ff9a0afe9" +checksum = "169563a4e3713ad23a2a755446ed1e3af7db5cfc3b8beb0986b7e96f3619aec3" dependencies = [ - "ansi_term", - "anstyle", "anyhow", - "clap", - "ctrlc", - "difference", - "dirs", - "filetime", - "glob", "heck", - "html-escape", "indexmap", "indoc", "lazy_static", "log", - "memchr", "regex", "regex-syntax", "rustc-hash", "semver", "serde", - "serde_derive", "serde_json", "smallbitvec", - "tiny_http", "tree-sitter", - "tree-sitter-config", - "tree-sitter-highlight", - "tree-sitter-loader", - "tree-sitter-tags", - "walkdir", - "wasmparser", - "webbrowser", -] - -[[package]] -name = "tree-sitter-config" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a8030ede22ade2ba5d7fe2cd0fb822086003f6dd47e8f408c6228ccd7792a4" -dependencies = [ - "anyhow", - "dirs", - "serde", - "serde_json", -] - -[[package]] -name = "tree-sitter-highlight" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9442daef896b114ed618a5e11c9ba9663796ab3600e544d57f2dc980fa0d2d78" -dependencies = [ - "lazy_static", - "regex", - "thiserror", - "tree-sitter", -] - -[[package]] -name = "tree-sitter-loader" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c7608bfbd6acc9ebbd33ce217a76e9dcec7aa51298fa0a62640fc6d20d6813" -dependencies = [ - "anyhow", - "cc", - "dirs", - "fs4", - "indoc", - "libloading", - "once_cell", - "regex", - "serde", - "serde_json", - "tempfile", - "tree-sitter", - "tree-sitter-highlight", - "tree-sitter-tags", + "url", ] [[package]] -name = "tree-sitter-tags" -version = "0.22.5" +name = "tree-sitter-language" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ead9a7ca8d8b4d3901f5e747697123b844961466629c481d34e395386100e10" -dependencies = [ - "memchr", - "regex", - "thiserror", - "tree-sitter", -] +checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600" [[package]] name = "unicode-bidi" @@ -1069,27 +622,16 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] -[[package]] -name = "utf8-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "walkdir" version = "2.5.0" @@ -1100,42 +642,37 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -1145,9 +682,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1155,31 +692,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-bindgen-test" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" +checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" dependencies = [ "console_error_panic_hook", "js-sys", + "minicov", "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", @@ -1188,100 +726,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" +checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", -] - -[[package]] -name = "wasmparser" -version = "0.201.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" -dependencies = [ - "bitflags 2.5.0", - "indexmap", - "semver", + "syn 2.0.75", ] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db67ae75a9405634f5882791678772c94ff5f16a66535aae186e26aa0841fc8b" -dependencies = [ - "core-foundation", - "home", - "jni", - "log", - "ndk-context", - "objc", - "raw-window-handle", - "url", - "web-sys", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-sys 0.59.0", ] [[package]] @@ -1290,183 +760,78 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/common/Cargo.toml b/common/Cargo.toml index 86bb9b4..2da7f89 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -14,5 +14,5 @@ categories = ["development-tools"] path = "src/lib.rs" [dependencies] -syn = { version = "1.0", features = [ "full", "extra-traits" ] } -quote = "1.0" +syn = { version = "2", features = [ "full", "extra-traits" ] } +quote = "1" diff --git a/common/src/lib.rs b/common/src/lib.rs index 300dab7..8aa06ca 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -35,7 +35,7 @@ impl Parse for FieldThenParams { let field = Field::parse_unnamed(input)?; let comma: Option = input.parse()?; let params = if comma.is_some() { - input.parse_terminated(NameValueExpr::parse)? + Punctuated::parse_terminated_with(input, NameValueExpr::parse)? } else { Punctuated::new() }; diff --git a/example/Cargo.toml b/example/Cargo.toml index 3e86a9e..6c942c8 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -19,5 +19,5 @@ codemap-diagnostic = "0.1.1" rust-sitter-tool = { path = "../tool" } [dev-dependencies] -insta = "1.7.1" +insta = "1.39" wasm-bindgen-test = "0.3.0" diff --git a/macro/Cargo.toml b/macro/Cargo.toml index d93118e..c395561 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -15,11 +15,11 @@ proc-macro = true path = "src/lib.rs" [dependencies] -syn = { version = "1.0", features = [ "full", "extra-traits" ] } -quote = "1.0" -proc-macro2 = "1.0.67" +syn = { version = "2", features = [ "full", "extra-traits" ] } +quote = "1" +proc-macro2 = "1" rust-sitter-common = { version= "0.4.2", path = "../common" } [dev-dependencies] -insta = "1.7.1" -tempfile = "3.2.0" +insta = "1.39" +tempfile = "3" diff --git a/macro/src/expansion.rs b/macro/src/expansion.rs index 52f788f..75c2b80 100644 --- a/macro/src/expansion.rs +++ b/macro/src/expansion.rs @@ -7,7 +7,7 @@ use rust_sitter_common::*; use syn::{parse::Parse, punctuated::Punctuated, *}; fn is_sitter_attr(attr: &Attribute) -> bool { - attr.path + attr.path() .segments .iter() .next() @@ -35,7 +35,7 @@ fn gen_field(ident_str: String, leaf: Field) -> Expr { let leaf_attr = leaf .attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::leaf)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::leaf)); let leaf_params = leaf_attr.and_then(|a| { a.parse_args_with(Punctuated::::parse_terminated) @@ -77,6 +77,7 @@ fn gen_struct_or_variant( let dummy_field = Field { attrs: container_attrs, vis: Visibility::Inherited, + mutability: FieldMutability::None, ident: None, colon_token: None, ty: Type::Verbatim(quote!(())), // unit type. @@ -93,7 +94,7 @@ fn gen_struct_or_variant( let expr = if let Some(skip_attrs) = field .attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::skip)) + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::skip)) { skip_attrs.parse_args::()? } else { @@ -167,7 +168,7 @@ pub fn expand_grammar(input: ItemMod) -> Result { .attrs .iter() .find_map(|a| { - if a.path == syn::parse_quote!(rust_sitter::grammar) { + if a.path() == &syn::parse_quote!(rust_sitter::grammar) { let grammar_name_expr = a.parse_args_with(Expr::parse).ok(); if let Some(Expr::Lit(ExprLit { attrs: _, @@ -202,7 +203,7 @@ pub fn expand_grammar(input: ItemMod) -> Result { | Item::Struct(ItemStruct { ident, attrs, .. }) => { if attrs .iter() - .any(|attr| attr.path == syn::parse_quote!(rust_sitter::language)) + .any(|attr| attr.path() == &syn::parse_quote!(rust_sitter::language)) { Some(ident.clone()) } else { @@ -334,6 +335,7 @@ pub fn expand_grammar(input: ItemMod) -> Result { Ok(ItemMod { attrs: filtered_attrs, vis: input.vis, + unsafety: None, mod_token: input.mod_token, ident: input.ident, content: Some((brace, transformed)), diff --git a/macro/src/lib.rs b/macro/src/lib.rs index 9ff5d09..d65d083 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -1,5 +1,5 @@ use quote::ToTokens; -use syn::{parse_macro_input, AttributeArgs, ItemMod}; +use syn::{parse_macro_input, ItemMod}; mod errors; mod expansion; @@ -212,10 +212,10 @@ pub fn grammar( attr: proc_macro::TokenStream, input: proc_macro::TokenStream, ) -> proc_macro::TokenStream { - let attrs: AttributeArgs = parse_macro_input!(attr); + let attr_tokens: proc_macro2::TokenStream = attr.into(); let module: ItemMod = parse_macro_input!(input); let expanded = expand_grammar(syn::parse_quote! { - #[rust_sitter::grammar[#(#attrs),*]] + #[rust_sitter::grammar[#attr_tokens]] #module }) .map(ToTokens::into_token_stream) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index d3cf395..c98a21d 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -19,10 +19,10 @@ tree-sitter-c2rust = ["tree-sitter-runtime-c2rust"] tree-sitter-standard = ["tree-sitter-runtime-standard"] [dependencies] -tree-sitter-runtime-c2rust = { package = "tree-sitter-c2rust", version = "0.22.5", optional = true } -tree-sitter-runtime-standard = { package = "tree-sitter", version = "0.22.5", optional = true } +tree-sitter-runtime-c2rust = { package = "tree-sitter-c2rust", version = "0.24.3", optional = true } +tree-sitter-runtime-standard = { package = "tree-sitter", version = "0.24.3", optional = true } rust-sitter-macro = { version = "0.4.2", path = "../macro" } [dev-dependencies] -insta = "1.7.1" +insta = "1.39" tempfile = "3.2.0" diff --git a/tool/Cargo.toml b/tool/Cargo.toml index 983c281..acc5c59 100644 --- a/tool/Cargo.toml +++ b/tool/Cargo.toml @@ -12,19 +12,19 @@ categories = ["development-tools"] [features] default = ["build_parsers"] -build_parsers = ["dep:tempfile", "dep:tree-sitter", "dep:tree-sitter-cli", "dep:cc"] +build_parsers = ["dep:tempfile", "dep:tree-sitter", "dep:tree-sitter-generate", "dep:cc"] [dependencies] -syn = { version = "1.0", features = [ "full", "extra-traits" ] } -syn-inline-mod = "0.5.0" -serde = { version = "1.0", features = ["derive"] } +syn = { version = "2", features = [ "full", "extra-traits" ] } +syn-inline-mod = "0.6" +serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } rust-sitter-common = { version = "0.4.2", path = "../common" } -tempfile = { version = "3.0.0", optional = true } -tree-sitter = { package = "tree-sitter", version = "0.22.5", optional = true } -tree-sitter-cli = { package = "tree-sitter-cli", version = "0.22.5", optional = true } -cc = { version = "1.0.73", optional = true } +tempfile = { version = "3", optional = true } +tree-sitter = { version = "0.24.3", optional = true } +tree-sitter-generate = { version = "0.24.3", optional = true } +cc = { version = "1", optional = true } [dev-dependencies] -insta = "1.7.1" +insta = "1.39" diff --git a/tool/src/expansion.rs b/tool/src/expansion.rs index bc30a71..8aa9cf8 100644 --- a/tool/src/expansion.rs +++ b/tool/src/expansion.rs @@ -13,11 +13,11 @@ fn gen_field( ) -> (Value, bool) { let leaf_attr = leaf_attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::leaf)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::leaf)); if leaf_attrs .iter() - .any(|attr| attr.path == syn::parse_quote!(rust_sitter::word)) + .any(|attr| attr.path() == &syn::parse_quote!(rust_sitter::word)) { if word_rule.is_some() { panic!("Multiple `word` rules specified"); @@ -121,7 +121,7 @@ fn gen_field( let delimited_attr = leaf_attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::delimited)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::delimited)); let delimited_params = delimited_attr.and_then(|a| a.parse_args_with(FieldThenParams::parse).ok()); @@ -138,7 +138,7 @@ fn gen_field( let repeat_attr = leaf_attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::repeat)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::repeat)); let repeat_params = repeat_attr.and_then(|a| { a.parse_args_with(Punctuated::::parse_terminated) @@ -289,7 +289,7 @@ fn gen_struct_or_variant( if field .attrs .iter() - .any(|attr| attr.path == syn::parse_quote!(rust_sitter::skip)) + .any(|attr| attr.path() == &syn::parse_quote!(rust_sitter::skip)) { None } else { @@ -306,19 +306,19 @@ fn gen_struct_or_variant( let prec_attr = attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::prec)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::prec)); let prec_param = prec_attr.and_then(|a| a.parse_args_with(Expr::parse).ok()); let prec_left_attr = attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::prec_left)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::prec_left)); let prec_left_param = prec_left_attr.and_then(|a| a.parse_args_with(Expr::parse).ok()); let prec_right_attr = attrs .iter() - .find(|attr| attr.path == syn::parse_quote!(rust_sitter::prec_right)); + .find(|attr| attr.path() == &syn::parse_quote!(rust_sitter::prec_right)); let prec_right_param = prec_right_attr.and_then(|a| a.parse_args_with(Expr::parse).ok()); @@ -327,6 +327,7 @@ fn gen_struct_or_variant( let dummy_field = Field { attrs: attrs.clone(), vis: Visibility::Inherited, + mutability: FieldMutability::None, ident: None, colon_token: None, ty: Type::Tuple(TypeTuple { @@ -398,7 +399,7 @@ pub fn generate_grammar(module: &ItemMod) -> Value { .attrs .iter() .find_map(|a| { - if a.path == syn::parse_quote!(rust_sitter::grammar) { + if a.path() == &syn::parse_quote!(rust_sitter::grammar) { let grammar_name_expr = a.parse_args_with(Expr::parse).ok(); if let Some(Expr::Lit(ExprLit { attrs: _, @@ -424,7 +425,7 @@ pub fn generate_grammar(module: &ItemMod) -> Value { | Item::Struct(ItemStruct { ident, attrs, .. }) => { if attrs .iter() - .any(|attr| attr.path == syn::parse_quote!(rust_sitter::language)) + .any(|attr| attr.path() == &syn::parse_quote!(rust_sitter::language)) { Some(ident.clone()) } else { @@ -487,7 +488,7 @@ pub fn generate_grammar(module: &ItemMod) -> Value { if attrs .iter() - .any(|a| a.path == syn::parse_quote!(rust_sitter::extra)) + .any(|a| a.path() == &syn::parse_quote!(rust_sitter::extra)) { extras_list.push(json!({ "type": "SYMBOL", diff --git a/tool/src/lib.rs b/tool/src/lib.rs index bc10702..cffe21e 100644 --- a/tool/src/lib.rs +++ b/tool/src/lib.rs @@ -23,7 +23,7 @@ fn generate_all_grammars(item: &Item, out: &mut Vec) { if m.attrs .iter() - .any(|a| a.path == parse_quote!(rust_sitter::grammar)) + .any(|a| a.path() == &parse_quote!(rust_sitter::grammar)) { out.push(generate_grammar(m)) } @@ -35,7 +35,7 @@ use std::io::Write; use std::path::Path; #[cfg(feature = "build_parsers")] -use tree_sitter_cli::generate; +use tree_sitter_generate::generate_parser_for_grammar; #[cfg(feature = "build_parsers")] /// Using the `cc` crate, generates and compiles a C parser with Tree Sitter @@ -49,7 +49,7 @@ pub fn build_parsers(root_file: &Path) { .unwrap_or(false); generate_grammars(root_file).iter().for_each(|grammar| { let (grammar_name, grammar_c) = - generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); let tempfile = tempfile::Builder::new() .prefix("grammar") .tempdir() @@ -136,6 +136,7 @@ mod tests { use syn::parse_quote; use super::generate_grammar; + use tree_sitter_generate::generate_parser_for_grammar; #[test] fn enum_with_named_field() { @@ -163,7 +164,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -187,7 +188,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -216,7 +217,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -247,7 +248,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -277,7 +278,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -305,7 +306,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -341,7 +342,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -373,7 +374,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -410,7 +411,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -440,7 +441,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -469,7 +470,7 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } #[test] @@ -499,6 +500,6 @@ mod tests { let grammar = generate_grammar(&m); insta::assert_snapshot!(grammar); - tree_sitter_cli::generate::generate_parser_for_grammar(&grammar.to_string()).unwrap(); + generate_parser_for_grammar(&grammar.to_string()).unwrap(); } }