tree_sitter_language_pack 1.22.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 +68 -109
- data/ext/ts_pack_core_rb/native/Cargo.toml +3 -3
- data/ext/ts_pack_core_rb/src/lib.rs +85 -118
- data/lib/tree_sitter_language_pack/version.rb +2 -2
- metadata +2 -2
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"
|
|
@@ -456,9 +450,9 @@ dependencies = [
|
|
|
456
450
|
|
|
457
451
|
[[package]]
|
|
458
452
|
name = "js-sys"
|
|
459
|
-
version = "0.3.
|
|
453
|
+
version = "0.3.107"
|
|
460
454
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
461
|
-
checksum = "
|
|
455
|
+
checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
|
|
462
456
|
dependencies = [
|
|
463
457
|
"cfg-if",
|
|
464
458
|
"wasm-bindgen",
|
|
@@ -472,9 +466,9 @@ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
|
472
466
|
|
|
473
467
|
[[package]]
|
|
474
468
|
name = "libc"
|
|
475
|
-
version = "0.2.
|
|
469
|
+
version = "0.2.191"
|
|
476
470
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
477
|
-
checksum = "
|
|
471
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
478
472
|
|
|
479
473
|
[[package]]
|
|
480
474
|
name = "libloading"
|
|
@@ -513,15 +507,15 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
|
513
507
|
|
|
514
508
|
[[package]]
|
|
515
509
|
name = "log"
|
|
516
|
-
version = "0.4.
|
|
510
|
+
version = "0.4.35"
|
|
517
511
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
-
checksum = "
|
|
512
|
+
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
|
519
513
|
|
|
520
514
|
[[package]]
|
|
521
515
|
name = "magnus"
|
|
522
|
-
version = "0.9.
|
|
516
|
+
version = "0.9.3"
|
|
523
517
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
|
-
checksum = "
|
|
518
|
+
checksum = "40ef424404d166cbb71c8b8d19c9c589c748c4547c1afa1928c5504299f6c713"
|
|
525
519
|
dependencies = [
|
|
526
520
|
"magnus-macros",
|
|
527
521
|
"rb-sys",
|
|
@@ -580,9 +574,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
580
574
|
|
|
581
575
|
[[package]]
|
|
582
576
|
name = "openssl-probe"
|
|
583
|
-
version = "0.2.
|
|
577
|
+
version = "0.2.2"
|
|
584
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
585
|
-
checksum = "
|
|
579
|
+
checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1"
|
|
586
580
|
|
|
587
581
|
[[package]]
|
|
588
582
|
name = "option-ext"
|
|
@@ -732,9 +726,9 @@ dependencies = [
|
|
|
732
726
|
|
|
733
727
|
[[package]]
|
|
734
728
|
name = "rustix"
|
|
735
|
-
version = "1.1.
|
|
729
|
+
version = "1.1.6"
|
|
736
730
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
737
|
-
checksum = "
|
|
731
|
+
checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
|
|
738
732
|
dependencies = [
|
|
739
733
|
"bitflags",
|
|
740
734
|
"errno",
|
|
@@ -745,9 +739,9 @@ dependencies = [
|
|
|
745
739
|
|
|
746
740
|
[[package]]
|
|
747
741
|
name = "rustls"
|
|
748
|
-
version = "0.23.
|
|
742
|
+
version = "0.23.46"
|
|
749
743
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
750
|
-
checksum = "
|
|
744
|
+
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
|
751
745
|
dependencies = [
|
|
752
746
|
"log",
|
|
753
747
|
"once_cell",
|
|
@@ -760,9 +754,9 @@ dependencies = [
|
|
|
760
754
|
|
|
761
755
|
[[package]]
|
|
762
756
|
name = "rustls-native-certs"
|
|
763
|
-
version = "0.8.
|
|
757
|
+
version = "0.8.5"
|
|
764
758
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
765
|
-
checksum = "
|
|
759
|
+
checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4"
|
|
766
760
|
dependencies = [
|
|
767
761
|
"openssl-probe",
|
|
768
762
|
"rustls-pki-types",
|
|
@@ -808,9 +802,9 @@ checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
|
|
|
808
802
|
|
|
809
803
|
[[package]]
|
|
810
804
|
name = "rustls-webpki"
|
|
811
|
-
version = "0.103.
|
|
805
|
+
version = "0.103.16"
|
|
812
806
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
813
|
-
checksum = "
|
|
807
|
+
checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
|
|
814
808
|
dependencies = [
|
|
815
809
|
"ring",
|
|
816
810
|
"rustls-pki-types",
|
|
@@ -834,9 +828,9 @@ dependencies = [
|
|
|
834
828
|
|
|
835
829
|
[[package]]
|
|
836
830
|
name = "schannel"
|
|
837
|
-
version = "0.1.
|
|
831
|
+
version = "0.1.30"
|
|
838
832
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
839
|
-
checksum = "
|
|
833
|
+
checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5"
|
|
840
834
|
dependencies = [
|
|
841
835
|
"windows-sys 0.61.2",
|
|
842
836
|
]
|
|
@@ -903,7 +897,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
903
897
|
dependencies = [
|
|
904
898
|
"proc-macro2",
|
|
905
899
|
"quote",
|
|
906
|
-
"syn 3.0.
|
|
900
|
+
"syn 3.0.9",
|
|
907
901
|
]
|
|
908
902
|
|
|
909
903
|
[[package]]
|
|
@@ -932,9 +926,9 @@ dependencies = [
|
|
|
932
926
|
|
|
933
927
|
[[package]]
|
|
934
928
|
name = "sha2"
|
|
935
|
-
version = "0.11.
|
|
929
|
+
version = "0.11.1"
|
|
936
930
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
937
|
-
checksum = "
|
|
931
|
+
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
|
938
932
|
dependencies = [
|
|
939
933
|
"cfg-if",
|
|
940
934
|
"cpufeatures",
|
|
@@ -981,17 +975,6 @@ version = "0.1.5"
|
|
|
981
975
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
982
976
|
checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
|
983
977
|
|
|
984
|
-
[[package]]
|
|
985
|
-
name = "socks"
|
|
986
|
-
version = "0.3.4"
|
|
987
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
988
|
-
checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"
|
|
989
|
-
dependencies = [
|
|
990
|
-
"byteorder",
|
|
991
|
-
"libc",
|
|
992
|
-
"winapi",
|
|
993
|
-
]
|
|
994
|
-
|
|
995
978
|
[[package]]
|
|
996
979
|
name = "streaming-iterator"
|
|
997
980
|
version = "0.1.9"
|
|
@@ -1017,9 +1000,9 @@ dependencies = [
|
|
|
1017
1000
|
|
|
1018
1001
|
[[package]]
|
|
1019
1002
|
name = "syn"
|
|
1020
|
-
version = "3.0.
|
|
1003
|
+
version = "3.0.9"
|
|
1021
1004
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1022
|
-
checksum = "
|
|
1005
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
1023
1006
|
dependencies = [
|
|
1024
1007
|
"proc-macro2",
|
|
1025
1008
|
"quote",
|
|
@@ -1054,7 +1037,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
|
1054
1037
|
dependencies = [
|
|
1055
1038
|
"proc-macro2",
|
|
1056
1039
|
"quote",
|
|
1057
|
-
"syn 3.0.
|
|
1040
|
+
"syn 3.0.9",
|
|
1058
1041
|
]
|
|
1059
1042
|
|
|
1060
1043
|
[[package]]
|
|
@@ -1157,9 +1140,9 @@ checksum = "d0af592be68c579aa78a16846bd19422978c3c52e438523d45ff5d1bff1f9d4a"
|
|
|
1157
1140
|
|
|
1158
1141
|
[[package]]
|
|
1159
1142
|
name = "tree-sitter-language-pack"
|
|
1160
|
-
version = "1.
|
|
1143
|
+
version = "1.23.1"
|
|
1161
1144
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1162
|
-
checksum = "
|
|
1145
|
+
checksum = "0ff1c086ef421b7b28a11f0f2952c221f65c23e2c75a453277a8ddcfa1b54e7c"
|
|
1163
1146
|
dependencies = [
|
|
1164
1147
|
"ahash",
|
|
1165
1148
|
"cc",
|
|
@@ -1183,7 +1166,7 @@ dependencies = [
|
|
|
1183
1166
|
|
|
1184
1167
|
[[package]]
|
|
1185
1168
|
name = "ts-pack-core-rb"
|
|
1186
|
-
version = "1.
|
|
1169
|
+
version = "1.23.1"
|
|
1187
1170
|
dependencies = [
|
|
1188
1171
|
"magnus",
|
|
1189
1172
|
"rb-sys",
|
|
@@ -1212,9 +1195,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
|
1212
1195
|
|
|
1213
1196
|
[[package]]
|
|
1214
1197
|
name = "ureq"
|
|
1215
|
-
version = "3.
|
|
1198
|
+
version = "3.5.0"
|
|
1216
1199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1217
|
-
checksum = "
|
|
1200
|
+
checksum = "cde93ff05758a36a851a398a772b0b79a82fbe3c186a46f2696baaeaf84c966b"
|
|
1218
1201
|
dependencies = [
|
|
1219
1202
|
"base64",
|
|
1220
1203
|
"flate2",
|
|
@@ -1223,7 +1206,6 @@ dependencies = [
|
|
|
1223
1206
|
"rustls",
|
|
1224
1207
|
"rustls-pki-types",
|
|
1225
1208
|
"rustls-platform-verifier",
|
|
1226
|
-
"socks",
|
|
1227
1209
|
"ureq-proto",
|
|
1228
1210
|
"utf8-zero",
|
|
1229
1211
|
"webpki-roots",
|
|
@@ -1231,9 +1213,9 @@ dependencies = [
|
|
|
1231
1213
|
|
|
1232
1214
|
[[package]]
|
|
1233
1215
|
name = "ureq-proto"
|
|
1234
|
-
version = "0.6.
|
|
1216
|
+
version = "0.6.5"
|
|
1235
1217
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1236
|
-
checksum = "
|
|
1218
|
+
checksum = "841583fc36089d7d59419568ae157f43a5a03a2e5a81ba87c77d1596ef46e922"
|
|
1237
1219
|
dependencies = [
|
|
1238
1220
|
"base64",
|
|
1239
1221
|
"http",
|
|
@@ -1271,12 +1253,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
1271
1253
|
|
|
1272
1254
|
[[package]]
|
|
1273
1255
|
name = "wasm-bindgen"
|
|
1274
|
-
version = "0.2.
|
|
1256
|
+
version = "0.2.130"
|
|
1275
1257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1276
|
-
checksum = "
|
|
1258
|
+
checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
|
|
1277
1259
|
dependencies = [
|
|
1278
1260
|
"cfg-if",
|
|
1279
|
-
"once_cell",
|
|
1280
1261
|
"rustversion",
|
|
1281
1262
|
"wasm-bindgen-macro",
|
|
1282
1263
|
"wasm-bindgen-shared",
|
|
@@ -1284,9 +1265,9 @@ dependencies = [
|
|
|
1284
1265
|
|
|
1285
1266
|
[[package]]
|
|
1286
1267
|
name = "wasm-bindgen-macro"
|
|
1287
|
-
version = "0.2.
|
|
1268
|
+
version = "0.2.130"
|
|
1288
1269
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1289
|
-
checksum = "
|
|
1270
|
+
checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
|
|
1290
1271
|
dependencies = [
|
|
1291
1272
|
"quote",
|
|
1292
1273
|
"wasm-bindgen-macro-support",
|
|
@@ -1294,60 +1275,44 @@ dependencies = [
|
|
|
1294
1275
|
|
|
1295
1276
|
[[package]]
|
|
1296
1277
|
name = "wasm-bindgen-macro-support"
|
|
1297
|
-
version = "0.2.
|
|
1278
|
+
version = "0.2.130"
|
|
1298
1279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1299
|
-
checksum = "
|
|
1280
|
+
checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
|
|
1300
1281
|
dependencies = [
|
|
1301
1282
|
"bumpalo",
|
|
1302
1283
|
"proc-macro2",
|
|
1303
1284
|
"quote",
|
|
1304
|
-
"syn 3.0.
|
|
1285
|
+
"syn 3.0.9",
|
|
1305
1286
|
"wasm-bindgen-shared",
|
|
1306
1287
|
]
|
|
1307
1288
|
|
|
1308
1289
|
[[package]]
|
|
1309
1290
|
name = "wasm-bindgen-shared"
|
|
1310
|
-
version = "0.2.
|
|
1291
|
+
version = "0.2.130"
|
|
1311
1292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1312
|
-
checksum = "
|
|
1293
|
+
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
|
|
1313
1294
|
dependencies = [
|
|
1314
1295
|
"unicode-ident",
|
|
1315
1296
|
]
|
|
1316
1297
|
|
|
1317
1298
|
[[package]]
|
|
1318
1299
|
name = "webpki-root-certs"
|
|
1319
|
-
version = "1.0.
|
|
1300
|
+
version = "1.0.11"
|
|
1320
1301
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1321
|
-
checksum = "
|
|
1302
|
+
checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a"
|
|
1322
1303
|
dependencies = [
|
|
1323
1304
|
"rustls-pki-types",
|
|
1324
1305
|
]
|
|
1325
1306
|
|
|
1326
1307
|
[[package]]
|
|
1327
1308
|
name = "webpki-roots"
|
|
1328
|
-
version = "1.0.
|
|
1309
|
+
version = "1.0.11"
|
|
1329
1310
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1330
|
-
checksum = "
|
|
1311
|
+
checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
|
|
1331
1312
|
dependencies = [
|
|
1332
1313
|
"rustls-pki-types",
|
|
1333
1314
|
]
|
|
1334
1315
|
|
|
1335
|
-
[[package]]
|
|
1336
|
-
name = "winapi"
|
|
1337
|
-
version = "0.3.9"
|
|
1338
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1339
|
-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
1340
|
-
dependencies = [
|
|
1341
|
-
"winapi-i686-pc-windows-gnu",
|
|
1342
|
-
"winapi-x86_64-pc-windows-gnu",
|
|
1343
|
-
]
|
|
1344
|
-
|
|
1345
|
-
[[package]]
|
|
1346
|
-
name = "winapi-i686-pc-windows-gnu"
|
|
1347
|
-
version = "0.4.0"
|
|
1348
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1349
|
-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
1350
|
-
|
|
1351
1316
|
[[package]]
|
|
1352
1317
|
name = "winapi-util"
|
|
1353
1318
|
version = "0.1.11"
|
|
@@ -1357,12 +1322,6 @@ dependencies = [
|
|
|
1357
1322
|
"windows-sys 0.61.2",
|
|
1358
1323
|
]
|
|
1359
1324
|
|
|
1360
|
-
[[package]]
|
|
1361
|
-
name = "winapi-x86_64-pc-windows-gnu"
|
|
1362
|
-
version = "0.4.0"
|
|
1363
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1364
|
-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
1365
|
-
|
|
1366
1325
|
[[package]]
|
|
1367
1326
|
name = "windows-link"
|
|
1368
1327
|
version = "0.2.1"
|
|
@@ -1468,9 +1427,9 @@ checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|
|
|
1468
1427
|
|
|
1469
1428
|
[[package]]
|
|
1470
1429
|
name = "xattr"
|
|
1471
|
-
version = "1.
|
|
1430
|
+
version = "1.7.0"
|
|
1472
1431
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1473
|
-
checksum = "
|
|
1432
|
+
checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08"
|
|
1474
1433
|
dependencies = [
|
|
1475
1434
|
"libc",
|
|
1476
1435
|
"rustix",
|
|
@@ -1478,18 +1437,18 @@ dependencies = [
|
|
|
1478
1437
|
|
|
1479
1438
|
[[package]]
|
|
1480
1439
|
name = "zerocopy"
|
|
1481
|
-
version = "0.8.
|
|
1440
|
+
version = "0.8.63"
|
|
1482
1441
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1483
|
-
checksum = "
|
|
1442
|
+
checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
|
|
1484
1443
|
dependencies = [
|
|
1485
1444
|
"zerocopy-derive",
|
|
1486
1445
|
]
|
|
1487
1446
|
|
|
1488
1447
|
[[package]]
|
|
1489
1448
|
name = "zerocopy-derive"
|
|
1490
|
-
version = "0.8.
|
|
1449
|
+
version = "0.8.63"
|
|
1491
1450
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1492
|
-
checksum = "
|
|
1451
|
+
checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
|
|
1493
1452
|
dependencies = [
|
|
1494
1453
|
"proc-macro2",
|
|
1495
1454
|
"quote",
|
|
@@ -1516,27 +1475,27 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
|
1516
1475
|
|
|
1517
1476
|
[[package]]
|
|
1518
1477
|
name = "zstd"
|
|
1519
|
-
version = "0.14.
|
|
1478
|
+
version = "0.14.3"
|
|
1520
1479
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1521
|
-
checksum = "
|
|
1480
|
+
checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
|
|
1522
1481
|
dependencies = [
|
|
1523
1482
|
"zstd-safe",
|
|
1524
1483
|
]
|
|
1525
1484
|
|
|
1526
1485
|
[[package]]
|
|
1527
1486
|
name = "zstd-safe"
|
|
1528
|
-
version = "8.
|
|
1487
|
+
version = "8.2.0"
|
|
1529
1488
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1530
|
-
checksum = "
|
|
1489
|
+
checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
|
|
1531
1490
|
dependencies = [
|
|
1532
1491
|
"zstd-sys",
|
|
1533
1492
|
]
|
|
1534
1493
|
|
|
1535
1494
|
[[package]]
|
|
1536
1495
|
name = "zstd-sys"
|
|
1537
|
-
version = "2.1.
|
|
1496
|
+
version = "2.1.2+zstd.1.5.7"
|
|
1538
1497
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1539
|
-
checksum = "
|
|
1498
|
+
checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
|
|
1540
1499
|
dependencies = [
|
|
1541
1500
|
"cc",
|
|
1542
1501
|
"pkg-config",
|
|
@@ -1,11 +1,11 @@
|
|
|
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
10
|
authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
|
|
11
11
|
license = "MIT"
|
|
@@ -31,7 +31,7 @@ magnus = "0.9"
|
|
|
31
31
|
rb-sys = ">=0.9.130, <0.10"
|
|
32
32
|
serde = { version = "1", features = ["derive"] }
|
|
33
33
|
serde_json = "1"
|
|
34
|
-
tree-sitter-language-pack = { version = "1.
|
|
34
|
+
tree-sitter-language-pack = { version = "1.23.1", features = ["serde", "config", "download"] }
|
|
35
35
|
|
|
36
36
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
37
37
|
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code. Local lint tables
|
|
@@ -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,7 +1,7 @@
|
|
|
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
|
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
|
-
rubygems_version:
|
|
93
|
+
rubygems_version: 4.0.20
|
|
94
94
|
specification_version: 4
|
|
95
95
|
summary: Pre-compiled tree-sitter grammars for 372 programming languages
|
|
96
96
|
test_files: []
|