tree_sitter_language_pack 1.20.0 → 1.21.0
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 +3 -3
- data/ext/ts_pack_core_rb/native/Cargo.lock +43 -43
- data/ext/ts_pack_core_rb/native/Cargo.toml +5 -5
- data/ext/ts_pack_core_rb/src/lib.rs +39 -11
- data/ext/ts_pack_core_rb/src/tree_sitter_language_pack.gemspec +2 -2
- data/lib/tree_sitter_language_pack/version.rb +2 -2
- data/sig/types.rbs +13 -21
- metadata +3 -4
- data/lib/ts_pack_core_rb.rb +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '082b9e4acce1612c796a783ebf5b701bca770ad3cdc517c2920cce2bf6608da3'
|
|
4
|
+
data.tar.gz: 04130de24f9aeb64094b4212cb3cc1eb681cf27529da421b5a5ef490680b8ae3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68a12aebeb43449174a21b730de2f1b6566e701c602b1d8765b1347a1f2dc305186aa36bf6bfc59825c895cd10605d44ef09bcc4f242152274c3745d38231495
|
|
7
|
+
data.tar.gz: 8b2c19de41c24049576c53137daea46861bc076129ce318b29af1705aaca02c339bf3d9667be529755891a3f35e4e4780ea1a2b4a4f185f93661c77a6292fb41
|
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:481e2980259b0958c711e2301aa32fc4680ad9a624499384c2212e4c4455d990 -->
|
|
3
3
|
<!-- To regenerate: alef readme -->
|
|
4
4
|
<!-- To verify freshness: alef verify -->
|
|
5
5
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
</a>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
|
-
Pre-compiled tree-sitter grammars for
|
|
103
|
+
Pre-compiled tree-sitter grammars for 372 programming languages with Ruby bindings via Magnus.
|
|
104
104
|
|
|
105
105
|
## What This Package Provides
|
|
106
106
|
|
|
@@ -131,7 +131,7 @@ puts result.metrics.error_count.inspect
|
|
|
131
131
|
|
|
132
132
|
## Features
|
|
133
133
|
|
|
134
|
-
- **
|
|
134
|
+
- **372 languages** — pre-compiled tree-sitter grammars covering every major programming language and many minor ones.
|
|
135
135
|
- **On-demand download + cache** — parsers fetched at first use; subsequent runs hit the local cache.
|
|
136
136
|
- **Code intelligence** — extract functions, classes, imports, exports, symbols, docstrings, and diagnostics with one API.
|
|
137
137
|
- **Syntax-aware chunking** — semantic chunks for RAG/LLM pipelines.
|
|
@@ -57,9 +57,9 @@ dependencies = [
|
|
|
57
57
|
|
|
58
58
|
[[package]]
|
|
59
59
|
name = "bitflags"
|
|
60
|
-
version = "2.13.
|
|
60
|
+
version = "2.13.2"
|
|
61
61
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
62
|
-
checksum = "
|
|
62
|
+
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
|
63
63
|
|
|
64
64
|
[[package]]
|
|
65
65
|
name = "block-buffer"
|
|
@@ -90,9 +90,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
90
90
|
|
|
91
91
|
[[package]]
|
|
92
92
|
name = "cc"
|
|
93
|
-
version = "1.
|
|
93
|
+
version = "1.6.0"
|
|
94
94
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
-
checksum = "
|
|
95
|
+
checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630"
|
|
96
96
|
dependencies = [
|
|
97
97
|
"find-msvc-tools",
|
|
98
98
|
"jobserver",
|
|
@@ -111,9 +111,9 @@ dependencies = [
|
|
|
111
111
|
|
|
112
112
|
[[package]]
|
|
113
113
|
name = "cfg-if"
|
|
114
|
-
version = "1.0.
|
|
114
|
+
version = "1.0.5"
|
|
115
115
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
-
checksum = "
|
|
116
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
117
117
|
|
|
118
118
|
[[package]]
|
|
119
119
|
name = "clang-sys"
|
|
@@ -189,9 +189,9 @@ dependencies = [
|
|
|
189
189
|
|
|
190
190
|
[[package]]
|
|
191
191
|
name = "crc32fast"
|
|
192
|
-
version = "1.5.
|
|
192
|
+
version = "1.5.2"
|
|
193
193
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
-
checksum = "
|
|
194
|
+
checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78"
|
|
195
195
|
dependencies = [
|
|
196
196
|
"cfg-if",
|
|
197
197
|
]
|
|
@@ -288,9 +288,9 @@ dependencies = [
|
|
|
288
288
|
|
|
289
289
|
[[package]]
|
|
290
290
|
name = "find-msvc-tools"
|
|
291
|
-
version = "0.1.
|
|
291
|
+
version = "0.1.14"
|
|
292
292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
293
|
-
checksum = "
|
|
293
|
+
checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484"
|
|
294
294
|
|
|
295
295
|
[[package]]
|
|
296
296
|
name = "flate2"
|
|
@@ -357,9 +357,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
|
357
357
|
|
|
358
358
|
[[package]]
|
|
359
359
|
name = "hybrid-array"
|
|
360
|
-
version = "0.4.
|
|
360
|
+
version = "0.4.15"
|
|
361
361
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
362
|
-
checksum = "
|
|
362
|
+
checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
|
|
363
363
|
dependencies = [
|
|
364
364
|
"typenum",
|
|
365
365
|
]
|
|
@@ -513,9 +513,9 @@ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
|
|
|
513
513
|
|
|
514
514
|
[[package]]
|
|
515
515
|
name = "magnus"
|
|
516
|
-
version = "0.
|
|
516
|
+
version = "0.9.2"
|
|
517
517
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
-
checksum = "
|
|
518
|
+
checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
|
|
519
519
|
dependencies = [
|
|
520
520
|
"magnus-macros",
|
|
521
521
|
"rb-sys",
|
|
@@ -525,9 +525,9 @@ dependencies = [
|
|
|
525
525
|
|
|
526
526
|
[[package]]
|
|
527
527
|
name = "magnus-macros"
|
|
528
|
-
version = "0.
|
|
528
|
+
version = "0.9.1"
|
|
529
529
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
530
|
-
checksum = "
|
|
530
|
+
checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
|
|
531
531
|
dependencies = [
|
|
532
532
|
"proc-macro2",
|
|
533
533
|
"quote",
|
|
@@ -727,9 +727,9 @@ dependencies = [
|
|
|
727
727
|
|
|
728
728
|
[[package]]
|
|
729
729
|
name = "rustix"
|
|
730
|
-
version = "1.1.
|
|
730
|
+
version = "1.1.5"
|
|
731
731
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
732
|
-
checksum = "
|
|
732
|
+
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
|
733
733
|
dependencies = [
|
|
734
734
|
"bitflags",
|
|
735
735
|
"errno",
|
|
@@ -740,9 +740,9 @@ dependencies = [
|
|
|
740
740
|
|
|
741
741
|
[[package]]
|
|
742
742
|
name = "rustls"
|
|
743
|
-
version = "0.23.
|
|
743
|
+
version = "0.23.45"
|
|
744
744
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
745
|
-
checksum = "
|
|
745
|
+
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
|
746
746
|
dependencies = [
|
|
747
747
|
"log",
|
|
748
748
|
"once_cell",
|
|
@@ -776,9 +776,9 @@ dependencies = [
|
|
|
776
776
|
|
|
777
777
|
[[package]]
|
|
778
778
|
name = "rustls-platform-verifier"
|
|
779
|
-
version = "0.7.
|
|
779
|
+
version = "0.7.1"
|
|
780
780
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
781
|
-
checksum = "
|
|
781
|
+
checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98"
|
|
782
782
|
dependencies = [
|
|
783
783
|
"core-foundation",
|
|
784
784
|
"core-foundation-sys",
|
|
@@ -797,9 +797,9 @@ dependencies = [
|
|
|
797
797
|
|
|
798
798
|
[[package]]
|
|
799
799
|
name = "rustls-platform-verifier-android"
|
|
800
|
-
version = "0.
|
|
800
|
+
version = "0.2.0"
|
|
801
801
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
802
|
-
checksum = "
|
|
802
|
+
checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
|
|
803
803
|
|
|
804
804
|
[[package]]
|
|
805
805
|
name = "rustls-webpki"
|
|
@@ -898,7 +898,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
898
898
|
dependencies = [
|
|
899
899
|
"proc-macro2",
|
|
900
900
|
"quote",
|
|
901
|
-
"syn 3.0.
|
|
901
|
+
"syn 3.0.6",
|
|
902
902
|
]
|
|
903
903
|
|
|
904
904
|
[[package]]
|
|
@@ -1011,9 +1011,9 @@ dependencies = [
|
|
|
1011
1011
|
|
|
1012
1012
|
[[package]]
|
|
1013
1013
|
name = "syn"
|
|
1014
|
-
version = "3.0.
|
|
1014
|
+
version = "3.0.6"
|
|
1015
1015
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1016
|
-
checksum = "
|
|
1016
|
+
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
|
|
1017
1017
|
dependencies = [
|
|
1018
1018
|
"proc-macro2",
|
|
1019
1019
|
"quote",
|
|
@@ -1033,22 +1033,22 @@ dependencies = [
|
|
|
1033
1033
|
|
|
1034
1034
|
[[package]]
|
|
1035
1035
|
name = "thiserror"
|
|
1036
|
-
version = "2.0.
|
|
1036
|
+
version = "2.0.21"
|
|
1037
1037
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1038
|
-
checksum = "
|
|
1038
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
1039
1039
|
dependencies = [
|
|
1040
1040
|
"thiserror-impl",
|
|
1041
1041
|
]
|
|
1042
1042
|
|
|
1043
1043
|
[[package]]
|
|
1044
1044
|
name = "thiserror-impl"
|
|
1045
|
-
version = "2.0.
|
|
1045
|
+
version = "2.0.21"
|
|
1046
1046
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1047
|
-
checksum = "
|
|
1047
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
1048
1048
|
dependencies = [
|
|
1049
1049
|
"proc-macro2",
|
|
1050
1050
|
"quote",
|
|
1051
|
-
"syn 3.0.
|
|
1051
|
+
"syn 3.0.6",
|
|
1052
1052
|
]
|
|
1053
1053
|
|
|
1054
1054
|
[[package]]
|
|
@@ -1151,9 +1151,9 @@ checksum = "ca0d1bf6fdd806e43ae5198f82f527056d359def39e54e67a0f478ac09dac081"
|
|
|
1151
1151
|
|
|
1152
1152
|
[[package]]
|
|
1153
1153
|
name = "tree-sitter-language-pack"
|
|
1154
|
-
version = "1.
|
|
1154
|
+
version = "1.21.0"
|
|
1155
1155
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1156
|
-
checksum = "
|
|
1156
|
+
checksum = "1ad8597fc66b66d5ba13729827f07f47b89f9f8336b7441c030cad5ecb63969f"
|
|
1157
1157
|
dependencies = [
|
|
1158
1158
|
"ahash",
|
|
1159
1159
|
"cc",
|
|
@@ -1177,7 +1177,7 @@ dependencies = [
|
|
|
1177
1177
|
|
|
1178
1178
|
[[package]]
|
|
1179
1179
|
name = "ts-pack-core-rb"
|
|
1180
|
-
version = "1.
|
|
1180
|
+
version = "1.21.0"
|
|
1181
1181
|
dependencies = [
|
|
1182
1182
|
"magnus",
|
|
1183
1183
|
"rb-sys",
|
|
@@ -1194,9 +1194,9 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
|
1194
1194
|
|
|
1195
1195
|
[[package]]
|
|
1196
1196
|
name = "unicode-ident"
|
|
1197
|
-
version = "1.0.
|
|
1197
|
+
version = "1.0.26"
|
|
1198
1198
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1199
|
-
checksum = "
|
|
1199
|
+
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
|
1200
1200
|
|
|
1201
1201
|
[[package]]
|
|
1202
1202
|
name = "untrusted"
|
|
@@ -1206,9 +1206,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
|
1206
1206
|
|
|
1207
1207
|
[[package]]
|
|
1208
1208
|
name = "ureq"
|
|
1209
|
-
version = "3.4.
|
|
1209
|
+
version = "3.4.2"
|
|
1210
1210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1211
|
-
checksum = "
|
|
1211
|
+
checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc"
|
|
1212
1212
|
dependencies = [
|
|
1213
1213
|
"base64",
|
|
1214
1214
|
"flate2",
|
|
@@ -1225,9 +1225,9 @@ dependencies = [
|
|
|
1225
1225
|
|
|
1226
1226
|
[[package]]
|
|
1227
1227
|
name = "ureq-proto"
|
|
1228
|
-
version = "0.6.
|
|
1228
|
+
version = "0.6.4"
|
|
1229
1229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1230
|
-
checksum = "
|
|
1230
|
+
checksum = "f86fd172ccca569e458f61b6bdd6220965a9ef36e672a6852953b51a0e1583be"
|
|
1231
1231
|
dependencies = [
|
|
1232
1232
|
"base64",
|
|
1233
1233
|
"http",
|
|
@@ -1498,9 +1498,9 @@ checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
|
|
|
1498
1498
|
|
|
1499
1499
|
[[package]]
|
|
1500
1500
|
name = "zlib-rs"
|
|
1501
|
-
version = "0.6.
|
|
1501
|
+
version = "0.6.8"
|
|
1502
1502
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1503
|
-
checksum = "
|
|
1503
|
+
checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
|
|
1504
1504
|
|
|
1505
1505
|
[[package]]
|
|
1506
1506
|
name = "zmij"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:25a2ab444228777b34868935c5b1c87621fa0a17a44e7da61480d140ce7c128a
|
|
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.21.0"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
|
-
description = "Pre-compiled tree-sitter grammars for
|
|
11
|
+
description = "Pre-compiled tree-sitter grammars for 372 programming languages"
|
|
12
12
|
readme = false
|
|
13
13
|
keywords = ["language-pack", "parser", "syntax", "tree-sitter"]
|
|
14
14
|
categories = []
|
|
@@ -26,11 +26,11 @@ default = ["download"]
|
|
|
26
26
|
download = ["tree-sitter-language-pack/download"]
|
|
27
27
|
|
|
28
28
|
[dependencies]
|
|
29
|
-
magnus = "0.
|
|
29
|
+
magnus = "0.9"
|
|
30
30
|
rb-sys = ">=0.9.130, <0.10"
|
|
31
31
|
serde = { version = "1", features = ["derive"] }
|
|
32
32
|
serde_json = "1"
|
|
33
|
-
tree-sitter-language-pack = { version = "1.
|
|
33
|
+
tree-sitter-language-pack = { version = "1.21.0", features = ["serde", "config", "download"] }
|
|
34
34
|
|
|
35
35
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
36
36
|
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:942e00d906b2e2fb56d004d9b5451cfe7731072a51e2015750d45f1c5af2efef
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -3139,7 +3139,7 @@ impl TreeCursor {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
3141
|
|
|
3142
|
-
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
3142
|
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3143
3143
|
pub enum CommentKind {
|
|
3144
3144
|
Line,
|
|
3145
3145
|
Block,
|
|
@@ -3165,7 +3165,14 @@ impl magnus::IntoValue for CommentKind {
|
|
|
3165
3165
|
|
|
3166
3166
|
impl magnus::TryConvert for CommentKind {
|
|
3167
3167
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3168
|
-
|
|
3168
|
+
// IntoValue emits Symbols, including when this enum is a Hash key.
|
|
3169
|
+
// Accept that exact representation as well as String inputs; do not
|
|
3170
|
+
// coerce arbitrary objects through to_s.
|
|
3171
|
+
let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
|
|
3172
|
+
symbol.name()?.into_owned()
|
|
3173
|
+
} else {
|
|
3174
|
+
magnus::TryConvert::try_convert(val)?
|
|
3175
|
+
};
|
|
3169
3176
|
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3170
3177
|
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3171
3178
|
// existing consumer code written in any of those styles keep working.
|
|
@@ -3184,7 +3191,7 @@ impl magnus::TryConvert for CommentKind {
|
|
|
3184
3191
|
unsafe impl IntoValueFromNative for CommentKind {}
|
|
3185
3192
|
unsafe impl TryConvertOwned for CommentKind {}
|
|
3186
3193
|
|
|
3187
|
-
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
3194
|
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3188
3195
|
pub enum DataNodeKind {
|
|
3189
3196
|
KeyValue,
|
|
3190
3197
|
Element,
|
|
@@ -3210,7 +3217,14 @@ impl magnus::IntoValue for DataNodeKind {
|
|
|
3210
3217
|
|
|
3211
3218
|
impl magnus::TryConvert for DataNodeKind {
|
|
3212
3219
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3213
|
-
|
|
3220
|
+
// IntoValue emits Symbols, including when this enum is a Hash key.
|
|
3221
|
+
// Accept that exact representation as well as String inputs; do not
|
|
3222
|
+
// coerce arbitrary objects through to_s.
|
|
3223
|
+
let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
|
|
3224
|
+
symbol.name()?.into_owned()
|
|
3225
|
+
} else {
|
|
3226
|
+
magnus::TryConvert::try_convert(val)?
|
|
3227
|
+
};
|
|
3214
3228
|
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3215
3229
|
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3216
3230
|
// existing consumer code written in any of those styles keep working.
|
|
@@ -3229,7 +3243,7 @@ impl magnus::TryConvert for DataNodeKind {
|
|
|
3229
3243
|
unsafe impl IntoValueFromNative for DataNodeKind {}
|
|
3230
3244
|
unsafe impl TryConvertOwned for DataNodeKind {}
|
|
3231
3245
|
|
|
3232
|
-
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
3246
|
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3233
3247
|
pub enum DiagnosticSeverity {
|
|
3234
3248
|
Error,
|
|
3235
3249
|
Warning,
|
|
@@ -3255,7 +3269,14 @@ impl magnus::IntoValue for DiagnosticSeverity {
|
|
|
3255
3269
|
|
|
3256
3270
|
impl magnus::TryConvert for DiagnosticSeverity {
|
|
3257
3271
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3258
|
-
|
|
3272
|
+
// IntoValue emits Symbols, including when this enum is a Hash key.
|
|
3273
|
+
// Accept that exact representation as well as String inputs; do not
|
|
3274
|
+
// coerce arbitrary objects through to_s.
|
|
3275
|
+
let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
|
|
3276
|
+
symbol.name()?.into_owned()
|
|
3277
|
+
} else {
|
|
3278
|
+
magnus::TryConvert::try_convert(val)?
|
|
3279
|
+
};
|
|
3259
3280
|
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3260
3281
|
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3261
3282
|
// existing consumer code written in any of those styles keep working.
|
|
@@ -3333,7 +3354,7 @@ impl magnus::TryConvert for DocstringFormat {
|
|
|
3333
3354
|
unsafe impl IntoValueFromNative for DocstringFormat {}
|
|
3334
3355
|
unsafe impl TryConvertOwned for DocstringFormat {}
|
|
3335
3356
|
|
|
3336
|
-
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
3357
|
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3337
3358
|
pub enum ExportKind {
|
|
3338
3359
|
Named,
|
|
3339
3360
|
Default,
|
|
@@ -3359,7 +3380,14 @@ impl magnus::IntoValue for ExportKind {
|
|
|
3359
3380
|
|
|
3360
3381
|
impl magnus::TryConvert for ExportKind {
|
|
3361
3382
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3362
|
-
|
|
3383
|
+
// IntoValue emits Symbols, including when this enum is a Hash key.
|
|
3384
|
+
// Accept that exact representation as well as String inputs; do not
|
|
3385
|
+
// coerce arbitrary objects through to_s.
|
|
3386
|
+
let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
|
|
3387
|
+
symbol.name()?.into_owned()
|
|
3388
|
+
} else {
|
|
3389
|
+
magnus::TryConvert::try_convert(val)?
|
|
3390
|
+
};
|
|
3363
3391
|
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3364
3392
|
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3365
3393
|
// existing consumer code written in any of those styles keep working.
|
|
@@ -4466,9 +4494,9 @@ impl From<tree_sitter_language_pack::SymbolKind> for SymbolKind {
|
|
|
4466
4494
|
}
|
|
4467
4495
|
}
|
|
4468
4496
|
|
|
4469
|
-
/// Convert a `tree_sitter_language_pack::
|
|
4497
|
+
/// Convert a `tree_sitter_language_pack::Error` error to a Magnus runtime error.
|
|
4470
4498
|
#[allow(dead_code)]
|
|
4471
|
-
fn error_to_magnus_err(e: tree_sitter_language_pack::
|
|
4499
|
+
fn error_to_magnus_err(e: tree_sitter_language_pack::Error) -> magnus::Error {
|
|
4472
4500
|
let msg = e.to_string();
|
|
4473
4501
|
magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
|
|
4474
4502
|
}
|
|
@@ -4,8 +4,8 @@ Gem::Specification.new do |spec|
|
|
|
4
4
|
spec.name = "tree_sitter_language_pack"
|
|
5
5
|
spec.version = "1.9.0.pre.rc.4"
|
|
6
6
|
spec.authors = ["Na'aman Hirschfeld"]
|
|
7
|
-
spec.summary = "Pre-compiled tree-sitter grammars for
|
|
8
|
-
spec.description = "Pre-compiled tree-sitter grammars for
|
|
7
|
+
spec.summary = "Pre-compiled tree-sitter grammars for 372 programming languages"
|
|
8
|
+
spec.description = "Pre-compiled tree-sitter grammars for 372 programming languages"
|
|
9
9
|
spec.homepage = "https://github.com/xberg-io/tree-sitter-language-pack"
|
|
10
10
|
spec.license = "MIT"
|
|
11
11
|
spec.required_ruby_version = ">= 3.2.0"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:28cc7cb499a403ec2aa5980790dc03099b10056ead87c4110d6acee57a63138d
|
|
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.21.0"
|
|
10
10
|
end
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:e8d472e7cb7452efc72dcbc77101e3bdfc9e2cc646d3823df2beee982ab623be
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -43,11 +43,11 @@ module TreeSitterLanguagePack
|
|
|
43
43
|
|
|
44
44
|
class CommentInfo
|
|
45
45
|
attr_reader text: String
|
|
46
|
-
attr_reader kind:
|
|
46
|
+
attr_reader kind: enum_CommentKind
|
|
47
47
|
attr_reader span: Span
|
|
48
48
|
attr_reader associated_node: String?
|
|
49
49
|
|
|
50
|
-
def initialize: (?text: String, ?kind:
|
|
50
|
+
def initialize: (?text: String, ?kind: enum_CommentKind, ?span: Span, ?associated_node: String) -> void
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
class DataAttribute
|
|
@@ -59,22 +59,22 @@ module TreeSitterLanguagePack
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
class DataNode
|
|
62
|
-
attr_reader kind:
|
|
62
|
+
attr_reader kind: enum_DataNodeKind
|
|
63
63
|
attr_reader key: String?
|
|
64
64
|
attr_reader value: String?
|
|
65
65
|
attr_reader attributes: Array[DataAttribute]
|
|
66
66
|
attr_reader children: Array[DataNode]
|
|
67
67
|
attr_reader span: Span
|
|
68
68
|
|
|
69
|
-
def initialize: (?kind:
|
|
69
|
+
def initialize: (?kind: enum_DataNodeKind, ?key: String, ?value: String, ?attributes: Array[DataAttribute], ?children: Array[DataNode], ?span: Span) -> void
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
class Diagnostic
|
|
73
73
|
attr_reader message: String
|
|
74
|
-
attr_reader severity:
|
|
74
|
+
attr_reader severity: enum_DiagnosticSeverity
|
|
75
75
|
attr_reader span: Span
|
|
76
76
|
|
|
77
|
-
def initialize: (?message: String, ?severity:
|
|
77
|
+
def initialize: (?message: String, ?severity: enum_DiagnosticSeverity, ?span: Span) -> void
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
class DocSection
|
|
@@ -103,10 +103,10 @@ module TreeSitterLanguagePack
|
|
|
103
103
|
|
|
104
104
|
class ExportInfo
|
|
105
105
|
attr_reader name: String
|
|
106
|
-
attr_reader kind:
|
|
106
|
+
attr_reader kind: enum_ExportKind
|
|
107
107
|
attr_reader span: Span
|
|
108
108
|
|
|
109
|
-
def initialize: (?name: String, ?kind:
|
|
109
|
+
def initialize: (?name: String, ?kind: enum_ExportKind, ?span: Span) -> void
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
class FileMetrics
|
|
@@ -279,24 +279,16 @@ module TreeSitterLanguagePack
|
|
|
279
279
|
def field_name: () -> String?
|
|
280
280
|
end
|
|
281
281
|
|
|
282
|
-
|
|
283
|
-
type value = :Line | :Block | :Doc
|
|
284
|
-
end
|
|
282
|
+
type enum_CommentKind = :Line | :Block | :Doc
|
|
285
283
|
|
|
286
|
-
|
|
287
|
-
type value = :KeyValue | :Element | :Sequence
|
|
288
|
-
end
|
|
284
|
+
type enum_DataNodeKind = :KeyValue | :Element | :Sequence
|
|
289
285
|
|
|
290
|
-
|
|
291
|
-
type value = :Error | :Warning | :Info
|
|
292
|
-
end
|
|
286
|
+
type enum_DiagnosticSeverity = :Error | :Warning | :Info
|
|
293
287
|
|
|
294
288
|
class DocstringFormat
|
|
295
289
|
end
|
|
296
290
|
|
|
297
|
-
|
|
298
|
-
type value = :Named | :Default | :ReExport
|
|
299
|
-
end
|
|
291
|
+
type enum_ExportKind = :Named | :Default | :ReExport
|
|
300
292
|
|
|
301
293
|
class StructureKind
|
|
302
294
|
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.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
@@ -43,7 +43,7 @@ dependencies:
|
|
|
43
43
|
- - "~>"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '0.5'
|
|
46
|
-
description: Pre-compiled tree-sitter grammars for
|
|
46
|
+
description: Pre-compiled tree-sitter grammars for 372 programming languages
|
|
47
47
|
executables: []
|
|
48
48
|
extensions:
|
|
49
49
|
- ext/ts_pack_core_rb/native/extconf.rb
|
|
@@ -66,7 +66,6 @@ files:
|
|
|
66
66
|
- lib/tree_sitter_language_pack.rb
|
|
67
67
|
- lib/tree_sitter_language_pack/native.rb
|
|
68
68
|
- lib/tree_sitter_language_pack/version.rb
|
|
69
|
-
- lib/ts_pack_core_rb.rb
|
|
70
69
|
- sig/types.rbs
|
|
71
70
|
homepage: https://github.com/xberg-io/tree-sitter-language-pack
|
|
72
71
|
licenses:
|
|
@@ -90,5 +89,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
89
|
requirements: []
|
|
91
90
|
rubygems_version: 3.6.9
|
|
92
91
|
specification_version: 4
|
|
93
|
-
summary: Pre-compiled tree-sitter grammars for
|
|
92
|
+
summary: Pre-compiled tree-sitter grammars for 372 programming languages
|
|
94
93
|
test_files: []
|
data/lib/ts_pack_core_rb.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "rbconfig"
|
|
4
|
-
|
|
5
|
-
extension_name = "ts_pack_core_rb"
|
|
6
|
-
dlext = RbConfig::CONFIG.fetch("DLEXT")
|
|
7
|
-
ruby_abi = RbConfig::CONFIG.fetch("ruby_version")
|
|
8
|
-
|
|
9
|
-
base_dir = __dir__ || "."
|
|
10
|
-
candidates = [
|
|
11
|
-
File.expand_path("#{extension_name}/#{ruby_abi}/#{extension_name}.#{dlext}", base_dir),
|
|
12
|
-
File.expand_path("#{extension_name}.#{dlext}", base_dir)
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
native_extension = candidates.find { |path| File.file?(path) }
|
|
16
|
-
|
|
17
|
-
unless native_extension
|
|
18
|
-
raise(
|
|
19
|
-
LoadError,
|
|
20
|
-
"cannot find #{extension_name} native extension for Ruby ABI #{ruby_abi}; " \
|
|
21
|
-
"searched: #{candidates.join(", ")}"
|
|
22
|
-
)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
require native_extension
|