tree_sitter_language_pack 1.9.0.pre.rc.34 → 1.9.0.pre.rc.36
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/ext/ts_pack_core_rb/native/Cargo.lock +5 -5
- data/ext/ts_pack_core_rb/native/Cargo.toml +2 -2
- data/ext/ts_pack_core_rb/src/lib.rs +10 -22
- data/lib/tree_sitter_language_pack/native.rb +1 -897
- data/lib/tree_sitter_language_pack/version.rb +2 -2
- data/lib/tree_sitter_language_pack.rb +1 -1
- data/sig/types.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 194f6fb8e39e8b283d43d75183703c8dce5984b646cca24d78a92490f1f39f84
|
|
4
|
+
data.tar.gz: 579672a7dd337af267e437a94c35e28a183ba68ee9517340aa54f6a111df537d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b91c0c4ec94d5fdf1d4ce29f834ffe1f16084328fb0ac3db4875611701aa48898ebfee7f47fb0608c56042b8d3c63da4cb4c3e5cdc7838c4aa3ef5d09cbc9b76
|
|
7
|
+
data.tar.gz: 4128cb02dd5f500fc1c36ad9b621bb343e8f0f3bc4bddecaa1c17758c79dfa13a986887ef5f9cac55bb49834f5f00b36f95d125179424cd064d81c12be6dbe32
|
|
@@ -84,9 +84,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
|
|
84
84
|
|
|
85
85
|
[[package]]
|
|
86
86
|
name = "cc"
|
|
87
|
-
version = "1.2.
|
|
87
|
+
version = "1.2.64"
|
|
88
88
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
-
checksum = "
|
|
89
|
+
checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f"
|
|
90
90
|
dependencies = [
|
|
91
91
|
"find-msvc-tools",
|
|
92
92
|
"jobserver",
|
|
@@ -1070,9 +1070,9 @@ checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
|
|
|
1070
1070
|
|
|
1071
1071
|
[[package]]
|
|
1072
1072
|
name = "tree-sitter-language-pack"
|
|
1073
|
-
version = "1.9.0-rc.
|
|
1073
|
+
version = "1.9.0-rc.36"
|
|
1074
1074
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1075
|
-
checksum = "
|
|
1075
|
+
checksum = "e9c39fb283a15761c879db438f32b8b6d964912859a83413b0b4a7eb81db30a2"
|
|
1076
1076
|
dependencies = [
|
|
1077
1077
|
"ahash",
|
|
1078
1078
|
"cc",
|
|
@@ -1093,7 +1093,7 @@ dependencies = [
|
|
|
1093
1093
|
|
|
1094
1094
|
[[package]]
|
|
1095
1095
|
name = "ts-pack-core-rb"
|
|
1096
|
-
version = "1.9.0-rc.
|
|
1096
|
+
version = "1.9.0-rc.36"
|
|
1097
1097
|
dependencies = [
|
|
1098
1098
|
"magnus",
|
|
1099
1099
|
"rb-sys",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "ts-pack-core-rb"
|
|
3
|
-
version = "1.9.0-rc.
|
|
3
|
+
version = "1.9.0-rc.36"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
description = "Pre-compiled tree-sitter grammars for 306 programming languages"
|
|
@@ -21,4 +21,4 @@ magnus = "0.8"
|
|
|
21
21
|
rb-sys = ">=0.9, <0.9.128"
|
|
22
22
|
serde = { version = "1", features = ["derive"] }
|
|
23
23
|
serde_json = "1"
|
|
24
|
-
tree-sitter-language-pack = { version = "1.9.0-rc.
|
|
24
|
+
tree-sitter-language-pack = { version = "1.9.0-rc.36", features = ["serde", "config", "download"] }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:5c3eac2ef7892df9942263b2ef22bbce08c4729cfb235dcd7f37f968755d1b10
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -2183,7 +2183,6 @@ unsafe impl TryConvertOwned for Language {}
|
|
|
2183
2183
|
impl Language {}
|
|
2184
2184
|
|
|
2185
2185
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
2186
|
-
#[serde(tag = "kind")]
|
|
2187
2186
|
pub enum StructureKind {
|
|
2188
2187
|
Function,
|
|
2189
2188
|
Method,
|
|
@@ -2195,7 +2194,7 @@ pub enum StructureKind {
|
|
|
2195
2194
|
Trait,
|
|
2196
2195
|
Impl,
|
|
2197
2196
|
Namespace,
|
|
2198
|
-
Other {
|
|
2197
|
+
Other { _0: String },
|
|
2199
2198
|
}
|
|
2200
2199
|
|
|
2201
2200
|
impl Default for StructureKind {
|
|
@@ -2245,7 +2244,6 @@ impl magnus::TryConvert for StructureKind {
|
|
|
2245
2244
|
|
|
2246
2245
|
unsafe impl IntoValueFromNative for StructureKind {}
|
|
2247
2246
|
unsafe impl TryConvertOwned for StructureKind {}
|
|
2248
|
-
impl StructureKind {}
|
|
2249
2247
|
|
|
2250
2248
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
2251
2249
|
pub enum CommentKind {
|
|
@@ -2292,14 +2290,13 @@ unsafe impl IntoValueFromNative for CommentKind {}
|
|
|
2292
2290
|
unsafe impl TryConvertOwned for CommentKind {}
|
|
2293
2291
|
|
|
2294
2292
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
2295
|
-
#[serde(tag = "kind")]
|
|
2296
2293
|
pub enum DocstringFormat {
|
|
2297
2294
|
PythonTripleQuote,
|
|
2298
2295
|
JSDoc,
|
|
2299
2296
|
Rustdoc,
|
|
2300
2297
|
GoDoc,
|
|
2301
2298
|
JavaDoc,
|
|
2302
|
-
Other {
|
|
2299
|
+
Other { _0: String },
|
|
2303
2300
|
}
|
|
2304
2301
|
|
|
2305
2302
|
impl Default for DocstringFormat {
|
|
@@ -2349,7 +2346,6 @@ impl magnus::TryConvert for DocstringFormat {
|
|
|
2349
2346
|
|
|
2350
2347
|
unsafe impl IntoValueFromNative for DocstringFormat {}
|
|
2351
2348
|
unsafe impl TryConvertOwned for DocstringFormat {}
|
|
2352
|
-
impl DocstringFormat {}
|
|
2353
2349
|
|
|
2354
2350
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
2355
2351
|
pub enum ExportKind {
|
|
@@ -2396,7 +2392,6 @@ unsafe impl IntoValueFromNative for ExportKind {}
|
|
|
2396
2392
|
unsafe impl TryConvertOwned for ExportKind {}
|
|
2397
2393
|
|
|
2398
2394
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
2399
|
-
#[serde(tag = "kind")]
|
|
2400
2395
|
pub enum SymbolKind {
|
|
2401
2396
|
Variable,
|
|
2402
2397
|
Constant,
|
|
@@ -2406,7 +2401,7 @@ pub enum SymbolKind {
|
|
|
2406
2401
|
Interface,
|
|
2407
2402
|
Enum,
|
|
2408
2403
|
Module,
|
|
2409
|
-
Other {
|
|
2404
|
+
Other { _0: String },
|
|
2410
2405
|
}
|
|
2411
2406
|
|
|
2412
2407
|
impl Default for SymbolKind {
|
|
@@ -2456,7 +2451,6 @@ impl magnus::TryConvert for SymbolKind {
|
|
|
2456
2451
|
|
|
2457
2452
|
unsafe impl IntoValueFromNative for SymbolKind {}
|
|
2458
2453
|
unsafe impl TryConvertOwned for SymbolKind {}
|
|
2459
|
-
impl SymbolKind {}
|
|
2460
2454
|
|
|
2461
2455
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
|
|
2462
2456
|
pub enum DiagnosticSeverity {
|
|
@@ -3181,7 +3175,7 @@ impl From<StructureKind> for tree_sitter_language_pack::StructureKind {
|
|
|
3181
3175
|
StructureKind::Trait => Self::Trait,
|
|
3182
3176
|
StructureKind::Impl => Self::Impl,
|
|
3183
3177
|
StructureKind::Namespace => Self::Namespace,
|
|
3184
|
-
StructureKind::Other {
|
|
3178
|
+
StructureKind::Other { _0 } => Self::Other(_0),
|
|
3185
3179
|
}
|
|
3186
3180
|
}
|
|
3187
3181
|
}
|
|
@@ -3199,9 +3193,7 @@ impl From<tree_sitter_language_pack::StructureKind> for StructureKind {
|
|
|
3199
3193
|
tree_sitter_language_pack::StructureKind::Trait => Self::Trait,
|
|
3200
3194
|
tree_sitter_language_pack::StructureKind::Impl => Self::Impl,
|
|
3201
3195
|
tree_sitter_language_pack::StructureKind::Namespace => Self::Namespace,
|
|
3202
|
-
tree_sitter_language_pack::StructureKind::Other
|
|
3203
|
-
value: value.to_string(),
|
|
3204
|
-
},
|
|
3196
|
+
tree_sitter_language_pack::StructureKind::Other(_0) => Self::Other { _0: _0.to_string() },
|
|
3205
3197
|
}
|
|
3206
3198
|
}
|
|
3207
3199
|
}
|
|
@@ -3234,7 +3226,7 @@ impl From<DocstringFormat> for tree_sitter_language_pack::DocstringFormat {
|
|
|
3234
3226
|
DocstringFormat::Rustdoc => Self::Rustdoc,
|
|
3235
3227
|
DocstringFormat::GoDoc => Self::GoDoc,
|
|
3236
3228
|
DocstringFormat::JavaDoc => Self::JavaDoc,
|
|
3237
|
-
DocstringFormat::Other {
|
|
3229
|
+
DocstringFormat::Other { _0 } => Self::Other(_0),
|
|
3238
3230
|
}
|
|
3239
3231
|
}
|
|
3240
3232
|
}
|
|
@@ -3247,9 +3239,7 @@ impl From<tree_sitter_language_pack::DocstringFormat> for DocstringFormat {
|
|
|
3247
3239
|
tree_sitter_language_pack::DocstringFormat::Rustdoc => Self::Rustdoc,
|
|
3248
3240
|
tree_sitter_language_pack::DocstringFormat::GoDoc => Self::GoDoc,
|
|
3249
3241
|
tree_sitter_language_pack::DocstringFormat::JavaDoc => Self::JavaDoc,
|
|
3250
|
-
tree_sitter_language_pack::DocstringFormat::Other
|
|
3251
|
-
value: value.to_string(),
|
|
3252
|
-
},
|
|
3242
|
+
tree_sitter_language_pack::DocstringFormat::Other(_0) => Self::Other { _0: _0.to_string() },
|
|
3253
3243
|
}
|
|
3254
3244
|
}
|
|
3255
3245
|
}
|
|
@@ -3285,7 +3275,7 @@ impl From<SymbolKind> for tree_sitter_language_pack::SymbolKind {
|
|
|
3285
3275
|
SymbolKind::Interface => Self::Interface,
|
|
3286
3276
|
SymbolKind::Enum => Self::Enum,
|
|
3287
3277
|
SymbolKind::Module => Self::Module,
|
|
3288
|
-
SymbolKind::Other {
|
|
3278
|
+
SymbolKind::Other { _0 } => Self::Other(_0),
|
|
3289
3279
|
}
|
|
3290
3280
|
}
|
|
3291
3281
|
}
|
|
@@ -3301,9 +3291,7 @@ impl From<tree_sitter_language_pack::SymbolKind> for SymbolKind {
|
|
|
3301
3291
|
tree_sitter_language_pack::SymbolKind::Interface => Self::Interface,
|
|
3302
3292
|
tree_sitter_language_pack::SymbolKind::Enum => Self::Enum,
|
|
3303
3293
|
tree_sitter_language_pack::SymbolKind::Module => Self::Module,
|
|
3304
|
-
tree_sitter_language_pack::SymbolKind::Other
|
|
3305
|
-
value: value.to_string(),
|
|
3306
|
-
},
|
|
3294
|
+
tree_sitter_language_pack::SymbolKind::Other(_0) => Self::Other { _0: _0.to_string() },
|
|
3307
3295
|
}
|
|
3308
3296
|
}
|
|
3309
3297
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:5c3eac2ef7892df9942263b2ef22bbce08c4729cfb235dcd7f37f968755d1b10
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -7,899 +7,3 @@
|
|
|
7
7
|
require "json"
|
|
8
8
|
require "sorbet-runtime"
|
|
9
9
|
require "ts_pack_core_rb"
|
|
10
|
-
module TreeSitterLanguagePack
|
|
11
|
-
# The kind of structural item found in source code.
|
|
12
|
-
#
|
|
13
|
-
# Categorizes top-level and nested declarations such as functions, classes,
|
|
14
|
-
# structs, enums, traits, and more. Use [`Other`](StructureKind::Other) for
|
|
15
|
-
# language-specific constructs that do not fit a standard category.
|
|
16
|
-
module StructureKind
|
|
17
|
-
extend T::Helpers
|
|
18
|
-
extend T::Sig
|
|
19
|
-
|
|
20
|
-
interface!
|
|
21
|
-
|
|
22
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
23
|
-
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
24
|
-
# @return [variant_class] an instance of the appropriate variant
|
|
25
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
26
|
-
def self.from_hash(hash)
|
|
27
|
-
discriminator = hash[:kind] || hash["kind"]
|
|
28
|
-
case discriminator
|
|
29
|
-
when "function" then StructureKindFunction.from_hash(hash)
|
|
30
|
-
when "method" then StructureKindMethod.from_hash(hash)
|
|
31
|
-
when "class" then StructureKindClass.from_hash(hash)
|
|
32
|
-
when "struct" then StructureKindStruct.from_hash(hash)
|
|
33
|
-
when "interface" then StructureKindInterface.from_hash(hash)
|
|
34
|
-
when "enum" then StructureKindEnum.from_hash(hash)
|
|
35
|
-
when "module" then StructureKindModule.from_hash(hash)
|
|
36
|
-
when "trait" then StructureKindTrait.from_hash(hash)
|
|
37
|
-
when "impl" then StructureKindImpl.from_hash(hash)
|
|
38
|
-
when "namespace" then StructureKindNamespace.from_hash(hash)
|
|
39
|
-
when "other" then StructureKindOther.from_hash(hash)
|
|
40
|
-
else raise "Unknown discriminator: #{discriminator}"
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
## A free-standing or associated function.
|
|
45
|
-
StructureKindFunction = Data.define do
|
|
46
|
-
include StructureKind
|
|
47
|
-
extend T::Sig
|
|
48
|
-
|
|
49
|
-
sig { returns(T::Boolean) }
|
|
50
|
-
def function? = true
|
|
51
|
-
sig { returns(T::Boolean) }
|
|
52
|
-
def method? = false
|
|
53
|
-
sig { returns(T::Boolean) }
|
|
54
|
-
def class? = false
|
|
55
|
-
sig { returns(T::Boolean) }
|
|
56
|
-
def struct? = false
|
|
57
|
-
sig { returns(T::Boolean) }
|
|
58
|
-
def interface? = false
|
|
59
|
-
sig { returns(T::Boolean) }
|
|
60
|
-
def enum? = false
|
|
61
|
-
sig { returns(T::Boolean) }
|
|
62
|
-
def module? = false
|
|
63
|
-
sig { returns(T::Boolean) }
|
|
64
|
-
def trait? = false
|
|
65
|
-
sig { returns(T::Boolean) }
|
|
66
|
-
def impl? = false
|
|
67
|
-
sig { returns(T::Boolean) }
|
|
68
|
-
def namespace? = false
|
|
69
|
-
sig { returns(T::Boolean) }
|
|
70
|
-
def other? = false
|
|
71
|
-
# @param hash [Hash] deserialized from the native extension
|
|
72
|
-
# @return [self]
|
|
73
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
74
|
-
def self.from_hash(hash)
|
|
75
|
-
new
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
## A method defined inside a class, struct, trait, or impl block.
|
|
79
|
-
StructureKindMethod = Data.define do
|
|
80
|
-
include StructureKind
|
|
81
|
-
extend T::Sig
|
|
82
|
-
|
|
83
|
-
sig { returns(T::Boolean) }
|
|
84
|
-
def function? = false
|
|
85
|
-
sig { returns(T::Boolean) }
|
|
86
|
-
def method? = true
|
|
87
|
-
sig { returns(T::Boolean) }
|
|
88
|
-
def class? = false
|
|
89
|
-
sig { returns(T::Boolean) }
|
|
90
|
-
def struct? = false
|
|
91
|
-
sig { returns(T::Boolean) }
|
|
92
|
-
def interface? = false
|
|
93
|
-
sig { returns(T::Boolean) }
|
|
94
|
-
def enum? = false
|
|
95
|
-
sig { returns(T::Boolean) }
|
|
96
|
-
def module? = false
|
|
97
|
-
sig { returns(T::Boolean) }
|
|
98
|
-
def trait? = false
|
|
99
|
-
sig { returns(T::Boolean) }
|
|
100
|
-
def impl? = false
|
|
101
|
-
sig { returns(T::Boolean) }
|
|
102
|
-
def namespace? = false
|
|
103
|
-
sig { returns(T::Boolean) }
|
|
104
|
-
def other? = false
|
|
105
|
-
# @param hash [Hash] deserialized from the native extension
|
|
106
|
-
# @return [self]
|
|
107
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
108
|
-
def self.from_hash(hash)
|
|
109
|
-
new
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
## A class definition.
|
|
113
|
-
StructureKindClass = Data.define do
|
|
114
|
-
include StructureKind
|
|
115
|
-
extend T::Sig
|
|
116
|
-
|
|
117
|
-
sig { returns(T::Boolean) }
|
|
118
|
-
def function? = false
|
|
119
|
-
sig { returns(T::Boolean) }
|
|
120
|
-
def method? = false
|
|
121
|
-
sig { returns(T::Boolean) }
|
|
122
|
-
def class? = true
|
|
123
|
-
sig { returns(T::Boolean) }
|
|
124
|
-
def struct? = false
|
|
125
|
-
sig { returns(T::Boolean) }
|
|
126
|
-
def interface? = false
|
|
127
|
-
sig { returns(T::Boolean) }
|
|
128
|
-
def enum? = false
|
|
129
|
-
sig { returns(T::Boolean) }
|
|
130
|
-
def module? = false
|
|
131
|
-
sig { returns(T::Boolean) }
|
|
132
|
-
def trait? = false
|
|
133
|
-
sig { returns(T::Boolean) }
|
|
134
|
-
def impl? = false
|
|
135
|
-
sig { returns(T::Boolean) }
|
|
136
|
-
def namespace? = false
|
|
137
|
-
sig { returns(T::Boolean) }
|
|
138
|
-
def other? = false
|
|
139
|
-
# @param hash [Hash] deserialized from the native extension
|
|
140
|
-
# @return [self]
|
|
141
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
142
|
-
def self.from_hash(hash)
|
|
143
|
-
new
|
|
144
|
-
end
|
|
145
|
-
end
|
|
146
|
-
## A struct definition.
|
|
147
|
-
StructureKindStruct = Data.define do
|
|
148
|
-
include StructureKind
|
|
149
|
-
extend T::Sig
|
|
150
|
-
|
|
151
|
-
sig { returns(T::Boolean) }
|
|
152
|
-
def function? = false
|
|
153
|
-
sig { returns(T::Boolean) }
|
|
154
|
-
def method? = false
|
|
155
|
-
sig { returns(T::Boolean) }
|
|
156
|
-
def class? = false
|
|
157
|
-
sig { returns(T::Boolean) }
|
|
158
|
-
def struct? = true
|
|
159
|
-
sig { returns(T::Boolean) }
|
|
160
|
-
def interface? = false
|
|
161
|
-
sig { returns(T::Boolean) }
|
|
162
|
-
def enum? = false
|
|
163
|
-
sig { returns(T::Boolean) }
|
|
164
|
-
def module? = false
|
|
165
|
-
sig { returns(T::Boolean) }
|
|
166
|
-
def trait? = false
|
|
167
|
-
sig { returns(T::Boolean) }
|
|
168
|
-
def impl? = false
|
|
169
|
-
sig { returns(T::Boolean) }
|
|
170
|
-
def namespace? = false
|
|
171
|
-
sig { returns(T::Boolean) }
|
|
172
|
-
def other? = false
|
|
173
|
-
# @param hash [Hash] deserialized from the native extension
|
|
174
|
-
# @return [self]
|
|
175
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
176
|
-
def self.from_hash(hash)
|
|
177
|
-
new
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
## An interface or protocol definition.
|
|
181
|
-
StructureKindInterface = Data.define do
|
|
182
|
-
include StructureKind
|
|
183
|
-
extend T::Sig
|
|
184
|
-
|
|
185
|
-
sig { returns(T::Boolean) }
|
|
186
|
-
def function? = false
|
|
187
|
-
sig { returns(T::Boolean) }
|
|
188
|
-
def method? = false
|
|
189
|
-
sig { returns(T::Boolean) }
|
|
190
|
-
def class? = false
|
|
191
|
-
sig { returns(T::Boolean) }
|
|
192
|
-
def struct? = false
|
|
193
|
-
sig { returns(T::Boolean) }
|
|
194
|
-
def interface? = true
|
|
195
|
-
sig { returns(T::Boolean) }
|
|
196
|
-
def enum? = false
|
|
197
|
-
sig { returns(T::Boolean) }
|
|
198
|
-
def module? = false
|
|
199
|
-
sig { returns(T::Boolean) }
|
|
200
|
-
def trait? = false
|
|
201
|
-
sig { returns(T::Boolean) }
|
|
202
|
-
def impl? = false
|
|
203
|
-
sig { returns(T::Boolean) }
|
|
204
|
-
def namespace? = false
|
|
205
|
-
sig { returns(T::Boolean) }
|
|
206
|
-
def other? = false
|
|
207
|
-
# @param hash [Hash] deserialized from the native extension
|
|
208
|
-
# @return [self]
|
|
209
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
210
|
-
def self.from_hash(hash)
|
|
211
|
-
new
|
|
212
|
-
end
|
|
213
|
-
end
|
|
214
|
-
## An enum definition.
|
|
215
|
-
StructureKindEnum = Data.define do
|
|
216
|
-
include StructureKind
|
|
217
|
-
extend T::Sig
|
|
218
|
-
|
|
219
|
-
sig { returns(T::Boolean) }
|
|
220
|
-
def function? = false
|
|
221
|
-
sig { returns(T::Boolean) }
|
|
222
|
-
def method? = false
|
|
223
|
-
sig { returns(T::Boolean) }
|
|
224
|
-
def class? = false
|
|
225
|
-
sig { returns(T::Boolean) }
|
|
226
|
-
def struct? = false
|
|
227
|
-
sig { returns(T::Boolean) }
|
|
228
|
-
def interface? = false
|
|
229
|
-
sig { returns(T::Boolean) }
|
|
230
|
-
def enum? = true
|
|
231
|
-
sig { returns(T::Boolean) }
|
|
232
|
-
def module? = false
|
|
233
|
-
sig { returns(T::Boolean) }
|
|
234
|
-
def trait? = false
|
|
235
|
-
sig { returns(T::Boolean) }
|
|
236
|
-
def impl? = false
|
|
237
|
-
sig { returns(T::Boolean) }
|
|
238
|
-
def namespace? = false
|
|
239
|
-
sig { returns(T::Boolean) }
|
|
240
|
-
def other? = false
|
|
241
|
-
# @param hash [Hash] deserialized from the native extension
|
|
242
|
-
# @return [self]
|
|
243
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
244
|
-
def self.from_hash(hash)
|
|
245
|
-
new
|
|
246
|
-
end
|
|
247
|
-
end
|
|
248
|
-
## A module or package declaration.
|
|
249
|
-
StructureKindModule = Data.define do
|
|
250
|
-
include StructureKind
|
|
251
|
-
extend T::Sig
|
|
252
|
-
|
|
253
|
-
sig { returns(T::Boolean) }
|
|
254
|
-
def function? = false
|
|
255
|
-
sig { returns(T::Boolean) }
|
|
256
|
-
def method? = false
|
|
257
|
-
sig { returns(T::Boolean) }
|
|
258
|
-
def class? = false
|
|
259
|
-
sig { returns(T::Boolean) }
|
|
260
|
-
def struct? = false
|
|
261
|
-
sig { returns(T::Boolean) }
|
|
262
|
-
def interface? = false
|
|
263
|
-
sig { returns(T::Boolean) }
|
|
264
|
-
def enum? = false
|
|
265
|
-
sig { returns(T::Boolean) }
|
|
266
|
-
def module? = true
|
|
267
|
-
sig { returns(T::Boolean) }
|
|
268
|
-
def trait? = false
|
|
269
|
-
sig { returns(T::Boolean) }
|
|
270
|
-
def impl? = false
|
|
271
|
-
sig { returns(T::Boolean) }
|
|
272
|
-
def namespace? = false
|
|
273
|
-
sig { returns(T::Boolean) }
|
|
274
|
-
def other? = false
|
|
275
|
-
# @param hash [Hash] deserialized from the native extension
|
|
276
|
-
# @return [self]
|
|
277
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
278
|
-
def self.from_hash(hash)
|
|
279
|
-
new
|
|
280
|
-
end
|
|
281
|
-
end
|
|
282
|
-
## A trait definition.
|
|
283
|
-
StructureKindTrait = Data.define do
|
|
284
|
-
include StructureKind
|
|
285
|
-
extend T::Sig
|
|
286
|
-
|
|
287
|
-
sig { returns(T::Boolean) }
|
|
288
|
-
def function? = false
|
|
289
|
-
sig { returns(T::Boolean) }
|
|
290
|
-
def method? = false
|
|
291
|
-
sig { returns(T::Boolean) }
|
|
292
|
-
def class? = false
|
|
293
|
-
sig { returns(T::Boolean) }
|
|
294
|
-
def struct? = false
|
|
295
|
-
sig { returns(T::Boolean) }
|
|
296
|
-
def interface? = false
|
|
297
|
-
sig { returns(T::Boolean) }
|
|
298
|
-
def enum? = false
|
|
299
|
-
sig { returns(T::Boolean) }
|
|
300
|
-
def module? = false
|
|
301
|
-
sig { returns(T::Boolean) }
|
|
302
|
-
def trait? = true
|
|
303
|
-
sig { returns(T::Boolean) }
|
|
304
|
-
def impl? = false
|
|
305
|
-
sig { returns(T::Boolean) }
|
|
306
|
-
def namespace? = false
|
|
307
|
-
sig { returns(T::Boolean) }
|
|
308
|
-
def other? = false
|
|
309
|
-
# @param hash [Hash] deserialized from the native extension
|
|
310
|
-
# @return [self]
|
|
311
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
312
|
-
def self.from_hash(hash)
|
|
313
|
-
new
|
|
314
|
-
end
|
|
315
|
-
end
|
|
316
|
-
## An impl block (Rust) or similar implementation block.
|
|
317
|
-
StructureKindImpl = Data.define do
|
|
318
|
-
include StructureKind
|
|
319
|
-
extend T::Sig
|
|
320
|
-
|
|
321
|
-
sig { returns(T::Boolean) }
|
|
322
|
-
def function? = false
|
|
323
|
-
sig { returns(T::Boolean) }
|
|
324
|
-
def method? = false
|
|
325
|
-
sig { returns(T::Boolean) }
|
|
326
|
-
def class? = false
|
|
327
|
-
sig { returns(T::Boolean) }
|
|
328
|
-
def struct? = false
|
|
329
|
-
sig { returns(T::Boolean) }
|
|
330
|
-
def interface? = false
|
|
331
|
-
sig { returns(T::Boolean) }
|
|
332
|
-
def enum? = false
|
|
333
|
-
sig { returns(T::Boolean) }
|
|
334
|
-
def module? = false
|
|
335
|
-
sig { returns(T::Boolean) }
|
|
336
|
-
def trait? = false
|
|
337
|
-
sig { returns(T::Boolean) }
|
|
338
|
-
def impl? = true
|
|
339
|
-
sig { returns(T::Boolean) }
|
|
340
|
-
def namespace? = false
|
|
341
|
-
sig { returns(T::Boolean) }
|
|
342
|
-
def other? = false
|
|
343
|
-
# @param hash [Hash] deserialized from the native extension
|
|
344
|
-
# @return [self]
|
|
345
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
346
|
-
def self.from_hash(hash)
|
|
347
|
-
new
|
|
348
|
-
end
|
|
349
|
-
end
|
|
350
|
-
## A namespace declaration.
|
|
351
|
-
StructureKindNamespace = Data.define do
|
|
352
|
-
include StructureKind
|
|
353
|
-
extend T::Sig
|
|
354
|
-
|
|
355
|
-
sig { returns(T::Boolean) }
|
|
356
|
-
def function? = false
|
|
357
|
-
sig { returns(T::Boolean) }
|
|
358
|
-
def method? = false
|
|
359
|
-
sig { returns(T::Boolean) }
|
|
360
|
-
def class? = false
|
|
361
|
-
sig { returns(T::Boolean) }
|
|
362
|
-
def struct? = false
|
|
363
|
-
sig { returns(T::Boolean) }
|
|
364
|
-
def interface? = false
|
|
365
|
-
sig { returns(T::Boolean) }
|
|
366
|
-
def enum? = false
|
|
367
|
-
sig { returns(T::Boolean) }
|
|
368
|
-
def module? = false
|
|
369
|
-
sig { returns(T::Boolean) }
|
|
370
|
-
def trait? = false
|
|
371
|
-
sig { returns(T::Boolean) }
|
|
372
|
-
def impl? = false
|
|
373
|
-
sig { returns(T::Boolean) }
|
|
374
|
-
def namespace? = true
|
|
375
|
-
sig { returns(T::Boolean) }
|
|
376
|
-
def other? = false
|
|
377
|
-
# @param hash [Hash] deserialized from the native extension
|
|
378
|
-
# @return [self]
|
|
379
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
380
|
-
def self.from_hash(hash)
|
|
381
|
-
new
|
|
382
|
-
end
|
|
383
|
-
end
|
|
384
|
-
## A language-specific construct that does not fit any standard category.
|
|
385
|
-
## The `value` field carries the language-specific kind label.
|
|
386
|
-
StructureKindOther = Data.define(:value) do
|
|
387
|
-
include StructureKind
|
|
388
|
-
extend T::Sig
|
|
389
|
-
|
|
390
|
-
# The language-specific kind name (e.g. `"macro"`, `"fixture"`).
|
|
391
|
-
sig { returns(String) }
|
|
392
|
-
def value = super # rubocop:disable Lint/UselessMethodDefinition
|
|
393
|
-
sig { returns(T::Boolean) }
|
|
394
|
-
def function? = false
|
|
395
|
-
sig { returns(T::Boolean) }
|
|
396
|
-
def method? = false
|
|
397
|
-
sig { returns(T::Boolean) }
|
|
398
|
-
def class? = false
|
|
399
|
-
sig { returns(T::Boolean) }
|
|
400
|
-
def struct? = false
|
|
401
|
-
sig { returns(T::Boolean) }
|
|
402
|
-
def interface? = false
|
|
403
|
-
sig { returns(T::Boolean) }
|
|
404
|
-
def enum? = false
|
|
405
|
-
sig { returns(T::Boolean) }
|
|
406
|
-
def module? = false
|
|
407
|
-
sig { returns(T::Boolean) }
|
|
408
|
-
def trait? = false
|
|
409
|
-
sig { returns(T::Boolean) }
|
|
410
|
-
def impl? = false
|
|
411
|
-
sig { returns(T::Boolean) }
|
|
412
|
-
def namespace? = false
|
|
413
|
-
sig { returns(T::Boolean) }
|
|
414
|
-
def other? = true
|
|
415
|
-
# @param hash [Hash] deserialized from the native extension
|
|
416
|
-
# @return [self]
|
|
417
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
418
|
-
def self.from_hash(hash)
|
|
419
|
-
new(value: hash[:value] || hash["value"])
|
|
420
|
-
end
|
|
421
|
-
end
|
|
422
|
-
end
|
|
423
|
-
|
|
424
|
-
module TreeSitterLanguagePack
|
|
425
|
-
# The format of a docstring extracted from source code.
|
|
426
|
-
#
|
|
427
|
-
# Identifies the docstring convention used, which varies by language
|
|
428
|
-
# (e.g., Python triple-quoted strings, JSDoc, Rustdoc `///` comments).
|
|
429
|
-
module DocstringFormat
|
|
430
|
-
extend T::Helpers
|
|
431
|
-
extend T::Sig
|
|
432
|
-
|
|
433
|
-
interface!
|
|
434
|
-
|
|
435
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
436
|
-
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
437
|
-
# @return [variant_class] an instance of the appropriate variant
|
|
438
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
439
|
-
def self.from_hash(hash)
|
|
440
|
-
discriminator = hash[:kind] || hash["kind"]
|
|
441
|
-
case discriminator
|
|
442
|
-
when "python_triple_quote" then DocstringFormatPythonTripleQuote.from_hash(hash)
|
|
443
|
-
when "js_doc" then DocstringFormatJSDoc.from_hash(hash)
|
|
444
|
-
when "rustdoc" then DocstringFormatRustdoc.from_hash(hash)
|
|
445
|
-
when "go_doc" then DocstringFormatGoDoc.from_hash(hash)
|
|
446
|
-
when "java_doc" then DocstringFormatJavaDoc.from_hash(hash)
|
|
447
|
-
when "other" then DocstringFormatOther.from_hash(hash)
|
|
448
|
-
else raise "Unknown discriminator: #{discriminator}"
|
|
449
|
-
end
|
|
450
|
-
end
|
|
451
|
-
end
|
|
452
|
-
## Python triple-quoted string docstring (`"""..."""`).
|
|
453
|
-
DocstringFormatPythonTripleQuote = Data.define do
|
|
454
|
-
include DocstringFormat
|
|
455
|
-
extend T::Sig
|
|
456
|
-
|
|
457
|
-
sig { returns(T::Boolean) }
|
|
458
|
-
def python_triple_quote? = true
|
|
459
|
-
sig { returns(T::Boolean) }
|
|
460
|
-
def js_doc? = false
|
|
461
|
-
sig { returns(T::Boolean) }
|
|
462
|
-
def rustdoc? = false
|
|
463
|
-
sig { returns(T::Boolean) }
|
|
464
|
-
def go_doc? = false
|
|
465
|
-
sig { returns(T::Boolean) }
|
|
466
|
-
def java_doc? = false
|
|
467
|
-
sig { returns(T::Boolean) }
|
|
468
|
-
def other? = false
|
|
469
|
-
# @param hash [Hash] deserialized from the native extension
|
|
470
|
-
# @return [self]
|
|
471
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
472
|
-
def self.from_hash(hash)
|
|
473
|
-
new
|
|
474
|
-
end
|
|
475
|
-
end
|
|
476
|
-
## JavaScript/TypeScript JSDoc comment (`/** ... */`).
|
|
477
|
-
DocstringFormatJSDoc = Data.define do
|
|
478
|
-
include DocstringFormat
|
|
479
|
-
extend T::Sig
|
|
480
|
-
|
|
481
|
-
sig { returns(T::Boolean) }
|
|
482
|
-
def python_triple_quote? = false
|
|
483
|
-
sig { returns(T::Boolean) }
|
|
484
|
-
def js_doc? = true
|
|
485
|
-
sig { returns(T::Boolean) }
|
|
486
|
-
def rustdoc? = false
|
|
487
|
-
sig { returns(T::Boolean) }
|
|
488
|
-
def go_doc? = false
|
|
489
|
-
sig { returns(T::Boolean) }
|
|
490
|
-
def java_doc? = false
|
|
491
|
-
sig { returns(T::Boolean) }
|
|
492
|
-
def other? = false
|
|
493
|
-
# @param hash [Hash] deserialized from the native extension
|
|
494
|
-
# @return [self]
|
|
495
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
496
|
-
def self.from_hash(hash)
|
|
497
|
-
new
|
|
498
|
-
end
|
|
499
|
-
end
|
|
500
|
-
## Rust `///` or `//!` doc comment.
|
|
501
|
-
DocstringFormatRustdoc = Data.define do
|
|
502
|
-
include DocstringFormat
|
|
503
|
-
extend T::Sig
|
|
504
|
-
|
|
505
|
-
sig { returns(T::Boolean) }
|
|
506
|
-
def python_triple_quote? = false
|
|
507
|
-
sig { returns(T::Boolean) }
|
|
508
|
-
def js_doc? = false
|
|
509
|
-
sig { returns(T::Boolean) }
|
|
510
|
-
def rustdoc? = true
|
|
511
|
-
sig { returns(T::Boolean) }
|
|
512
|
-
def go_doc? = false
|
|
513
|
-
sig { returns(T::Boolean) }
|
|
514
|
-
def java_doc? = false
|
|
515
|
-
sig { returns(T::Boolean) }
|
|
516
|
-
def other? = false
|
|
517
|
-
# @param hash [Hash] deserialized from the native extension
|
|
518
|
-
# @return [self]
|
|
519
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
520
|
-
def self.from_hash(hash)
|
|
521
|
-
new
|
|
522
|
-
end
|
|
523
|
-
end
|
|
524
|
-
## Go doc comment (a comment block immediately preceding a declaration).
|
|
525
|
-
DocstringFormatGoDoc = Data.define do
|
|
526
|
-
include DocstringFormat
|
|
527
|
-
extend T::Sig
|
|
528
|
-
|
|
529
|
-
sig { returns(T::Boolean) }
|
|
530
|
-
def python_triple_quote? = false
|
|
531
|
-
sig { returns(T::Boolean) }
|
|
532
|
-
def js_doc? = false
|
|
533
|
-
sig { returns(T::Boolean) }
|
|
534
|
-
def rustdoc? = false
|
|
535
|
-
sig { returns(T::Boolean) }
|
|
536
|
-
def go_doc? = true
|
|
537
|
-
sig { returns(T::Boolean) }
|
|
538
|
-
def java_doc? = false
|
|
539
|
-
sig { returns(T::Boolean) }
|
|
540
|
-
def other? = false
|
|
541
|
-
# @param hash [Hash] deserialized from the native extension
|
|
542
|
-
# @return [self]
|
|
543
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
544
|
-
def self.from_hash(hash)
|
|
545
|
-
new
|
|
546
|
-
end
|
|
547
|
-
end
|
|
548
|
-
## Java Javadoc comment (`/** ... */`).
|
|
549
|
-
DocstringFormatJavaDoc = Data.define do
|
|
550
|
-
include DocstringFormat
|
|
551
|
-
extend T::Sig
|
|
552
|
-
|
|
553
|
-
sig { returns(T::Boolean) }
|
|
554
|
-
def python_triple_quote? = false
|
|
555
|
-
sig { returns(T::Boolean) }
|
|
556
|
-
def js_doc? = false
|
|
557
|
-
sig { returns(T::Boolean) }
|
|
558
|
-
def rustdoc? = false
|
|
559
|
-
sig { returns(T::Boolean) }
|
|
560
|
-
def go_doc? = false
|
|
561
|
-
sig { returns(T::Boolean) }
|
|
562
|
-
def java_doc? = true
|
|
563
|
-
sig { returns(T::Boolean) }
|
|
564
|
-
def other? = false
|
|
565
|
-
# @param hash [Hash] deserialized from the native extension
|
|
566
|
-
# @return [self]
|
|
567
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
568
|
-
def self.from_hash(hash)
|
|
569
|
-
new
|
|
570
|
-
end
|
|
571
|
-
end
|
|
572
|
-
## A language-specific docstring format not covered by the standard variants.
|
|
573
|
-
DocstringFormatOther = Data.define(:value) do
|
|
574
|
-
include DocstringFormat
|
|
575
|
-
extend T::Sig
|
|
576
|
-
|
|
577
|
-
# The format name not covered by standard variants.
|
|
578
|
-
sig { returns(String) }
|
|
579
|
-
def value = super # rubocop:disable Lint/UselessMethodDefinition
|
|
580
|
-
sig { returns(T::Boolean) }
|
|
581
|
-
def python_triple_quote? = false
|
|
582
|
-
sig { returns(T::Boolean) }
|
|
583
|
-
def js_doc? = false
|
|
584
|
-
sig { returns(T::Boolean) }
|
|
585
|
-
def rustdoc? = false
|
|
586
|
-
sig { returns(T::Boolean) }
|
|
587
|
-
def go_doc? = false
|
|
588
|
-
sig { returns(T::Boolean) }
|
|
589
|
-
def java_doc? = false
|
|
590
|
-
sig { returns(T::Boolean) }
|
|
591
|
-
def other? = true
|
|
592
|
-
# @param hash [Hash] deserialized from the native extension
|
|
593
|
-
# @return [self]
|
|
594
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
595
|
-
def self.from_hash(hash)
|
|
596
|
-
new(value: hash[:value] || hash["value"])
|
|
597
|
-
end
|
|
598
|
-
end
|
|
599
|
-
end
|
|
600
|
-
|
|
601
|
-
module TreeSitterLanguagePack
|
|
602
|
-
# The kind of a symbol definition found in source code.
|
|
603
|
-
#
|
|
604
|
-
# Categorizes symbol definitions such as variables, constants, functions,
|
|
605
|
-
# classes, types, interfaces, enums, and modules.
|
|
606
|
-
module SymbolKind
|
|
607
|
-
extend T::Helpers
|
|
608
|
-
extend T::Sig
|
|
609
|
-
|
|
610
|
-
interface!
|
|
611
|
-
|
|
612
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
613
|
-
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
614
|
-
# @return [variant_class] an instance of the appropriate variant
|
|
615
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
616
|
-
def self.from_hash(hash)
|
|
617
|
-
discriminator = hash[:kind] || hash["kind"]
|
|
618
|
-
case discriminator
|
|
619
|
-
when "variable" then SymbolKindVariable.from_hash(hash)
|
|
620
|
-
when "constant" then SymbolKindConstant.from_hash(hash)
|
|
621
|
-
when "function" then SymbolKindFunction.from_hash(hash)
|
|
622
|
-
when "class" then SymbolKindClass.from_hash(hash)
|
|
623
|
-
when "type" then SymbolKindType.from_hash(hash)
|
|
624
|
-
when "interface" then SymbolKindInterface.from_hash(hash)
|
|
625
|
-
when "enum" then SymbolKindEnum.from_hash(hash)
|
|
626
|
-
when "module" then SymbolKindModule.from_hash(hash)
|
|
627
|
-
when "other" then SymbolKindOther.from_hash(hash)
|
|
628
|
-
else raise "Unknown discriminator: #{discriminator}"
|
|
629
|
-
end
|
|
630
|
-
end
|
|
631
|
-
end
|
|
632
|
-
## A variable binding.
|
|
633
|
-
SymbolKindVariable = Data.define do
|
|
634
|
-
include SymbolKind
|
|
635
|
-
extend T::Sig
|
|
636
|
-
|
|
637
|
-
sig { returns(T::Boolean) }
|
|
638
|
-
def variable? = true
|
|
639
|
-
sig { returns(T::Boolean) }
|
|
640
|
-
def constant? = false
|
|
641
|
-
sig { returns(T::Boolean) }
|
|
642
|
-
def function? = false
|
|
643
|
-
sig { returns(T::Boolean) }
|
|
644
|
-
def class? = false
|
|
645
|
-
sig { returns(T::Boolean) }
|
|
646
|
-
def type? = false
|
|
647
|
-
sig { returns(T::Boolean) }
|
|
648
|
-
def interface? = false
|
|
649
|
-
sig { returns(T::Boolean) }
|
|
650
|
-
def enum? = false
|
|
651
|
-
sig { returns(T::Boolean) }
|
|
652
|
-
def module? = false
|
|
653
|
-
sig { returns(T::Boolean) }
|
|
654
|
-
def other? = false
|
|
655
|
-
# @param hash [Hash] deserialized from the native extension
|
|
656
|
-
# @return [self]
|
|
657
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
658
|
-
def self.from_hash(hash)
|
|
659
|
-
new
|
|
660
|
-
end
|
|
661
|
-
end
|
|
662
|
-
## A constant (immutable binding).
|
|
663
|
-
SymbolKindConstant = Data.define do
|
|
664
|
-
include SymbolKind
|
|
665
|
-
extend T::Sig
|
|
666
|
-
|
|
667
|
-
sig { returns(T::Boolean) }
|
|
668
|
-
def variable? = false
|
|
669
|
-
sig { returns(T::Boolean) }
|
|
670
|
-
def constant? = true
|
|
671
|
-
sig { returns(T::Boolean) }
|
|
672
|
-
def function? = false
|
|
673
|
-
sig { returns(T::Boolean) }
|
|
674
|
-
def class? = false
|
|
675
|
-
sig { returns(T::Boolean) }
|
|
676
|
-
def type? = false
|
|
677
|
-
sig { returns(T::Boolean) }
|
|
678
|
-
def interface? = false
|
|
679
|
-
sig { returns(T::Boolean) }
|
|
680
|
-
def enum? = false
|
|
681
|
-
sig { returns(T::Boolean) }
|
|
682
|
-
def module? = false
|
|
683
|
-
sig { returns(T::Boolean) }
|
|
684
|
-
def other? = false
|
|
685
|
-
# @param hash [Hash] deserialized from the native extension
|
|
686
|
-
# @return [self]
|
|
687
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
688
|
-
def self.from_hash(hash)
|
|
689
|
-
new
|
|
690
|
-
end
|
|
691
|
-
end
|
|
692
|
-
## A function definition.
|
|
693
|
-
SymbolKindFunction = Data.define do
|
|
694
|
-
include SymbolKind
|
|
695
|
-
extend T::Sig
|
|
696
|
-
|
|
697
|
-
sig { returns(T::Boolean) }
|
|
698
|
-
def variable? = false
|
|
699
|
-
sig { returns(T::Boolean) }
|
|
700
|
-
def constant? = false
|
|
701
|
-
sig { returns(T::Boolean) }
|
|
702
|
-
def function? = true
|
|
703
|
-
sig { returns(T::Boolean) }
|
|
704
|
-
def class? = false
|
|
705
|
-
sig { returns(T::Boolean) }
|
|
706
|
-
def type? = false
|
|
707
|
-
sig { returns(T::Boolean) }
|
|
708
|
-
def interface? = false
|
|
709
|
-
sig { returns(T::Boolean) }
|
|
710
|
-
def enum? = false
|
|
711
|
-
sig { returns(T::Boolean) }
|
|
712
|
-
def module? = false
|
|
713
|
-
sig { returns(T::Boolean) }
|
|
714
|
-
def other? = false
|
|
715
|
-
# @param hash [Hash] deserialized from the native extension
|
|
716
|
-
# @return [self]
|
|
717
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
718
|
-
def self.from_hash(hash)
|
|
719
|
-
new
|
|
720
|
-
end
|
|
721
|
-
end
|
|
722
|
-
## A class definition.
|
|
723
|
-
SymbolKindClass = Data.define do
|
|
724
|
-
include SymbolKind
|
|
725
|
-
extend T::Sig
|
|
726
|
-
|
|
727
|
-
sig { returns(T::Boolean) }
|
|
728
|
-
def variable? = false
|
|
729
|
-
sig { returns(T::Boolean) }
|
|
730
|
-
def constant? = false
|
|
731
|
-
sig { returns(T::Boolean) }
|
|
732
|
-
def function? = false
|
|
733
|
-
sig { returns(T::Boolean) }
|
|
734
|
-
def class? = true
|
|
735
|
-
sig { returns(T::Boolean) }
|
|
736
|
-
def type? = false
|
|
737
|
-
sig { returns(T::Boolean) }
|
|
738
|
-
def interface? = false
|
|
739
|
-
sig { returns(T::Boolean) }
|
|
740
|
-
def enum? = false
|
|
741
|
-
sig { returns(T::Boolean) }
|
|
742
|
-
def module? = false
|
|
743
|
-
sig { returns(T::Boolean) }
|
|
744
|
-
def other? = false
|
|
745
|
-
# @param hash [Hash] deserialized from the native extension
|
|
746
|
-
# @return [self]
|
|
747
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
748
|
-
def self.from_hash(hash)
|
|
749
|
-
new
|
|
750
|
-
end
|
|
751
|
-
end
|
|
752
|
-
## A type alias or typedef.
|
|
753
|
-
SymbolKindType = Data.define do
|
|
754
|
-
include SymbolKind
|
|
755
|
-
extend T::Sig
|
|
756
|
-
|
|
757
|
-
sig { returns(T::Boolean) }
|
|
758
|
-
def variable? = false
|
|
759
|
-
sig { returns(T::Boolean) }
|
|
760
|
-
def constant? = false
|
|
761
|
-
sig { returns(T::Boolean) }
|
|
762
|
-
def function? = false
|
|
763
|
-
sig { returns(T::Boolean) }
|
|
764
|
-
def class? = false
|
|
765
|
-
sig { returns(T::Boolean) }
|
|
766
|
-
def type? = true
|
|
767
|
-
sig { returns(T::Boolean) }
|
|
768
|
-
def interface? = false
|
|
769
|
-
sig { returns(T::Boolean) }
|
|
770
|
-
def enum? = false
|
|
771
|
-
sig { returns(T::Boolean) }
|
|
772
|
-
def module? = false
|
|
773
|
-
sig { returns(T::Boolean) }
|
|
774
|
-
def other? = false
|
|
775
|
-
# @param hash [Hash] deserialized from the native extension
|
|
776
|
-
# @return [self]
|
|
777
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
778
|
-
def self.from_hash(hash)
|
|
779
|
-
new
|
|
780
|
-
end
|
|
781
|
-
end
|
|
782
|
-
## An interface definition.
|
|
783
|
-
SymbolKindInterface = Data.define do
|
|
784
|
-
include SymbolKind
|
|
785
|
-
extend T::Sig
|
|
786
|
-
|
|
787
|
-
sig { returns(T::Boolean) }
|
|
788
|
-
def variable? = false
|
|
789
|
-
sig { returns(T::Boolean) }
|
|
790
|
-
def constant? = false
|
|
791
|
-
sig { returns(T::Boolean) }
|
|
792
|
-
def function? = false
|
|
793
|
-
sig { returns(T::Boolean) }
|
|
794
|
-
def class? = false
|
|
795
|
-
sig { returns(T::Boolean) }
|
|
796
|
-
def type? = false
|
|
797
|
-
sig { returns(T::Boolean) }
|
|
798
|
-
def interface? = true
|
|
799
|
-
sig { returns(T::Boolean) }
|
|
800
|
-
def enum? = false
|
|
801
|
-
sig { returns(T::Boolean) }
|
|
802
|
-
def module? = false
|
|
803
|
-
sig { returns(T::Boolean) }
|
|
804
|
-
def other? = false
|
|
805
|
-
# @param hash [Hash] deserialized from the native extension
|
|
806
|
-
# @return [self]
|
|
807
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
808
|
-
def self.from_hash(hash)
|
|
809
|
-
new
|
|
810
|
-
end
|
|
811
|
-
end
|
|
812
|
-
## An enum definition.
|
|
813
|
-
SymbolKindEnum = Data.define do
|
|
814
|
-
include SymbolKind
|
|
815
|
-
extend T::Sig
|
|
816
|
-
|
|
817
|
-
sig { returns(T::Boolean) }
|
|
818
|
-
def variable? = false
|
|
819
|
-
sig { returns(T::Boolean) }
|
|
820
|
-
def constant? = false
|
|
821
|
-
sig { returns(T::Boolean) }
|
|
822
|
-
def function? = false
|
|
823
|
-
sig { returns(T::Boolean) }
|
|
824
|
-
def class? = false
|
|
825
|
-
sig { returns(T::Boolean) }
|
|
826
|
-
def type? = false
|
|
827
|
-
sig { returns(T::Boolean) }
|
|
828
|
-
def interface? = false
|
|
829
|
-
sig { returns(T::Boolean) }
|
|
830
|
-
def enum? = true
|
|
831
|
-
sig { returns(T::Boolean) }
|
|
832
|
-
def module? = false
|
|
833
|
-
sig { returns(T::Boolean) }
|
|
834
|
-
def other? = false
|
|
835
|
-
# @param hash [Hash] deserialized from the native extension
|
|
836
|
-
# @return [self]
|
|
837
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
838
|
-
def self.from_hash(hash)
|
|
839
|
-
new
|
|
840
|
-
end
|
|
841
|
-
end
|
|
842
|
-
## A module declaration.
|
|
843
|
-
SymbolKindModule = Data.define do
|
|
844
|
-
include SymbolKind
|
|
845
|
-
extend T::Sig
|
|
846
|
-
|
|
847
|
-
sig { returns(T::Boolean) }
|
|
848
|
-
def variable? = false
|
|
849
|
-
sig { returns(T::Boolean) }
|
|
850
|
-
def constant? = false
|
|
851
|
-
sig { returns(T::Boolean) }
|
|
852
|
-
def function? = false
|
|
853
|
-
sig { returns(T::Boolean) }
|
|
854
|
-
def class? = false
|
|
855
|
-
sig { returns(T::Boolean) }
|
|
856
|
-
def type? = false
|
|
857
|
-
sig { returns(T::Boolean) }
|
|
858
|
-
def interface? = false
|
|
859
|
-
sig { returns(T::Boolean) }
|
|
860
|
-
def enum? = false
|
|
861
|
-
sig { returns(T::Boolean) }
|
|
862
|
-
def module? = true
|
|
863
|
-
sig { returns(T::Boolean) }
|
|
864
|
-
def other? = false
|
|
865
|
-
# @param hash [Hash] deserialized from the native extension
|
|
866
|
-
# @return [self]
|
|
867
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
868
|
-
def self.from_hash(hash)
|
|
869
|
-
new
|
|
870
|
-
end
|
|
871
|
-
end
|
|
872
|
-
## A symbol kind not covered by the standard variants.
|
|
873
|
-
SymbolKindOther = Data.define(:value) do
|
|
874
|
-
include SymbolKind
|
|
875
|
-
extend T::Sig
|
|
876
|
-
|
|
877
|
-
# The language-specific symbol kind name.
|
|
878
|
-
sig { returns(String) }
|
|
879
|
-
def value = super # rubocop:disable Lint/UselessMethodDefinition
|
|
880
|
-
sig { returns(T::Boolean) }
|
|
881
|
-
def variable? = false
|
|
882
|
-
sig { returns(T::Boolean) }
|
|
883
|
-
def constant? = false
|
|
884
|
-
sig { returns(T::Boolean) }
|
|
885
|
-
def function? = false
|
|
886
|
-
sig { returns(T::Boolean) }
|
|
887
|
-
def class? = false
|
|
888
|
-
sig { returns(T::Boolean) }
|
|
889
|
-
def type? = false
|
|
890
|
-
sig { returns(T::Boolean) }
|
|
891
|
-
def interface? = false
|
|
892
|
-
sig { returns(T::Boolean) }
|
|
893
|
-
def enum? = false
|
|
894
|
-
sig { returns(T::Boolean) }
|
|
895
|
-
def module? = false
|
|
896
|
-
sig { returns(T::Boolean) }
|
|
897
|
-
def other? = true
|
|
898
|
-
# @param hash [Hash] deserialized from the native extension
|
|
899
|
-
# @return [self]
|
|
900
|
-
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
901
|
-
def self.from_hash(hash)
|
|
902
|
-
new(value: hash[:value] || hash["value"])
|
|
903
|
-
end
|
|
904
|
-
end
|
|
905
|
-
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:cbfce82405886ba16adac06e72a988e1089331253ea6c38cea8c42f34fc3987b
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module TreeSitterLanguagePack
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.9.0.pre.rc.
|
|
9
|
+
VERSION = "1.9.0.pre.rc.36"
|
|
10
10
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:5c3eac2ef7892df9942263b2ef22bbce08c4729cfb235dcd7f37f968755d1b10
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
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:5c3eac2ef7892df9942263b2ef22bbce08c4729cfb235dcd7f37f968755d1b10
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|