tree_sitter_language_pack 1.14.3-aarch64-linux → 1.15.7-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '00139b571be853d942559db932a2c7a866449367b4f67862cf73568d16b7214d'
4
- data.tar.gz: 1b45afbb86a8b8039a37e93bbecf531edc873c9552b15c868b5cc783970da028
3
+ metadata.gz: 84593a4eefeb03787936619cb1bf8883953d002dee7107ecbc55112b556079c8
4
+ data.tar.gz: a1d312ecf0cc1ea53f55d51cb5c1c599f1947205b61bb550bde697bcb8b3b795
5
5
  SHA512:
6
- metadata.gz: 3ad052a2ccbf25b0fc7841bc987591d731ab7083113ebc763480994c0c712e0847ea0ad5d40b00d0f2cc86fcd9a9c7b6b4eb6d5bcea888042379be6a324777ee
7
- data.tar.gz: 32e7a32b3e3fb4a2897f5e463a48d3c2a391a9895f1aa6da29171f072c5830ac8f5875314a465d8654a71e0b48fe799d3223ccb6f6e64854405d13e6059995a9
6
+ metadata.gz: eb2de820cce8de2bfde3b72841e7e4eeb11044d20f1675ae9bc23ff9bff9987ba67a2ea06d0a79dde8719859aa1d5ae9d29bb03ad55605a559c718b044ee1e7a
7
+ data.tar.gz: 3dbb248a6624d7e458c71e7358e919ffba3e5ffa18950aa3d3153c37414df72604619daedf2bc2a73ae82f6fd1020c5c1593bc26cdd17fc95552c439d8033ce5
data/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ <!-- This file is auto-generated by alef — DO NOT EDIT. -->
2
+ <!-- alef:hash:1288df61611ea59d0c5798d400d762681ce7bd80242b7c6e9db9637d5924ab7a -->
3
+ <!-- To regenerate: alef readme -->
4
+ <!-- To verify freshness: alef verify -->
5
+
1
6
  <p align="center">
2
7
  <picture>
3
8
  <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/xberg-io/assets@v1/banner/readme-banner-dark.svg">
@@ -113,7 +118,11 @@ gem install tree_sitter_language_pack
113
118
 
114
119
  ## Quick Start
115
120
 
116
- See the [language guide](https://docs.tree-sitter-language-pack.xberg.io) for `ruby`-specific usage.
121
+ ```ruby title="Ruby"
122
+ require "tree_sitter_language_pack"
123
+ result = TreeSitterLanguagePack.process("\# A comment\ndef greet(name):\n \"\"\"Say hello.\"\"\"\n return f'Hi {name}'\n\nimport os\n", { 'language' => 'python' })
124
+ puts result.inspect
125
+ ```
117
126
 
118
127
  ## Features
119
128
 
@@ -1,7 +1,7 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:976e3b6b83d187cee6bb9dd6b0b8644f15198c5e45d5a66a3b2d2f7573374a9d
2
+ # alef:hash:807dfe1fa1d80faa2562656664c8228573b6be624f3282091d3a82ba078b4924
3
3
  # To regenerate: alef generate
4
- # To verify freshness: alef verify --exit-code
4
+ # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  require "json"
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:976e3b6b83d187cee6bb9dd6b0b8644f15198c5e45d5a66a3b2d2f7573374a9d
2
+ # alef:hash:af0bd66ae1dce8b375dc96f1c111b27059286d7de6a559c2661a83ca78aae236
3
3
  # To regenerate: alef generate
4
- # To verify freshness: alef verify --exit-code
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.14.3"
9
+ VERSION = "1.15.7"
10
10
  end
@@ -1,7 +1,7 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:976e3b6b83d187cee6bb9dd6b0b8644f15198c5e45d5a66a3b2d2f7573374a9d
2
+ # alef:hash:dac8e5dcc4f31b234e53610a6a93387247a27d358f36af97a6bcafad35e8831c
3
3
  # To regenerate: alef generate
4
- # To verify freshness: alef verify --exit-code
4
+ # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  require_relative "tree_sitter_language_pack/version"
data/sig/types.rbs CHANGED
@@ -1,7 +1,7 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:976e3b6b83d187cee6bb9dd6b0b8644f15198c5e45d5a66a3b2d2f7573374a9d
2
+ # alef:hash:b9c5d31eca8ac1e144bafee41ef0baafa8e2e600df8c4e40cb2caca610cf0e85
3
3
  # To regenerate: alef generate
4
- # To verify freshness: alef verify --exit-code
4
+ # To verify freshness: alef verify
5
5
 
6
6
  module TreeSitterLanguagePack
7
7
 
@@ -9,205 +9,142 @@ module TreeSitterLanguagePack
9
9
 
10
10
  type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
11
11
 
12
- class DataAttribute
13
- attr_accessor name: String?
14
- attr_accessor value: String?
15
- attr_accessor span: Span?
16
-
17
- def initialize: (?name: String, ?value: String, ?span: Span) -> void
18
- end
19
-
20
- class DataNode
21
- attr_accessor kind: DataNodeKind?
22
- attr_accessor key: String?
23
- attr_accessor value: String?
24
- attr_accessor attributes: Array[DataAttribute]?
25
- attr_accessor children: Array[DataNode]?
26
- attr_accessor span: Span?
27
-
28
- def initialize: (?kind: DataNodeKind, ?key: String, ?value: String, ?attributes: Array[DataAttribute], ?children: Array[DataNode], ?span: Span) -> void
29
- end
30
-
31
- class Span
32
- attr_accessor start_byte: Integer?
33
- attr_accessor end_byte: Integer?
34
- attr_accessor start_line: Integer?
35
- attr_accessor start_column: Integer?
36
- attr_accessor end_line: Integer?
37
- attr_accessor end_column: Integer?
38
-
39
- def initialize: (?start_byte: Integer, ?end_byte: Integer, ?start_line: Integer, ?start_column: Integer, ?end_line: Integer, ?end_column: Integer) -> void
40
- end
41
-
42
- class ProcessResult
43
- attr_accessor language: String?
44
- attr_accessor metrics: FileMetrics?
45
- attr_accessor structure: Array[StructureItem]?
46
- attr_accessor imports: Array[ImportInfo]?
47
- attr_accessor exports: Array[ExportInfo]?
48
- attr_accessor comments: Array[CommentInfo]?
49
- attr_accessor docstrings: Array[DocstringInfo]?
50
- attr_accessor symbols: Array[SymbolInfo]?
51
- attr_accessor diagnostics: Array[Diagnostic]?
52
- attr_accessor chunks: Array[CodeChunk]?
53
- attr_accessor data: DataNode?
12
+ class ByteRange
13
+ attr_reader start: Integer
14
+ attr_reader end: Integer
54
15
 
55
- def initialize: (?language: String, ?metrics: FileMetrics, ?structure: Array[StructureItem], ?imports: Array[ImportInfo], ?exports: Array[ExportInfo], ?comments: Array[CommentInfo], ?docstrings: Array[DocstringInfo], ?symbols: Array[SymbolInfo], ?diagnostics: Array[Diagnostic], ?chunks: Array[CodeChunk], ?data: DataNode) -> void
16
+ def initialize: (start: Integer, end: Integer) -> void
56
17
  end
57
18
 
58
- class FileMetrics
59
- attr_accessor total_lines: Integer?
60
- attr_accessor code_lines: Integer?
61
- attr_accessor comment_lines: Integer?
62
- attr_accessor blank_lines: Integer?
63
- attr_accessor total_bytes: Integer?
64
- attr_accessor node_count: Integer?
65
- attr_accessor error_count: Integer?
66
- attr_accessor max_depth: Integer?
19
+ class ChunkContext
20
+ attr_reader language: String
21
+ attr_reader chunk_index: Integer
22
+ attr_reader total_chunks: Integer
23
+ attr_reader node_types: Array[String]
24
+ attr_reader context_path: Array[String]
25
+ attr_reader symbols_defined: Array[String]
26
+ attr_reader comments: Array[CommentInfo]
27
+ attr_reader docstrings: Array[DocstringInfo]
28
+ attr_reader has_error_nodes: bool
67
29
 
68
- def initialize: (?total_lines: Integer, ?code_lines: Integer, ?comment_lines: Integer, ?blank_lines: Integer, ?total_bytes: Integer, ?node_count: Integer, ?error_count: Integer, ?max_depth: Integer) -> void
30
+ def initialize: (?language: String, ?chunk_index: Integer, ?total_chunks: Integer, ?node_types: Array[String], ?context_path: Array[String], ?symbols_defined: Array[String], ?comments: Array[CommentInfo], ?docstrings: Array[DocstringInfo], ?has_error_nodes: bool) -> void
69
31
  end
70
32
 
71
- class StructureItem
72
- attr_accessor kind: StructureKind?
73
- attr_accessor name: String?
74
- attr_accessor visibility: String?
75
- attr_accessor span: Span?
76
- attr_accessor children: Array[StructureItem]?
77
- attr_accessor decorators: Array[String]?
78
- attr_accessor doc_comment: String?
79
- attr_accessor signature: String?
80
- attr_accessor body_span: Span?
33
+ class CodeChunk
34
+ attr_reader content: String
35
+ attr_reader start_byte: Integer
36
+ attr_reader end_byte: Integer
37
+ attr_reader start_line: Integer
38
+ attr_reader end_line: Integer
39
+ attr_reader metadata: ChunkContext
81
40
 
82
- def initialize: (?kind: StructureKind, ?name: String, ?visibility: String, ?span: Span, ?children: Array[StructureItem], ?decorators: Array[String], ?doc_comment: String, ?signature: String, ?body_span: Span) -> void
41
+ def initialize: (?content: String, ?start_byte: Integer, ?end_byte: Integer, ?start_line: Integer, ?end_line: Integer, ?metadata: ChunkContext) -> void
83
42
  end
84
43
 
85
44
  class CommentInfo
86
- attr_accessor text: String?
87
- attr_accessor kind: CommentKind?
88
- attr_accessor span: Span?
89
- attr_accessor associated_node: String?
45
+ attr_reader text: String
46
+ attr_reader kind: CommentKind
47
+ attr_reader span: Span
48
+ attr_reader associated_node: String?
90
49
 
91
50
  def initialize: (?text: String, ?kind: CommentKind, ?span: Span, ?associated_node: String) -> void
92
51
  end
93
52
 
94
- class DocstringInfo
95
- attr_accessor text: String?
96
- attr_accessor format: DocstringFormat?
97
- attr_accessor span: Span?
98
- attr_accessor associated_item: String?
99
- attr_accessor parsed_sections: Array[DocSection]?
100
-
101
- def initialize: (?text: String, ?format: DocstringFormat, ?span: Span, ?associated_item: String, ?parsed_sections: Array[DocSection]) -> void
102
- end
103
-
104
- class DocSection
105
- attr_accessor kind: String?
106
- attr_accessor name: String?
107
- attr_accessor description: String?
108
-
109
- def initialize: (?kind: String, ?name: String, ?description: String) -> void
110
- end
111
-
112
- class ImportInfo
113
- attr_accessor source: String?
114
- attr_accessor items: Array[String]?
115
- attr_accessor alias: String?
116
- attr_accessor is_wildcard: bool?
117
- attr_accessor span: Span?
118
-
119
- def initialize: (?source: String, ?items: Array[String], ?alias: String, ?is_wildcard: bool, ?span: Span) -> void
120
- end
121
-
122
- class ExportInfo
123
- attr_accessor name: String?
124
- attr_accessor kind: ExportKind?
125
- attr_accessor span: Span?
53
+ class DataAttribute
54
+ attr_reader name: String
55
+ attr_reader value: String
56
+ attr_reader span: Span
126
57
 
127
- def initialize: (?name: String, ?kind: ExportKind, ?span: Span) -> void
58
+ def initialize: (?name: String, ?value: String, ?span: Span) -> void
128
59
  end
129
60
 
130
- class SymbolInfo
131
- attr_accessor name: String?
132
- attr_accessor kind: SymbolKind?
133
- attr_accessor span: Span?
134
- attr_accessor type_annotation: String?
135
- attr_accessor doc: String?
61
+ class DataNode
62
+ attr_reader kind: DataNodeKind
63
+ attr_reader key: String?
64
+ attr_reader value: String?
65
+ attr_reader attributes: Array[DataAttribute]
66
+ attr_reader children: Array[DataNode]
67
+ attr_reader span: Span
136
68
 
137
- def initialize: (?name: String, ?kind: SymbolKind, ?span: Span, ?type_annotation: String, ?doc: String) -> void
69
+ def initialize: (?kind: DataNodeKind, ?key: String, ?value: String, ?attributes: Array[DataAttribute], ?children: Array[DataNode], ?span: Span) -> void
138
70
  end
139
71
 
140
72
  class Diagnostic
141
- attr_accessor message: String?
142
- attr_accessor severity: DiagnosticSeverity?
143
- attr_accessor span: Span?
73
+ attr_reader message: String
74
+ attr_reader severity: DiagnosticSeverity
75
+ attr_reader span: Span
144
76
 
145
77
  def initialize: (?message: String, ?severity: DiagnosticSeverity, ?span: Span) -> void
146
78
  end
147
79
 
148
- class CodeChunk
149
- attr_accessor content: String?
150
- attr_accessor start_byte: Integer?
151
- attr_accessor end_byte: Integer?
152
- attr_accessor start_line: Integer?
153
- attr_accessor end_line: Integer?
154
- attr_accessor metadata: ChunkContext?
80
+ class DocSection
81
+ attr_reader kind: String
82
+ attr_reader name: String?
83
+ attr_reader description: String
155
84
 
156
- def initialize: (?content: String, ?start_byte: Integer, ?end_byte: Integer, ?start_line: Integer, ?end_line: Integer, ?metadata: ChunkContext) -> void
85
+ def initialize: (?kind: String, ?name: String, ?description: String) -> void
157
86
  end
158
87
 
159
- class ChunkContext
160
- attr_accessor language: String?
161
- attr_accessor chunk_index: Integer?
162
- attr_accessor total_chunks: Integer?
163
- attr_accessor node_types: Array[String]?
164
- attr_accessor context_path: Array[String]?
165
- attr_accessor symbols_defined: Array[String]?
166
- attr_accessor comments: Array[CommentInfo]?
167
- attr_accessor docstrings: Array[DocstringInfo]?
168
- attr_accessor has_error_nodes: bool?
88
+ class DocstringInfo
89
+ attr_reader text: String
90
+ attr_reader format: DocstringFormat
91
+ attr_reader span: Span
92
+ attr_reader associated_item: String?
93
+ attr_reader parsed_sections: Array[DocSection]
169
94
 
170
- def initialize: (?language: String, ?chunk_index: Integer, ?total_chunks: Integer, ?node_types: Array[String], ?context_path: Array[String], ?symbols_defined: Array[String], ?comments: Array[CommentInfo], ?docstrings: Array[DocstringInfo], ?has_error_nodes: bool) -> void
95
+ def initialize: (?text: String, ?format: DocstringFormat, ?span: Span, ?associated_item: String, ?parsed_sections: Array[DocSection]) -> void
171
96
  end
172
97
 
173
- class PackConfig
174
- attr_accessor cache_dir: String?
175
- attr_accessor languages: Array[String]?
176
- attr_accessor groups: Array[String]?
98
+ class DownloadManager
99
+ def installed_languages: () -> Array[String]
100
+ def download_all_best_effort: () -> Integer
101
+ def clean_cache: () -> void
102
+ end
177
103
 
178
- def initialize: (?cache_dir: String, ?languages: Array[String], ?groups: Array[String]) -> void
104
+ class ExportInfo
105
+ attr_reader name: String
106
+ attr_reader kind: ExportKind
107
+ attr_reader span: Span
108
+
109
+ def initialize: (?name: String, ?kind: ExportKind, ?span: Span) -> void
179
110
  end
180
111
 
181
- class Point
182
- attr_reader row: Integer
183
- attr_reader column: Integer
112
+ class FileMetrics
113
+ attr_reader total_lines: Integer
114
+ attr_reader code_lines: Integer
115
+ attr_reader comment_lines: Integer
116
+ attr_reader blank_lines: Integer
117
+ attr_reader total_bytes: Integer
118
+ attr_reader node_count: Integer
119
+ attr_reader error_count: Integer
120
+ attr_reader max_depth: Integer
184
121
 
185
- def initialize: (row: Integer, column: Integer) -> void
122
+ def initialize: (?total_lines: Integer, ?code_lines: Integer, ?comment_lines: Integer, ?blank_lines: Integer, ?total_bytes: Integer, ?node_count: Integer, ?error_count: Integer, ?max_depth: Integer) -> void
186
123
  end
187
124
 
188
- class ByteRange
189
- attr_reader start: Integer
190
- attr_reader end: Integer
125
+ class ImportInfo
126
+ attr_reader source: String
127
+ attr_reader items: Array[String]
128
+ attr_reader alias: String?
129
+ attr_reader is_wildcard: bool
130
+ attr_reader span: Span
191
131
 
192
- def initialize: (start: Integer, end: Integer) -> void
132
+ def initialize: (?source: String, ?items: Array[String], ?alias: String, ?is_wildcard: bool, ?span: Span) -> void
193
133
  end
194
134
 
195
- class Parser
196
- def set_language: (String name) -> void
197
- def parse: (String source) -> Tree?
198
- def parse_bytes: (String source) -> Tree?
199
- def reset: () -> void
200
- def self.new: () -> Parser
201
- def self.default: () -> Parser
135
+ class Language
202
136
  end
203
137
 
204
- class Tree
205
- def root_node: () -> Node
206
- def walk: () -> TreeCursor
138
+ class LanguageRegistry
139
+ def get_language: (String name) -> Language
140
+ def available_languages: () -> Array[String]
141
+ def has_parser: (String name) -> bool
142
+ def has_language: (String name) -> bool
143
+ def language_count: () -> Integer
144
+ def process: (String source, ProcessConfig config) -> ProcessResult
207
145
  end
208
146
 
209
147
  class Node
210
- def clone: () -> Node
211
148
  def kind: () -> String
212
149
  def kind_id: () -> Integer
213
150
  def start_byte: () -> Integer
@@ -230,130 +167,195 @@ module TreeSitterLanguagePack
230
167
  def walk: () -> TreeCursor
231
168
  end
232
169
 
233
- class TreeCursor
234
- def node: () -> Node
235
- def goto_first_child: () -> bool
236
- def goto_parent: () -> bool
237
- def goto_next_sibling: () -> bool
238
- def field_name: () -> String?
170
+ class PackConfig
171
+ attr_reader cache_dir: String?
172
+ attr_reader languages: Array[String]?
173
+ attr_reader groups: Array[String]?
174
+
175
+ def initialize: (?cache_dir: String, ?languages: Array[String], ?groups: Array[String]) -> void
176
+ end
177
+
178
+ class Parser
179
+ def set_max_source_bytes: (?Integer max_bytes) -> void
180
+ def set_parse_timeout_ms: (?Integer timeout_ms) -> void
181
+ def set_language: (String name) -> void
182
+ def parse: (String source) -> Tree?
183
+ def parse_bytes: (String source) -> Tree?
184
+ def reset: () -> void
185
+ end
186
+
187
+ class Point
188
+ attr_reader row: Integer
189
+ attr_reader column: Integer
190
+
191
+ def initialize: (row: Integer, column: Integer) -> void
239
192
  end
240
193
 
241
194
  class ProcessConfig
242
- attr_accessor language: String?
243
- attr_accessor structure: bool?
244
- attr_accessor imports: bool?
245
- attr_accessor exports: bool?
246
- attr_accessor comments: bool?
247
- attr_accessor docstrings: bool?
248
- attr_accessor symbols: bool?
249
- attr_accessor diagnostics: bool?
250
- attr_accessor chunk_max_size: Integer?
251
- attr_accessor data_extraction: bool?
252
-
253
- def initialize: (?language: String, ?structure: bool, ?imports: bool, ?exports: bool, ?comments: bool, ?docstrings: bool, ?symbols: bool, ?diagnostics: bool, ?chunk_max_size: Integer, ?data_extraction: bool) -> void
195
+ attr_reader language: String
196
+ attr_reader structure: bool
197
+ attr_reader imports: bool
198
+ attr_reader exports: bool
199
+ attr_reader comments: bool
200
+ attr_reader docstrings: bool
201
+ attr_reader symbols: bool
202
+ attr_reader diagnostics: bool
203
+ attr_reader chunk_max_size: Integer?
204
+ attr_reader data_extraction: bool
205
+ attr_reader max_source_bytes: Integer?
206
+ attr_reader parse_timeout_ms: Integer?
207
+
208
+ def initialize: (?language: String, ?structure: bool, ?imports: bool, ?exports: bool, ?comments: bool, ?docstrings: bool, ?symbols: bool, ?diagnostics: bool, ?chunk_max_size: Integer, ?data_extraction: bool, ?max_source_bytes: Integer, ?parse_timeout_ms: Integer) -> void
254
209
  def with_chunking: (Integer max_size) -> ProcessConfig
255
210
  def all: () -> ProcessConfig
256
211
  def minimal: () -> ProcessConfig
257
212
  def with_data_extraction: (bool enabled) -> ProcessConfig
258
- def self.default: () -> ProcessConfig
213
+ def with_max_source_bytes: (?Integer max_bytes) -> ProcessConfig
214
+ def with_parse_timeout_ms: (?Integer timeout_ms) -> ProcessConfig
215
+ def validate: () -> void
259
216
  end
260
217
 
261
- class LanguageRegistry
262
- def get_language: (String name) -> Language
263
- def available_languages: () -> Array[String]
264
- def has_parser: (String name) -> bool
265
- def has_language: (String name) -> bool
266
- def language_count: () -> Integer
267
- def process: (String source, ProcessConfig config) -> ProcessResult
268
- def self.new: () -> LanguageRegistry
269
- def self.default: () -> LanguageRegistry
218
+ class ProcessResult
219
+ attr_reader language: String
220
+ attr_reader metrics: FileMetrics
221
+ attr_reader structure: Array[StructureItem]
222
+ attr_reader imports: Array[ImportInfo]
223
+ attr_reader exports: Array[ExportInfo]
224
+ attr_reader comments: Array[CommentInfo]
225
+ attr_reader docstrings: Array[DocstringInfo]
226
+ attr_reader symbols: Array[SymbolInfo]
227
+ attr_reader diagnostics: Array[Diagnostic]
228
+ attr_reader chunks: Array[CodeChunk]
229
+ attr_reader data: DataNode?
230
+
231
+ def initialize: (?language: String, ?metrics: FileMetrics, ?structure: Array[StructureItem], ?imports: Array[ImportInfo], ?exports: Array[ExportInfo], ?comments: Array[CommentInfo], ?docstrings: Array[DocstringInfo], ?symbols: Array[SymbolInfo], ?diagnostics: Array[Diagnostic], ?chunks: Array[CodeChunk], ?data: DataNode) -> void
270
232
  end
271
233
 
272
- class DownloadManager
273
- def installed_languages: () -> Array[String]
274
- def download_all_best_effort: () -> Integer
275
- def clean_cache: () -> void
276
- def self.new: (String version) -> DownloadManager
234
+ class Span
235
+ attr_reader start_byte: Integer
236
+ attr_reader end_byte: Integer
237
+ attr_reader start_line: Integer
238
+ attr_reader start_column: Integer
239
+ attr_reader end_line: Integer
240
+ attr_reader end_column: Integer
241
+
242
+ def initialize: (?start_byte: Integer, ?end_byte: Integer, ?start_line: Integer, ?start_column: Integer, ?end_line: Integer, ?end_column: Integer) -> void
277
243
  end
278
244
 
279
- class Language
245
+ class StructureItem
246
+ attr_reader kind: StructureKind
247
+ attr_reader name: String?
248
+ attr_reader visibility: String?
249
+ attr_reader span: Span
250
+ attr_reader children: Array[StructureItem]
251
+ attr_reader decorators: Array[String]
252
+ attr_reader doc_comment: String?
253
+ attr_reader signature: String?
254
+ attr_reader body_span: Span?
255
+
256
+ def initialize: (?kind: StructureKind, ?name: String, ?visibility: String, ?span: Span, ?children: Array[StructureItem], ?decorators: Array[String], ?doc_comment: String, ?signature: String, ?body_span: Span) -> void
280
257
  end
281
258
 
282
- class DataNodeKind
283
- type value = :key_value | :element | :sequence
259
+ class SymbolInfo
260
+ attr_reader name: String
261
+ attr_reader kind: SymbolKind
262
+ attr_reader span: Span
263
+ attr_reader type_annotation: String?
264
+ attr_reader doc: String?
265
+
266
+ def initialize: (?name: String, ?kind: SymbolKind, ?span: Span, ?type_annotation: String, ?doc: String) -> void
284
267
  end
285
268
 
286
- class StructureKind
269
+ class Tree
270
+ def root_node: () -> Node
271
+ def walk: () -> TreeCursor
272
+ end
273
+
274
+ class TreeCursor
275
+ def node: () -> Node
276
+ def goto_first_child: () -> bool
277
+ def goto_parent: () -> bool
278
+ def goto_next_sibling: () -> bool
279
+ def field_name: () -> String?
287
280
  end
288
281
 
289
282
  class CommentKind
290
- type value = :line | :block | :doc
283
+ type value = :Line | :Block | :Doc
284
+ end
285
+
286
+ class DataNodeKind
287
+ type value = :KeyValue | :Element | :Sequence
288
+ end
289
+
290
+ class DiagnosticSeverity
291
+ type value = :Error | :Warning | :Info
291
292
  end
292
293
 
293
294
  class DocstringFormat
294
295
  end
295
296
 
296
297
  class ExportKind
297
- type value = :named | :default | :re_export
298
+ type value = :Named | :Default | :ReExport
298
299
  end
299
300
 
300
- class SymbolKind
301
+ class StructureKind
301
302
  end
302
303
 
303
- class DiagnosticSeverity
304
- type value = :error | :warning | :info
304
+ class SymbolKind
305
305
  end
306
306
 
307
+ def self.available_languages: () -> Array[String]
308
+
309
+ def self.cache_dir: () -> String
310
+
311
+ def self.clean_cache: () -> void
312
+
313
+ def self.configure: (PackConfig config) -> void
314
+
315
+ def self.detect_language: (String path) -> String?
316
+
317
+ def self.detect_language_from_content: (String content) -> String?
318
+
307
319
  def self.detect_language_from_extension: (String ext) -> String?
308
320
 
309
321
  def self.detect_language_from_path: (String path) -> String?
310
322
 
311
- def self.detect_language_from_content: (String content) -> String?
323
+ def self.download: (Array[String] names) -> Integer
312
324
 
313
- def self.get_highlights_query: (String language) -> String?
325
+ def self.download_all: () -> Integer
314
326
 
315
- def self.get_injections_query: (String language) -> String?
327
+ def self.download_group: (String name) -> Integer
316
328
 
317
- def self.get_locals_query: (String language) -> String?
329
+ def self.downloaded_languages: () -> Array[String]
318
330
 
319
- def self.get_tags_query: (String language) -> String?
331
+ def self.get_folds_query: (String language) -> String?
332
+
333
+ def self.get_highlights_query: (String language) -> String?
320
334
 
321
335
  def self.get_indents_query: (String language) -> String?
322
336
 
323
- def self.get_folds_query: (String language) -> String?
337
+ def self.get_injections_query: (String language) -> String?
324
338
 
325
339
  def self.get_language: (String name) -> Language
326
340
 
327
- def self.get_parser: (String name) -> Parser
341
+ def self.get_locals_query: (String language) -> String?
328
342
 
329
- def self.detect_language: (String path) -> String?
343
+ def self.get_parser: (String name) -> Parser
330
344
 
331
- def self.available_languages: () -> Array[String]
345
+ def self.get_tags_query: (String language) -> String?
332
346
 
333
347
  def self.has_language: (String name) -> bool
334
348
 
335
- def self.language_count: () -> Integer
336
-
337
- def self.process: (String source, ProcessConfig config) -> ProcessResult
338
-
339
349
  def self.init: (PackConfig config) -> void
340
350
 
341
- def self.configure: (PackConfig config) -> void
342
-
343
- def self.download: (Array[String] names) -> Integer
344
-
345
- def self.prefetch: (Array[String] languages) -> void
346
-
347
- def self.download_all: () -> Integer
351
+ def self.language_count: () -> Integer
348
352
 
349
- def self.download_group: (String name) -> Integer
353
+ def self.manifest_groups: () -> Array[String]
350
354
 
351
355
  def self.manifest_languages: () -> Array[String]
352
356
 
353
- def self.downloaded_languages: () -> Array[String]
354
-
355
- def self.clean_cache: () -> void
357
+ def self.prefetch: (Array[String] languages) -> void
356
358
 
357
- def self.cache_dir: () -> String
359
+ def self.process: (String source, ProcessConfig config) -> ProcessResult
358
360
 
359
361
  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.14.3
4
+ version: 1.15.7
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Na'aman Hirschfeld