tree_sitter_language_pack 1.21.1 → 1.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -1
- data/ext/ts_pack_core_rb/native/Cargo.lock +79 -113
- data/ext/ts_pack_core_rb/native/Cargo.toml +7 -8
- data/ext/ts_pack_core_rb/src/lib.rs +85 -118
- data/lib/tree_sitter_language_pack/version.rb +2 -2
- metadata +8 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b932d4e0d29b4d46f2fd628c953702f46efaaf59259c61ec94d19ad1e5b34fdf
|
|
4
|
+
data.tar.gz: 8e36da820df272bb56f0308d4bbd29ffaff14b78f5ce6ee656a96ba099f4229c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46baef3fec6b5d9b4301e7369cd7f296f646e37a060e60752e0094b7e1c92caf938e5c0e28f771552a793540136d24b2a0ff906eef994fd0e46538bb5efc468b
|
|
7
|
+
data.tar.gz: b2ec457ec7ede3213f8b31c93cef34a49b5dd73778dc0b7b276da08ce8d2f184c23e5249a779ef92332eaccc682f1272dfc2aa6819e0b97df6cbaa49f5302a6d
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- This file is auto-generated by alef — DO NOT EDIT. -->
|
|
2
|
-
<!-- alef:hash:
|
|
2
|
+
<!-- alef:hash:6201d791e1c78e0bb55ad74a18ecf2305cdbedfcf5d7a79c52346d5ac695e68c -->
|
|
3
3
|
<!-- To regenerate: alef readme -->
|
|
4
4
|
<!-- To verify freshness: alef verify -->
|
|
5
5
|
|
|
@@ -116,6 +116,19 @@ Pre-compiled tree-sitter grammars for 372 programming languages with Ruby bindin
|
|
|
116
116
|
gem install tree_sitter_language_pack
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
+
## Coding-agent plugin
|
|
120
|
+
|
|
121
|
+
Install the [tree-sitter-language-pack plugin](https://github.com/xberg-io/tree-sitter-language-pack/blob/main/plugin/README.md)
|
|
122
|
+
for product skills and runtime integrations, or install [public skills](https://github.com/xberg-io/tree-sitter-language-pack/tree/main/skills)
|
|
123
|
+
independently:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
npx skills add xberg-io/tree-sitter-language-pack
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Select the skills and target agents interactively. Install the product CLI separately for
|
|
130
|
+
executable operations; the skill installer adds instructions only.
|
|
131
|
+
|
|
119
132
|
## Quick Start
|
|
120
133
|
|
|
121
134
|
```ruby title="Ruby"
|
|
@@ -76,12 +76,6 @@ version = "3.20.3"
|
|
|
76
76
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
77
77
|
checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
|
|
78
78
|
|
|
79
|
-
[[package]]
|
|
80
|
-
name = "byteorder"
|
|
81
|
-
version = "1.5.0"
|
|
82
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
-
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
84
|
-
|
|
85
79
|
[[package]]
|
|
86
80
|
name = "bytes"
|
|
87
81
|
version = "1.12.1"
|
|
@@ -90,9 +84,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
90
84
|
|
|
91
85
|
[[package]]
|
|
92
86
|
name = "cc"
|
|
93
|
-
version = "1.
|
|
87
|
+
version = "1.10.0"
|
|
94
88
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
-
checksum = "
|
|
89
|
+
checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0"
|
|
96
90
|
dependencies = [
|
|
97
91
|
"find-msvc-tools",
|
|
98
92
|
"jobserver",
|
|
@@ -128,9 +122,9 @@ dependencies = [
|
|
|
128
122
|
|
|
129
123
|
[[package]]
|
|
130
124
|
name = "combine"
|
|
131
|
-
version = "4.6.
|
|
125
|
+
version = "4.6.9"
|
|
132
126
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
-
checksum = "
|
|
127
|
+
checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92"
|
|
134
128
|
dependencies = [
|
|
135
129
|
"bytes",
|
|
136
130
|
"memchr",
|
|
@@ -189,9 +183,9 @@ dependencies = [
|
|
|
189
183
|
|
|
190
184
|
[[package]]
|
|
191
185
|
name = "crc32fast"
|
|
192
|
-
version = "1.5.
|
|
186
|
+
version = "1.5.3"
|
|
193
187
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
-
checksum = "
|
|
188
|
+
checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
|
|
195
189
|
dependencies = [
|
|
196
190
|
"cfg-if",
|
|
197
191
|
]
|
|
@@ -251,9 +245,9 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
|
|
|
251
245
|
|
|
252
246
|
[[package]]
|
|
253
247
|
name = "equivalent"
|
|
254
|
-
version = "1.0.
|
|
248
|
+
version = "1.0.3"
|
|
255
249
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
-
checksum = "
|
|
250
|
+
checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
|
|
257
251
|
|
|
258
252
|
[[package]]
|
|
259
253
|
name = "errno"
|
|
@@ -288,9 +282,9 @@ dependencies = [
|
|
|
288
282
|
|
|
289
283
|
[[package]]
|
|
290
284
|
name = "find-msvc-tools"
|
|
291
|
-
version = "0.1.
|
|
285
|
+
version = "0.1.15"
|
|
292
286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
293
|
-
checksum = "
|
|
287
|
+
checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
|
|
294
288
|
|
|
295
289
|
[[package]]
|
|
296
290
|
name = "flate2"
|
|
@@ -303,6 +297,12 @@ dependencies = [
|
|
|
303
297
|
"zlib-rs",
|
|
304
298
|
]
|
|
305
299
|
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "foldhash"
|
|
302
|
+
version = "0.2.0"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
|
305
|
+
|
|
306
306
|
[[package]]
|
|
307
307
|
name = "getrandom"
|
|
308
308
|
version = "0.2.17"
|
|
@@ -450,9 +450,9 @@ dependencies = [
|
|
|
450
450
|
|
|
451
451
|
[[package]]
|
|
452
452
|
name = "js-sys"
|
|
453
|
-
version = "0.3.
|
|
453
|
+
version = "0.3.107"
|
|
454
454
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
455
|
-
checksum = "
|
|
455
|
+
checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
|
|
456
456
|
dependencies = [
|
|
457
457
|
"cfg-if",
|
|
458
458
|
"wasm-bindgen",
|
|
@@ -466,9 +466,9 @@ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
|
466
466
|
|
|
467
467
|
[[package]]
|
|
468
468
|
name = "libc"
|
|
469
|
-
version = "0.2.
|
|
469
|
+
version = "0.2.191"
|
|
470
470
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
-
checksum = "
|
|
471
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
472
472
|
|
|
473
473
|
[[package]]
|
|
474
474
|
name = "libloading"
|
|
@@ -507,15 +507,15 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
|
507
507
|
|
|
508
508
|
[[package]]
|
|
509
509
|
name = "log"
|
|
510
|
-
version = "0.4.
|
|
510
|
+
version = "0.4.35"
|
|
511
511
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
512
|
-
checksum = "
|
|
512
|
+
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
|
513
513
|
|
|
514
514
|
[[package]]
|
|
515
515
|
name = "magnus"
|
|
516
|
-
version = "0.9.
|
|
516
|
+
version = "0.9.3"
|
|
517
517
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
-
checksum = "
|
|
518
|
+
checksum = "40ef424404d166cbb71c8b8d19c9c589c748c4547c1afa1928c5504299f6c713"
|
|
519
519
|
dependencies = [
|
|
520
520
|
"magnus-macros",
|
|
521
521
|
"rb-sys",
|
|
@@ -574,9 +574,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
574
574
|
|
|
575
575
|
[[package]]
|
|
576
576
|
name = "openssl-probe"
|
|
577
|
-
version = "0.2.
|
|
577
|
+
version = "0.2.2"
|
|
578
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
579
|
-
checksum = "
|
|
579
|
+
checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1"
|
|
580
580
|
|
|
581
581
|
[[package]]
|
|
582
582
|
name = "option-ext"
|
|
@@ -726,9 +726,9 @@ dependencies = [
|
|
|
726
726
|
|
|
727
727
|
[[package]]
|
|
728
728
|
name = "rustix"
|
|
729
|
-
version = "1.1.
|
|
729
|
+
version = "1.1.6"
|
|
730
730
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
731
|
-
checksum = "
|
|
731
|
+
checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
|
|
732
732
|
dependencies = [
|
|
733
733
|
"bitflags",
|
|
734
734
|
"errno",
|
|
@@ -739,9 +739,9 @@ dependencies = [
|
|
|
739
739
|
|
|
740
740
|
[[package]]
|
|
741
741
|
name = "rustls"
|
|
742
|
-
version = "0.23.
|
|
742
|
+
version = "0.23.46"
|
|
743
743
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
744
|
-
checksum = "
|
|
744
|
+
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
|
745
745
|
dependencies = [
|
|
746
746
|
"log",
|
|
747
747
|
"once_cell",
|
|
@@ -754,9 +754,9 @@ dependencies = [
|
|
|
754
754
|
|
|
755
755
|
[[package]]
|
|
756
756
|
name = "rustls-native-certs"
|
|
757
|
-
version = "0.8.
|
|
757
|
+
version = "0.8.5"
|
|
758
758
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
759
|
-
checksum = "
|
|
759
|
+
checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4"
|
|
760
760
|
dependencies = [
|
|
761
761
|
"openssl-probe",
|
|
762
762
|
"rustls-pki-types",
|
|
@@ -802,9 +802,9 @@ checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
|
|
|
802
802
|
|
|
803
803
|
[[package]]
|
|
804
804
|
name = "rustls-webpki"
|
|
805
|
-
version = "0.103.
|
|
805
|
+
version = "0.103.16"
|
|
806
806
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
807
|
-
checksum = "
|
|
807
|
+
checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
|
|
808
808
|
dependencies = [
|
|
809
809
|
"ring",
|
|
810
810
|
"rustls-pki-types",
|
|
@@ -828,9 +828,9 @@ dependencies = [
|
|
|
828
828
|
|
|
829
829
|
[[package]]
|
|
830
830
|
name = "schannel"
|
|
831
|
-
version = "0.1.
|
|
831
|
+
version = "0.1.30"
|
|
832
832
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
833
|
-
checksum = "
|
|
833
|
+
checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5"
|
|
834
834
|
dependencies = [
|
|
835
835
|
"windows-sys 0.61.2",
|
|
836
836
|
]
|
|
@@ -897,15 +897,16 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
897
897
|
dependencies = [
|
|
898
898
|
"proc-macro2",
|
|
899
899
|
"quote",
|
|
900
|
-
"syn 3.0.
|
|
900
|
+
"syn 3.0.9",
|
|
901
901
|
]
|
|
902
902
|
|
|
903
903
|
[[package]]
|
|
904
904
|
name = "serde_json"
|
|
905
|
-
version = "1.0.
|
|
905
|
+
version = "1.0.154"
|
|
906
906
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
907
|
-
checksum = "
|
|
907
|
+
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
|
908
908
|
dependencies = [
|
|
909
|
+
"foldhash",
|
|
909
910
|
"indexmap",
|
|
910
911
|
"itoa",
|
|
911
912
|
"memchr",
|
|
@@ -925,9 +926,9 @@ dependencies = [
|
|
|
925
926
|
|
|
926
927
|
[[package]]
|
|
927
928
|
name = "sha2"
|
|
928
|
-
version = "0.11.
|
|
929
|
+
version = "0.11.1"
|
|
929
930
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
930
|
-
checksum = "
|
|
931
|
+
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
|
931
932
|
dependencies = [
|
|
932
933
|
"cfg-if",
|
|
933
934
|
"cpufeatures",
|
|
@@ -974,17 +975,6 @@ version = "0.1.5"
|
|
|
974
975
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
975
976
|
checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
|
976
977
|
|
|
977
|
-
[[package]]
|
|
978
|
-
name = "socks"
|
|
979
|
-
version = "0.3.4"
|
|
980
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
981
|
-
checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"
|
|
982
|
-
dependencies = [
|
|
983
|
-
"byteorder",
|
|
984
|
-
"libc",
|
|
985
|
-
"winapi",
|
|
986
|
-
]
|
|
987
|
-
|
|
988
978
|
[[package]]
|
|
989
979
|
name = "streaming-iterator"
|
|
990
980
|
version = "0.1.9"
|
|
@@ -1010,9 +1000,9 @@ dependencies = [
|
|
|
1010
1000
|
|
|
1011
1001
|
[[package]]
|
|
1012
1002
|
name = "syn"
|
|
1013
|
-
version = "3.0.
|
|
1003
|
+
version = "3.0.9"
|
|
1014
1004
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1015
|
-
checksum = "
|
|
1005
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
1016
1006
|
dependencies = [
|
|
1017
1007
|
"proc-macro2",
|
|
1018
1008
|
"quote",
|
|
@@ -1047,7 +1037,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
|
1047
1037
|
dependencies = [
|
|
1048
1038
|
"proc-macro2",
|
|
1049
1039
|
"quote",
|
|
1050
|
-
"syn 3.0.
|
|
1040
|
+
"syn 3.0.9",
|
|
1051
1041
|
]
|
|
1052
1042
|
|
|
1053
1043
|
[[package]]
|
|
@@ -1150,9 +1140,9 @@ checksum = "d0af592be68c579aa78a16846bd19422978c3c52e438523d45ff5d1bff1f9d4a"
|
|
|
1150
1140
|
|
|
1151
1141
|
[[package]]
|
|
1152
1142
|
name = "tree-sitter-language-pack"
|
|
1153
|
-
version = "1.
|
|
1143
|
+
version = "1.23.1"
|
|
1154
1144
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1155
|
-
checksum = "
|
|
1145
|
+
checksum = "0ff1c086ef421b7b28a11f0f2952c221f65c23e2c75a453277a8ddcfa1b54e7c"
|
|
1156
1146
|
dependencies = [
|
|
1157
1147
|
"ahash",
|
|
1158
1148
|
"cc",
|
|
@@ -1176,7 +1166,7 @@ dependencies = [
|
|
|
1176
1166
|
|
|
1177
1167
|
[[package]]
|
|
1178
1168
|
name = "ts-pack-core-rb"
|
|
1179
|
-
version = "1.
|
|
1169
|
+
version = "1.23.1"
|
|
1180
1170
|
dependencies = [
|
|
1181
1171
|
"magnus",
|
|
1182
1172
|
"rb-sys",
|
|
@@ -1193,9 +1183,9 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
|
1193
1183
|
|
|
1194
1184
|
[[package]]
|
|
1195
1185
|
name = "unicode-ident"
|
|
1196
|
-
version = "1.0.
|
|
1186
|
+
version = "1.0.27"
|
|
1197
1187
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1198
|
-
checksum = "
|
|
1188
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
1199
1189
|
|
|
1200
1190
|
[[package]]
|
|
1201
1191
|
name = "untrusted"
|
|
@@ -1205,9 +1195,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
|
1205
1195
|
|
|
1206
1196
|
[[package]]
|
|
1207
1197
|
name = "ureq"
|
|
1208
|
-
version = "3.
|
|
1198
|
+
version = "3.5.0"
|
|
1209
1199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1210
|
-
checksum = "
|
|
1200
|
+
checksum = "cde93ff05758a36a851a398a772b0b79a82fbe3c186a46f2696baaeaf84c966b"
|
|
1211
1201
|
dependencies = [
|
|
1212
1202
|
"base64",
|
|
1213
1203
|
"flate2",
|
|
@@ -1216,7 +1206,6 @@ dependencies = [
|
|
|
1216
1206
|
"rustls",
|
|
1217
1207
|
"rustls-pki-types",
|
|
1218
1208
|
"rustls-platform-verifier",
|
|
1219
|
-
"socks",
|
|
1220
1209
|
"ureq-proto",
|
|
1221
1210
|
"utf8-zero",
|
|
1222
1211
|
"webpki-roots",
|
|
@@ -1224,9 +1213,9 @@ dependencies = [
|
|
|
1224
1213
|
|
|
1225
1214
|
[[package]]
|
|
1226
1215
|
name = "ureq-proto"
|
|
1227
|
-
version = "0.6.
|
|
1216
|
+
version = "0.6.5"
|
|
1228
1217
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1229
|
-
checksum = "
|
|
1218
|
+
checksum = "841583fc36089d7d59419568ae157f43a5a03a2e5a81ba87c77d1596ef46e922"
|
|
1230
1219
|
dependencies = [
|
|
1231
1220
|
"base64",
|
|
1232
1221
|
"http",
|
|
@@ -1264,12 +1253,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
1264
1253
|
|
|
1265
1254
|
[[package]]
|
|
1266
1255
|
name = "wasm-bindgen"
|
|
1267
|
-
version = "0.2.
|
|
1256
|
+
version = "0.2.130"
|
|
1268
1257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1269
|
-
checksum = "
|
|
1258
|
+
checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
|
|
1270
1259
|
dependencies = [
|
|
1271
1260
|
"cfg-if",
|
|
1272
|
-
"once_cell",
|
|
1273
1261
|
"rustversion",
|
|
1274
1262
|
"wasm-bindgen-macro",
|
|
1275
1263
|
"wasm-bindgen-shared",
|
|
@@ -1277,9 +1265,9 @@ dependencies = [
|
|
|
1277
1265
|
|
|
1278
1266
|
[[package]]
|
|
1279
1267
|
name = "wasm-bindgen-macro"
|
|
1280
|
-
version = "0.2.
|
|
1268
|
+
version = "0.2.130"
|
|
1281
1269
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1282
|
-
checksum = "
|
|
1270
|
+
checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
|
|
1283
1271
|
dependencies = [
|
|
1284
1272
|
"quote",
|
|
1285
1273
|
"wasm-bindgen-macro-support",
|
|
@@ -1287,60 +1275,44 @@ dependencies = [
|
|
|
1287
1275
|
|
|
1288
1276
|
[[package]]
|
|
1289
1277
|
name = "wasm-bindgen-macro-support"
|
|
1290
|
-
version = "0.2.
|
|
1278
|
+
version = "0.2.130"
|
|
1291
1279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1292
|
-
checksum = "
|
|
1280
|
+
checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
|
|
1293
1281
|
dependencies = [
|
|
1294
1282
|
"bumpalo",
|
|
1295
1283
|
"proc-macro2",
|
|
1296
1284
|
"quote",
|
|
1297
|
-
"syn 3.0.
|
|
1285
|
+
"syn 3.0.9",
|
|
1298
1286
|
"wasm-bindgen-shared",
|
|
1299
1287
|
]
|
|
1300
1288
|
|
|
1301
1289
|
[[package]]
|
|
1302
1290
|
name = "wasm-bindgen-shared"
|
|
1303
|
-
version = "0.2.
|
|
1291
|
+
version = "0.2.130"
|
|
1304
1292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1305
|
-
checksum = "
|
|
1293
|
+
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
|
|
1306
1294
|
dependencies = [
|
|
1307
1295
|
"unicode-ident",
|
|
1308
1296
|
]
|
|
1309
1297
|
|
|
1310
1298
|
[[package]]
|
|
1311
1299
|
name = "webpki-root-certs"
|
|
1312
|
-
version = "1.0.
|
|
1300
|
+
version = "1.0.11"
|
|
1313
1301
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1314
|
-
checksum = "
|
|
1302
|
+
checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a"
|
|
1315
1303
|
dependencies = [
|
|
1316
1304
|
"rustls-pki-types",
|
|
1317
1305
|
]
|
|
1318
1306
|
|
|
1319
1307
|
[[package]]
|
|
1320
1308
|
name = "webpki-roots"
|
|
1321
|
-
version = "1.0.
|
|
1309
|
+
version = "1.0.11"
|
|
1322
1310
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1323
|
-
checksum = "
|
|
1311
|
+
checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
|
|
1324
1312
|
dependencies = [
|
|
1325
1313
|
"rustls-pki-types",
|
|
1326
1314
|
]
|
|
1327
1315
|
|
|
1328
|
-
[[package]]
|
|
1329
|
-
name = "winapi"
|
|
1330
|
-
version = "0.3.9"
|
|
1331
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1332
|
-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
1333
|
-
dependencies = [
|
|
1334
|
-
"winapi-i686-pc-windows-gnu",
|
|
1335
|
-
"winapi-x86_64-pc-windows-gnu",
|
|
1336
|
-
]
|
|
1337
|
-
|
|
1338
|
-
[[package]]
|
|
1339
|
-
name = "winapi-i686-pc-windows-gnu"
|
|
1340
|
-
version = "0.4.0"
|
|
1341
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1342
|
-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
1343
|
-
|
|
1344
1316
|
[[package]]
|
|
1345
1317
|
name = "winapi-util"
|
|
1346
1318
|
version = "0.1.11"
|
|
@@ -1350,12 +1322,6 @@ dependencies = [
|
|
|
1350
1322
|
"windows-sys 0.61.2",
|
|
1351
1323
|
]
|
|
1352
1324
|
|
|
1353
|
-
[[package]]
|
|
1354
|
-
name = "winapi-x86_64-pc-windows-gnu"
|
|
1355
|
-
version = "0.4.0"
|
|
1356
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1357
|
-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
1358
|
-
|
|
1359
1325
|
[[package]]
|
|
1360
1326
|
name = "windows-link"
|
|
1361
1327
|
version = "0.2.1"
|
|
@@ -1461,9 +1427,9 @@ checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|
|
|
1461
1427
|
|
|
1462
1428
|
[[package]]
|
|
1463
1429
|
name = "xattr"
|
|
1464
|
-
version = "1.
|
|
1430
|
+
version = "1.7.0"
|
|
1465
1431
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1466
|
-
checksum = "
|
|
1432
|
+
checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08"
|
|
1467
1433
|
dependencies = [
|
|
1468
1434
|
"libc",
|
|
1469
1435
|
"rustix",
|
|
@@ -1471,18 +1437,18 @@ dependencies = [
|
|
|
1471
1437
|
|
|
1472
1438
|
[[package]]
|
|
1473
1439
|
name = "zerocopy"
|
|
1474
|
-
version = "0.8.
|
|
1440
|
+
version = "0.8.63"
|
|
1475
1441
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1476
|
-
checksum = "
|
|
1442
|
+
checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
|
|
1477
1443
|
dependencies = [
|
|
1478
1444
|
"zerocopy-derive",
|
|
1479
1445
|
]
|
|
1480
1446
|
|
|
1481
1447
|
[[package]]
|
|
1482
1448
|
name = "zerocopy-derive"
|
|
1483
|
-
version = "0.8.
|
|
1449
|
+
version = "0.8.63"
|
|
1484
1450
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1485
|
-
checksum = "
|
|
1451
|
+
checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
|
|
1486
1452
|
dependencies = [
|
|
1487
1453
|
"proc-macro2",
|
|
1488
1454
|
"quote",
|
|
@@ -1509,27 +1475,27 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
|
1509
1475
|
|
|
1510
1476
|
[[package]]
|
|
1511
1477
|
name = "zstd"
|
|
1512
|
-
version = "0.14.
|
|
1478
|
+
version = "0.14.3"
|
|
1513
1479
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1514
|
-
checksum = "
|
|
1480
|
+
checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
|
|
1515
1481
|
dependencies = [
|
|
1516
1482
|
"zstd-safe",
|
|
1517
1483
|
]
|
|
1518
1484
|
|
|
1519
1485
|
[[package]]
|
|
1520
1486
|
name = "zstd-safe"
|
|
1521
|
-
version = "8.
|
|
1487
|
+
version = "8.2.0"
|
|
1522
1488
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1523
|
-
checksum = "
|
|
1489
|
+
checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
|
|
1524
1490
|
dependencies = [
|
|
1525
1491
|
"zstd-sys",
|
|
1526
1492
|
]
|
|
1527
1493
|
|
|
1528
1494
|
[[package]]
|
|
1529
1495
|
name = "zstd-sys"
|
|
1530
|
-
version = "2.1.
|
|
1496
|
+
version = "2.1.2+zstd.1.5.7"
|
|
1531
1497
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1532
|
-
checksum = "
|
|
1498
|
+
checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
|
|
1533
1499
|
dependencies = [
|
|
1534
1500
|
"cc",
|
|
1535
1501
|
"pkg-config",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:75f49e3506b435af44373452bbe0ee08ce595286cec1e33ee4178f2c3eff67d0
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
[package]
|
|
7
7
|
name = "ts-pack-core-rb"
|
|
8
|
-
version = "1.
|
|
8
|
+
version = "1.23.1"
|
|
9
9
|
edition = "2024"
|
|
10
|
+
authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
|
|
10
11
|
license = "MIT"
|
|
11
12
|
description = "Pre-compiled tree-sitter grammars for 372 programming languages"
|
|
12
13
|
readme = false
|
|
@@ -30,14 +31,12 @@ magnus = "0.9"
|
|
|
30
31
|
rb-sys = ">=0.9.130, <0.10"
|
|
31
32
|
serde = { version = "1", features = ["derive"] }
|
|
32
33
|
serde_json = "1"
|
|
33
|
-
tree-sitter-language-pack = { version = "1.
|
|
34
|
+
tree-sitter-language-pack = { version = "1.23.1", features = ["serde", "config", "download"] }
|
|
34
35
|
|
|
35
36
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
36
|
-
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
# instead carries the subset of the workspace's deny-by-default lint policy this crate
|
|
40
|
-
# can actually satisfy. ~keep
|
|
37
|
+
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code. Local lint tables
|
|
38
|
+
# avoid inheriting workspace policies that could reject these boundaries, and select
|
|
39
|
+
# the lints this binding can actually satisfy. ~keep
|
|
41
40
|
[lints.clippy]
|
|
42
41
|
dbg_macro = "deny"
|
|
43
42
|
print_stderr = "deny"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:afde41f9261a2e86e34cf539b09159c61c876cec1ee7554770ebdfa06f37f4fc
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -1132,22 +1132,12 @@ impl DownloadManager {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
fn download_all_best_effort(&self) -> Result<usize, Error> {
|
|
1135
|
-
let result = self.inner.download_all_best_effort().map_err(
|
|
1136
|
-
magnus::Error::new(
|
|
1137
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
1138
|
-
e.to_string(),
|
|
1139
|
-
)
|
|
1140
|
-
})?;
|
|
1135
|
+
let result = self.inner.download_all_best_effort().map_err(alef_magnus_err)?;
|
|
1141
1136
|
Ok(result)
|
|
1142
1137
|
}
|
|
1143
1138
|
|
|
1144
1139
|
fn clean_cache(&self) -> Result<(), Error> {
|
|
1145
|
-
self.inner.clean_cache().map_err(
|
|
1146
|
-
magnus::Error::new(
|
|
1147
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
1148
|
-
e.to_string(),
|
|
1149
|
-
)
|
|
1150
|
-
})?;
|
|
1140
|
+
self.inner.clean_cache().map_err(alef_magnus_err)?;
|
|
1151
1141
|
Ok(())
|
|
1152
1142
|
}
|
|
1153
1143
|
}
|
|
@@ -1575,12 +1565,7 @@ unsafe impl TryConvertOwned for LanguageRegistry {}
|
|
|
1575
1565
|
|
|
1576
1566
|
impl LanguageRegistry {
|
|
1577
1567
|
fn get_language(&self, name: String) -> Result<Language, Error> {
|
|
1578
|
-
let result = self.inner.get_language(&name).map_err(
|
|
1579
|
-
magnus::Error::new(
|
|
1580
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
1581
|
-
e.to_string(),
|
|
1582
|
-
)
|
|
1583
|
-
})?;
|
|
1568
|
+
let result = self.inner.get_language(&name).map_err(alef_magnus_err)?;
|
|
1584
1569
|
Ok(Language {
|
|
1585
1570
|
inner: Arc::new(result),
|
|
1586
1571
|
})
|
|
@@ -1604,12 +1589,7 @@ impl LanguageRegistry {
|
|
|
1604
1589
|
|
|
1605
1590
|
fn process(&self, source: String, config: ProcessConfig) -> Result<ProcessResult, Error> {
|
|
1606
1591
|
let config_core: tree_sitter_language_pack::ProcessConfig = config.into();
|
|
1607
|
-
let result = self.inner.process(&source, &config_core).map_err(
|
|
1608
|
-
magnus::Error::new(
|
|
1609
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
1610
|
-
e.to_string(),
|
|
1611
|
-
)
|
|
1612
|
-
})?;
|
|
1592
|
+
let result = self.inner.process(&source, &config_core).map_err(alef_magnus_err)?;
|
|
1613
1593
|
Ok(result.into())
|
|
1614
1594
|
}
|
|
1615
1595
|
}
|
|
@@ -1845,12 +1825,11 @@ impl Parser {
|
|
|
1845
1825
|
}
|
|
1846
1826
|
|
|
1847
1827
|
fn set_language(&self, name: String) -> Result<(), Error> {
|
|
1848
|
-
self.inner
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
)
|
|
1853
|
-
})?;
|
|
1828
|
+
self.inner
|
|
1829
|
+
.lock()
|
|
1830
|
+
.unwrap()
|
|
1831
|
+
.set_language(&name)
|
|
1832
|
+
.map_err(alef_magnus_err)?;
|
|
1854
1833
|
Ok(())
|
|
1855
1834
|
}
|
|
1856
1835
|
|
|
@@ -2395,12 +2374,7 @@ impl ProcessConfig {
|
|
|
2395
2374
|
|
|
2396
2375
|
..Default::default()
|
|
2397
2376
|
};
|
|
2398
|
-
let result = core_self.validate().map_err(
|
|
2399
|
-
magnus::Error::new(
|
|
2400
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
2401
|
-
e.to_string(),
|
|
2402
|
-
)
|
|
2403
|
-
})?;
|
|
2377
|
+
let result = core_self.validate().map_err(alef_magnus_err)?;
|
|
2404
2378
|
Ok(result)
|
|
2405
2379
|
}
|
|
2406
2380
|
}
|
|
@@ -3538,23 +3512,13 @@ fn available_languages() -> Vec<String> {
|
|
|
3538
3512
|
|
|
3539
3513
|
#[cfg(feature = "download")]
|
|
3540
3514
|
fn cache_dir() -> Result<String, Error> {
|
|
3541
|
-
let result = tree_sitter_language_pack::cache_dir().map_err(
|
|
3542
|
-
magnus::Error::new(
|
|
3543
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3544
|
-
e.to_string(),
|
|
3545
|
-
)
|
|
3546
|
-
})?;
|
|
3515
|
+
let result = tree_sitter_language_pack::cache_dir().map_err(alef_magnus_err)?;
|
|
3547
3516
|
Ok(result)
|
|
3548
3517
|
}
|
|
3549
3518
|
|
|
3550
3519
|
#[cfg(feature = "download")]
|
|
3551
3520
|
fn clean_cache() -> Result<(), Error> {
|
|
3552
|
-
let result = tree_sitter_language_pack::clean_cache().map_err(
|
|
3553
|
-
magnus::Error::new(
|
|
3554
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3555
|
-
e.to_string(),
|
|
3556
|
-
)
|
|
3557
|
-
})?;
|
|
3521
|
+
let result = tree_sitter_language_pack::clean_cache().map_err(alef_magnus_err)?;
|
|
3558
3522
|
Ok(result)
|
|
3559
3523
|
}
|
|
3560
3524
|
|
|
@@ -3575,12 +3539,7 @@ fn configure(args: &[magnus::Value]) -> Result<(), Error> {
|
|
|
3575
3539
|
}
|
|
3576
3540
|
_ => Default::default(),
|
|
3577
3541
|
};
|
|
3578
|
-
let result = tree_sitter_language_pack::configure(&config_core).map_err(
|
|
3579
|
-
magnus::Error::new(
|
|
3580
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3581
|
-
e.to_string(),
|
|
3582
|
-
)
|
|
3583
|
-
})?;
|
|
3542
|
+
let result = tree_sitter_language_pack::configure(&config_core).map_err(alef_magnus_err)?;
|
|
3584
3543
|
Ok(result)
|
|
3585
3544
|
}
|
|
3586
3545
|
|
|
@@ -3603,34 +3562,19 @@ fn detect_language_from_path(path: String) -> Option<String> {
|
|
|
3603
3562
|
#[cfg(feature = "download")]
|
|
3604
3563
|
fn download(names: Vec<String>) -> Result<usize, Error> {
|
|
3605
3564
|
let names_refs: Vec<&str> = names.iter().map(|s| s.as_str()).collect();
|
|
3606
|
-
let result = tree_sitter_language_pack::download(&names_refs).map_err(
|
|
3607
|
-
magnus::Error::new(
|
|
3608
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3609
|
-
e.to_string(),
|
|
3610
|
-
)
|
|
3611
|
-
})?;
|
|
3565
|
+
let result = tree_sitter_language_pack::download(&names_refs).map_err(alef_magnus_err)?;
|
|
3612
3566
|
Ok(result)
|
|
3613
3567
|
}
|
|
3614
3568
|
|
|
3615
3569
|
#[cfg(feature = "download")]
|
|
3616
3570
|
fn download_all() -> Result<usize, Error> {
|
|
3617
|
-
let result = tree_sitter_language_pack::download_all().map_err(
|
|
3618
|
-
magnus::Error::new(
|
|
3619
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3620
|
-
e.to_string(),
|
|
3621
|
-
)
|
|
3622
|
-
})?;
|
|
3571
|
+
let result = tree_sitter_language_pack::download_all().map_err(alef_magnus_err)?;
|
|
3623
3572
|
Ok(result)
|
|
3624
3573
|
}
|
|
3625
3574
|
|
|
3626
3575
|
#[cfg(feature = "download")]
|
|
3627
3576
|
fn download_group(name: String) -> Result<usize, Error> {
|
|
3628
|
-
let result = tree_sitter_language_pack::download_group(&name).map_err(
|
|
3629
|
-
magnus::Error::new(
|
|
3630
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3631
|
-
e.to_string(),
|
|
3632
|
-
)
|
|
3633
|
-
})?;
|
|
3577
|
+
let result = tree_sitter_language_pack::download_group(&name).map_err(alef_magnus_err)?;
|
|
3634
3578
|
Ok(result)
|
|
3635
3579
|
}
|
|
3636
3580
|
|
|
@@ -3656,12 +3600,7 @@ fn get_injections_query(language: String) -> Option<String> {
|
|
|
3656
3600
|
}
|
|
3657
3601
|
|
|
3658
3602
|
fn get_language(name: String) -> Result<Language, Error> {
|
|
3659
|
-
let result = tree_sitter_language_pack::get_language(&name).map_err(
|
|
3660
|
-
magnus::Error::new(
|
|
3661
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3662
|
-
e.to_string(),
|
|
3663
|
-
)
|
|
3664
|
-
})?;
|
|
3603
|
+
let result = tree_sitter_language_pack::get_language(&name).map_err(alef_magnus_err)?;
|
|
3665
3604
|
Ok(Language {
|
|
3666
3605
|
inner: Arc::new(result),
|
|
3667
3606
|
})
|
|
@@ -3672,12 +3611,7 @@ fn get_locals_query(language: String) -> Option<String> {
|
|
|
3672
3611
|
}
|
|
3673
3612
|
|
|
3674
3613
|
fn get_parser(name: String) -> Result<Parser, Error> {
|
|
3675
|
-
let result = tree_sitter_language_pack::get_parser(&name).map_err(
|
|
3676
|
-
magnus::Error::new(
|
|
3677
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3678
|
-
e.to_string(),
|
|
3679
|
-
)
|
|
3680
|
-
})?;
|
|
3614
|
+
let result = tree_sitter_language_pack::get_parser(&name).map_err(alef_magnus_err)?;
|
|
3681
3615
|
Ok(Parser {
|
|
3682
3616
|
inner: Arc::new(std::sync::Mutex::new(result)),
|
|
3683
3617
|
})
|
|
@@ -3708,12 +3642,7 @@ fn init(args: &[magnus::Value]) -> Result<(), Error> {
|
|
|
3708
3642
|
}
|
|
3709
3643
|
_ => Default::default(),
|
|
3710
3644
|
};
|
|
3711
|
-
let result = tree_sitter_language_pack::init(&config_core).map_err(
|
|
3712
|
-
magnus::Error::new(
|
|
3713
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3714
|
-
e.to_string(),
|
|
3715
|
-
)
|
|
3716
|
-
})?;
|
|
3645
|
+
let result = tree_sitter_language_pack::init(&config_core).map_err(alef_magnus_err)?;
|
|
3717
3646
|
Ok(result)
|
|
3718
3647
|
}
|
|
3719
3648
|
|
|
@@ -3723,35 +3652,20 @@ fn language_count() -> usize {
|
|
|
3723
3652
|
|
|
3724
3653
|
#[cfg(feature = "download")]
|
|
3725
3654
|
fn manifest_groups() -> Result<Vec<String>, Error> {
|
|
3726
|
-
let result = tree_sitter_language_pack::manifest_groups().map_err(
|
|
3727
|
-
magnus::Error::new(
|
|
3728
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3729
|
-
e.to_string(),
|
|
3730
|
-
)
|
|
3731
|
-
})?;
|
|
3655
|
+
let result = tree_sitter_language_pack::manifest_groups().map_err(alef_magnus_err)?;
|
|
3732
3656
|
Ok(result)
|
|
3733
3657
|
}
|
|
3734
3658
|
|
|
3735
3659
|
#[cfg(feature = "download")]
|
|
3736
3660
|
fn manifest_languages() -> Result<Vec<String>, Error> {
|
|
3737
|
-
let result = tree_sitter_language_pack::manifest_languages().map_err(
|
|
3738
|
-
magnus::Error::new(
|
|
3739
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3740
|
-
e.to_string(),
|
|
3741
|
-
)
|
|
3742
|
-
})?;
|
|
3661
|
+
let result = tree_sitter_language_pack::manifest_languages().map_err(alef_magnus_err)?;
|
|
3743
3662
|
Ok(result)
|
|
3744
3663
|
}
|
|
3745
3664
|
|
|
3746
3665
|
#[cfg(any(feature = "download", not(feature = "download")))]
|
|
3747
3666
|
fn prefetch(languages: Vec<String>) -> Result<(), Error> {
|
|
3748
3667
|
let languages_refs: Vec<&str> = languages.iter().map(|s| s.as_str()).collect();
|
|
3749
|
-
let result = tree_sitter_language_pack::prefetch(&languages_refs).map_err(
|
|
3750
|
-
magnus::Error::new(
|
|
3751
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3752
|
-
e.to_string(),
|
|
3753
|
-
)
|
|
3754
|
-
})?;
|
|
3668
|
+
let result = tree_sitter_language_pack::prefetch(&languages_refs).map_err(alef_magnus_err)?;
|
|
3755
3669
|
Ok(result)
|
|
3756
3670
|
}
|
|
3757
3671
|
|
|
@@ -3773,12 +3687,7 @@ fn process(args: &[magnus::Value]) -> Result<ProcessResult, Error> {
|
|
|
3773
3687
|
}
|
|
3774
3688
|
_ => Default::default(),
|
|
3775
3689
|
};
|
|
3776
|
-
let result = tree_sitter_language_pack::process(&source, &config_core).map_err(
|
|
3777
|
-
magnus::Error::new(
|
|
3778
|
-
unsafe { Ruby::get_unchecked() }.exception_runtime_error(),
|
|
3779
|
-
e.to_string(),
|
|
3780
|
-
)
|
|
3781
|
-
})?;
|
|
3690
|
+
let result = tree_sitter_language_pack::process(&source, &config_core).map_err(alef_magnus_err)?;
|
|
3782
3691
|
Ok(result.into())
|
|
3783
3692
|
}
|
|
3784
3693
|
|
|
@@ -4494,11 +4403,54 @@ impl From<tree_sitter_language_pack::SymbolKind> for SymbolKind {
|
|
|
4494
4403
|
}
|
|
4495
4404
|
}
|
|
4496
4405
|
|
|
4497
|
-
/// Convert a
|
|
4406
|
+
/// Convert the error a core call returned into the typed Ruby exception of its family. An error
|
|
4407
|
+
/// of a type with no converter becomes a `RuntimeError` with the message.
|
|
4408
|
+
#[allow(dead_code)]
|
|
4409
|
+
fn alef_magnus_err<E: std::fmt::Display + 'static>(e: E) -> magnus::Error {
|
|
4410
|
+
let message = e.to_string();
|
|
4411
|
+
#[allow(unused_variables)]
|
|
4412
|
+
let any: Box<dyn std::any::Any> = Box::new(e);
|
|
4413
|
+
let any = match any.downcast::<tree_sitter_language_pack::Error>() {
|
|
4414
|
+
Ok(typed) => return error_to_magnus_err(*typed),
|
|
4415
|
+
Err(any) => any,
|
|
4416
|
+
};
|
|
4417
|
+
let _ = any;
|
|
4418
|
+
magnus::Error::new(
|
|
4419
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(),
|
|
4420
|
+
message,
|
|
4421
|
+
)
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4424
|
+
/// Convert a `tree_sitter_language_pack::Error` error to a typed Ruby exception.
|
|
4498
4425
|
#[allow(dead_code)]
|
|
4499
4426
|
fn error_to_magnus_err(e: tree_sitter_language_pack::Error) -> magnus::Error {
|
|
4500
|
-
|
|
4501
|
-
|
|
4427
|
+
use magnus::prelude::*;
|
|
4428
|
+
let message = e.to_string();
|
|
4429
|
+
let ruby = unsafe { magnus::Ruby::get_unchecked() };
|
|
4430
|
+
#[allow(unreachable_patterns)]
|
|
4431
|
+
let class_name = match &e {
|
|
4432
|
+
tree_sitter_language_pack::Error::LanguageNotFound(..) => "LanguageNotFoundError",
|
|
4433
|
+
tree_sitter_language_pack::Error::DynamicLoad(..) => "DynamicLoadError",
|
|
4434
|
+
tree_sitter_language_pack::Error::NullLanguagePointer(..) => "NullLanguagePointerError",
|
|
4435
|
+
tree_sitter_language_pack::Error::ParserSetup(..) => "ParserSetupError",
|
|
4436
|
+
tree_sitter_language_pack::Error::LockPoisoned(..) => "LockPoisonedError",
|
|
4437
|
+
tree_sitter_language_pack::Error::Config(..) => "ConfigError",
|
|
4438
|
+
tree_sitter_language_pack::Error::ParseFailed => "ParseFailedError",
|
|
4439
|
+
tree_sitter_language_pack::Error::ParseTimeout { .. } => "ParseTimeoutError",
|
|
4440
|
+
tree_sitter_language_pack::Error::QueryError(..) => "QueryError",
|
|
4441
|
+
tree_sitter_language_pack::Error::InvalidRange(..) => "InvalidRangeError",
|
|
4442
|
+
tree_sitter_language_pack::Error::Download(..) => "DownloadError",
|
|
4443
|
+
tree_sitter_language_pack::Error::ChecksumMismatch { .. } => "ChecksumMismatchError",
|
|
4444
|
+
tree_sitter_language_pack::Error::CacheLock(..) => "CacheLockError",
|
|
4445
|
+
_ => "Error",
|
|
4446
|
+
};
|
|
4447
|
+
let build = || -> Result<magnus::Error, magnus::Error> {
|
|
4448
|
+
let module = ruby.define_module("TreeSitterLanguagePack")?;
|
|
4449
|
+
let class: magnus::ExceptionClass = module.const_get(class_name)?;
|
|
4450
|
+
let exception = class.new_instance((message.as_str(),))?;
|
|
4451
|
+
Ok(magnus::Error::from(exception))
|
|
4452
|
+
};
|
|
4453
|
+
build().unwrap_or_else(|_| magnus::Error::new(ruby.exception_runtime_error(), message))
|
|
4502
4454
|
}
|
|
4503
4455
|
|
|
4504
4456
|
#[magnus::init]
|
|
@@ -4991,5 +4943,20 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
4991
4943
|
|
|
4992
4944
|
module.define_module_function("process", function!(process, -1))?;
|
|
4993
4945
|
|
|
4946
|
+
let error_class = module.define_error("Error", ruby.exception_standard_error())?;
|
|
4947
|
+
let language_not_found_error_class = module.define_error("LanguageNotFoundError", error_class)?;
|
|
4948
|
+
let dynamic_load_error_class = module.define_error("DynamicLoadError", error_class)?;
|
|
4949
|
+
let null_language_pointer_error_class = module.define_error("NullLanguagePointerError", error_class)?;
|
|
4950
|
+
let parser_setup_error_class = module.define_error("ParserSetupError", error_class)?;
|
|
4951
|
+
let lock_poisoned_error_class = module.define_error("LockPoisonedError", error_class)?;
|
|
4952
|
+
let config_error_class = module.define_error("ConfigError", error_class)?;
|
|
4953
|
+
let parse_failed_error_class = module.define_error("ParseFailedError", error_class)?;
|
|
4954
|
+
let parse_timeout_error_class = module.define_error("ParseTimeoutError", error_class)?;
|
|
4955
|
+
let query_error_class = module.define_error("QueryError", error_class)?;
|
|
4956
|
+
let invalid_range_error_class = module.define_error("InvalidRangeError", error_class)?;
|
|
4957
|
+
let download_error_class = module.define_error("DownloadError", error_class)?;
|
|
4958
|
+
let checksum_mismatch_error_class = module.define_error("ChecksumMismatchError", error_class)?;
|
|
4959
|
+
let cache_lock_error_class = module.define_error("CacheLockError", error_class)?;
|
|
4960
|
+
|
|
4994
4961
|
Ok(())
|
|
4995
4962
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:382bac527dfd95d5bbaba64a7f6850f822b5e964d6685d82f6cdb5118a4de16e
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module TreeSitterLanguagePack
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.
|
|
9
|
+
VERSION = "1.23.1"
|
|
10
10
|
end
|
metadata
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tree_sitter_language_pack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.23.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
8
|
+
- Tobias Perlstein
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
11
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
@@ -35,15 +36,18 @@ dependencies:
|
|
|
35
36
|
requirements:
|
|
36
37
|
- - "~>"
|
|
37
38
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: '0.
|
|
39
|
+
version: '0.6'
|
|
39
40
|
type: :runtime
|
|
40
41
|
prerelease: false
|
|
41
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
43
|
requirements:
|
|
43
44
|
- - "~>"
|
|
44
45
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: '0.
|
|
46
|
+
version: '0.6'
|
|
46
47
|
description: Pre-compiled tree-sitter grammars for 372 programming languages
|
|
48
|
+
email:
|
|
49
|
+
- naaman@xberg.io
|
|
50
|
+
- tobias@xberg.io
|
|
47
51
|
executables: []
|
|
48
52
|
extensions:
|
|
49
53
|
- ext/ts_pack_core_rb/native/extconf.rb
|
|
@@ -86,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
86
90
|
- !ruby/object:Gem::Version
|
|
87
91
|
version: '0'
|
|
88
92
|
requirements: []
|
|
89
|
-
rubygems_version:
|
|
93
|
+
rubygems_version: 4.0.20
|
|
90
94
|
specification_version: 4
|
|
91
95
|
summary: Pre-compiled tree-sitter grammars for 372 programming languages
|
|
92
96
|
test_files: []
|