ruby_json_parser 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +35 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE +21 -0
- data/README.md +143 -0
- data/Rakefile +12 -0
- data/lib/ruby_json_parser/ast.rb +312 -0
- data/lib/ruby_json_parser/evaluator.rb +81 -0
- data/lib/ruby_json_parser/lexer.rb +358 -0
- data/lib/ruby_json_parser/parser.rb +205 -0
- data/lib/ruby_json_parser/result.rb +43 -0
- data/lib/ruby_json_parser/token.rb +171 -0
- data/lib/ruby_json_parser/version.rb +6 -0
- data/lib/ruby_json_parser.rb +77 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/minitest@5.24.1.rbi +1563 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/parallel@1.25.1.rbi +287 -0
- data/sorbet/rbi/gems/parser@3.3.4.0.rbi +5519 -0
- data/sorbet/rbi/gems/prism@0.30.0.rbi +39212 -0
- data/sorbet/rbi/gems/racc@1.8.0.rbi +162 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
- data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
- data/sorbet/rbi/gems/rexml@3.3.1.rbi +4813 -0
- data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7015 -0
- data/sorbet/rbi/gems/rubocop@1.65.0.rbi +58191 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/spoom@1.3.3.rbi +4926 -0
- data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
- data/sorbet/rbi/gems/tapioca@0.15.1.rbi +3566 -0
- data/sorbet/rbi/gems/thor@1.3.1.rbi +4352 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.36.rbi +18221 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +105 -0
@@ -0,0 +1,3078 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `rbi` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem rbi`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://rbi//lib/rbi/loc.rb#4
|
9
|
+
module RBI; end
|
10
|
+
|
11
|
+
# source://rbi//lib/rbi/model.rb#1041
|
12
|
+
class RBI::Arg < ::RBI::Node
|
13
|
+
# source://rbi//lib/rbi/model.rb#1053
|
14
|
+
sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
|
15
|
+
def initialize(value, loc: T.unsafe(nil)); end
|
16
|
+
|
17
|
+
# source://rbi//lib/rbi/model.rb#1059
|
18
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
19
|
+
def ==(other); end
|
20
|
+
|
21
|
+
# source://rbi//lib/rbi/printer.rb#613
|
22
|
+
sig { override.params(v: ::RBI::Printer).void }
|
23
|
+
def accept_printer(v); end
|
24
|
+
|
25
|
+
# source://rbi//lib/rbi/model.rb#1064
|
26
|
+
sig { returns(::String) }
|
27
|
+
def to_s; end
|
28
|
+
|
29
|
+
# source://rbi//lib/rbi/model.rb#1045
|
30
|
+
sig { returns(::String) }
|
31
|
+
def value; end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attributes
|
35
|
+
#
|
36
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
37
|
+
#
|
38
|
+
# source://rbi//lib/rbi/model.rb#349
|
39
|
+
class RBI::Attr < ::RBI::NodeWithComments
|
40
|
+
include ::RBI::Indexable
|
41
|
+
|
42
|
+
abstract!
|
43
|
+
|
44
|
+
# source://rbi//lib/rbi/model.rb#374
|
45
|
+
sig do
|
46
|
+
params(
|
47
|
+
name: ::Symbol,
|
48
|
+
names: T::Array[::Symbol],
|
49
|
+
visibility: ::RBI::Visibility,
|
50
|
+
sigs: T::Array[::RBI::Sig],
|
51
|
+
loc: T.nilable(::RBI::Loc),
|
52
|
+
comments: T::Array[::RBI::Comment]
|
53
|
+
).void
|
54
|
+
end
|
55
|
+
def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
56
|
+
|
57
|
+
# source://rbi//lib/rbi/printer.rb#348
|
58
|
+
sig { override.params(v: ::RBI::Printer).void }
|
59
|
+
def accept_printer(v); end
|
60
|
+
|
61
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#412
|
62
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
63
|
+
def compatible_with?(other); end
|
64
|
+
|
65
|
+
# @abstract
|
66
|
+
#
|
67
|
+
# source://rbi//lib/rbi/model.rb#382
|
68
|
+
sig { abstract.returns(T::Array[::String]) }
|
69
|
+
def fully_qualified_names; end
|
70
|
+
|
71
|
+
# source://rbi//lib/rbi/index.rb#113
|
72
|
+
sig { override.returns(T::Array[::String]) }
|
73
|
+
def index_ids; end
|
74
|
+
|
75
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#420
|
76
|
+
sig { override.params(other: ::RBI::Node).void }
|
77
|
+
def merge_with(other); end
|
78
|
+
|
79
|
+
# source://rbi//lib/rbi/model.rb#356
|
80
|
+
sig { returns(T::Array[::Symbol]) }
|
81
|
+
def names; end
|
82
|
+
|
83
|
+
# source://rbi//lib/rbi/printer.rb#375
|
84
|
+
sig { override.returns(T::Boolean) }
|
85
|
+
def oneline?; end
|
86
|
+
|
87
|
+
# source://rbi//lib/rbi/model.rb#362
|
88
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
89
|
+
def sigs; end
|
90
|
+
|
91
|
+
# source://rbi//lib/rbi/model.rb#359
|
92
|
+
sig { returns(::RBI::Visibility) }
|
93
|
+
def visibility; end
|
94
|
+
|
95
|
+
# @return [Visibility]
|
96
|
+
#
|
97
|
+
# source://rbi//lib/rbi/model.rb#359
|
98
|
+
def visibility=(_arg0); end
|
99
|
+
end
|
100
|
+
|
101
|
+
# source://rbi//lib/rbi/model.rb#385
|
102
|
+
class RBI::AttrAccessor < ::RBI::Attr
|
103
|
+
# source://rbi//lib/rbi/model.rb#399
|
104
|
+
sig do
|
105
|
+
params(
|
106
|
+
name: ::Symbol,
|
107
|
+
names: ::Symbol,
|
108
|
+
visibility: ::RBI::Visibility,
|
109
|
+
sigs: T::Array[::RBI::Sig],
|
110
|
+
loc: T.nilable(::RBI::Loc),
|
111
|
+
comments: T::Array[::RBI::Comment],
|
112
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
|
113
|
+
).void
|
114
|
+
end
|
115
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
116
|
+
|
117
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#452
|
118
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
119
|
+
def compatible_with?(other); end
|
120
|
+
|
121
|
+
# source://rbi//lib/rbi/model.rb#405
|
122
|
+
sig { override.returns(T::Array[::String]) }
|
123
|
+
def fully_qualified_names; end
|
124
|
+
|
125
|
+
# source://rbi//lib/rbi/model.rb#411
|
126
|
+
sig { override.returns(::String) }
|
127
|
+
def to_s; end
|
128
|
+
end
|
129
|
+
|
130
|
+
# source://rbi//lib/rbi/model.rb#417
|
131
|
+
class RBI::AttrReader < ::RBI::Attr
|
132
|
+
# source://rbi//lib/rbi/model.rb#431
|
133
|
+
sig do
|
134
|
+
params(
|
135
|
+
name: ::Symbol,
|
136
|
+
names: ::Symbol,
|
137
|
+
visibility: ::RBI::Visibility,
|
138
|
+
sigs: T::Array[::RBI::Sig],
|
139
|
+
loc: T.nilable(::RBI::Loc),
|
140
|
+
comments: T::Array[::RBI::Comment],
|
141
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
|
142
|
+
).void
|
143
|
+
end
|
144
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
145
|
+
|
146
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#434
|
147
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
148
|
+
def compatible_with?(other); end
|
149
|
+
|
150
|
+
# source://rbi//lib/rbi/model.rb#437
|
151
|
+
sig { override.returns(T::Array[::String]) }
|
152
|
+
def fully_qualified_names; end
|
153
|
+
|
154
|
+
# source://rbi//lib/rbi/model.rb#443
|
155
|
+
sig { override.returns(::String) }
|
156
|
+
def to_s; end
|
157
|
+
end
|
158
|
+
|
159
|
+
# source://rbi//lib/rbi/model.rb#449
|
160
|
+
class RBI::AttrWriter < ::RBI::Attr
|
161
|
+
# source://rbi//lib/rbi/model.rb#463
|
162
|
+
sig do
|
163
|
+
params(
|
164
|
+
name: ::Symbol,
|
165
|
+
names: ::Symbol,
|
166
|
+
visibility: ::RBI::Visibility,
|
167
|
+
sigs: T::Array[::RBI::Sig],
|
168
|
+
loc: T.nilable(::RBI::Loc),
|
169
|
+
comments: T::Array[::RBI::Comment],
|
170
|
+
block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
|
171
|
+
).void
|
172
|
+
end
|
173
|
+
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
174
|
+
|
175
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#443
|
176
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
177
|
+
def compatible_with?(other); end
|
178
|
+
|
179
|
+
# source://rbi//lib/rbi/model.rb#469
|
180
|
+
sig { override.returns(T::Array[::String]) }
|
181
|
+
def fully_qualified_names; end
|
182
|
+
|
183
|
+
# source://rbi//lib/rbi/model.rb#475
|
184
|
+
sig { override.returns(::String) }
|
185
|
+
def to_s; end
|
186
|
+
end
|
187
|
+
|
188
|
+
# An arbitrary blank line that can be added both in trees and comments
|
189
|
+
#
|
190
|
+
# source://rbi//lib/rbi/model.rb#74
|
191
|
+
class RBI::BlankLine < ::RBI::Comment
|
192
|
+
# source://rbi//lib/rbi/model.rb#78
|
193
|
+
sig { params(loc: T.nilable(::RBI::Loc)).void }
|
194
|
+
def initialize(loc: T.unsafe(nil)); end
|
195
|
+
|
196
|
+
# source://rbi//lib/rbi/printer.rb#217
|
197
|
+
sig { override.params(v: ::RBI::Printer).void }
|
198
|
+
def accept_printer(v); end
|
199
|
+
end
|
200
|
+
|
201
|
+
# source://rbi//lib/rbi/model.rb#814
|
202
|
+
class RBI::BlockParam < ::RBI::Param
|
203
|
+
# source://rbi//lib/rbi/model.rb#825
|
204
|
+
sig do
|
205
|
+
params(
|
206
|
+
name: ::String,
|
207
|
+
loc: T.nilable(::RBI::Loc),
|
208
|
+
comments: T::Array[::RBI::Comment],
|
209
|
+
block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
|
210
|
+
).void
|
211
|
+
end
|
212
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
213
|
+
|
214
|
+
# source://rbi//lib/rbi/model.rb#836
|
215
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
216
|
+
def ==(other); end
|
217
|
+
|
218
|
+
# source://rbi//lib/rbi/printer.rb#543
|
219
|
+
sig { override.params(v: ::RBI::Printer).void }
|
220
|
+
def accept_printer(v); end
|
221
|
+
|
222
|
+
# source://rbi//lib/rbi/printer.rb#548
|
223
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
224
|
+
def print_comment_leading_space(v, last:); end
|
225
|
+
|
226
|
+
# source://rbi//lib/rbi/model.rb#831
|
227
|
+
sig { override.returns(::String) }
|
228
|
+
def to_s; end
|
229
|
+
end
|
230
|
+
|
231
|
+
# source://rbi//lib/rbi/model.rb#218
|
232
|
+
class RBI::Class < ::RBI::Scope
|
233
|
+
# source://rbi//lib/rbi/model.rb#236
|
234
|
+
sig do
|
235
|
+
params(
|
236
|
+
name: ::String,
|
237
|
+
superclass_name: T.nilable(::String),
|
238
|
+
loc: T.nilable(::RBI::Loc),
|
239
|
+
comments: T::Array[::RBI::Comment],
|
240
|
+
block: T.nilable(T.proc.params(node: ::RBI::Class).void)
|
241
|
+
).void
|
242
|
+
end
|
243
|
+
def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
244
|
+
|
245
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#376
|
246
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
247
|
+
def compatible_with?(other); end
|
248
|
+
|
249
|
+
# source://rbi//lib/rbi/model.rb#244
|
250
|
+
sig { override.returns(::String) }
|
251
|
+
def fully_qualified_name; end
|
252
|
+
|
253
|
+
# source://rbi//lib/rbi/model.rb#222
|
254
|
+
sig { returns(::String) }
|
255
|
+
def name; end
|
256
|
+
|
257
|
+
# @return [String]
|
258
|
+
#
|
259
|
+
# source://rbi//lib/rbi/model.rb#222
|
260
|
+
def name=(_arg0); end
|
261
|
+
|
262
|
+
# source://rbi//lib/rbi/printer.rb#284
|
263
|
+
sig { override.params(v: ::RBI::Printer).void }
|
264
|
+
def print_header(v); end
|
265
|
+
|
266
|
+
# source://rbi//lib/rbi/model.rb#225
|
267
|
+
sig { returns(T.nilable(::String)) }
|
268
|
+
def superclass_name; end
|
269
|
+
|
270
|
+
# @return [String, nil]
|
271
|
+
#
|
272
|
+
# source://rbi//lib/rbi/model.rb#225
|
273
|
+
def superclass_name=(_arg0); end
|
274
|
+
end
|
275
|
+
|
276
|
+
# source://rbi//lib/rbi/model.rb#53
|
277
|
+
class RBI::Comment < ::RBI::Node
|
278
|
+
# source://rbi//lib/rbi/model.rb#60
|
279
|
+
sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
|
280
|
+
def initialize(text, loc: T.unsafe(nil)); end
|
281
|
+
|
282
|
+
# source://rbi//lib/rbi/model.rb#66
|
283
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
284
|
+
def ==(other); end
|
285
|
+
|
286
|
+
# source://rbi//lib/rbi/printer.rb#197
|
287
|
+
sig { override.params(v: ::RBI::Printer).void }
|
288
|
+
def accept_printer(v); end
|
289
|
+
|
290
|
+
# source://rbi//lib/rbi/model.rb#57
|
291
|
+
sig { returns(::String) }
|
292
|
+
def text; end
|
293
|
+
|
294
|
+
# @return [String]
|
295
|
+
#
|
296
|
+
# source://rbi//lib/rbi/model.rb#57
|
297
|
+
def text=(_arg0); end
|
298
|
+
end
|
299
|
+
|
300
|
+
# A tree showing incompatibles nodes
|
301
|
+
#
|
302
|
+
# Is rendered as a merge conflict between `left` and` right`:
|
303
|
+
# ~~~rb
|
304
|
+
# class Foo
|
305
|
+
# <<<<<<< left
|
306
|
+
# def m1; end
|
307
|
+
# def m2(a); end
|
308
|
+
# =======
|
309
|
+
# def m1(a); end
|
310
|
+
# def m2; end
|
311
|
+
# >>>>>>> right
|
312
|
+
# end
|
313
|
+
# ~~~
|
314
|
+
#
|
315
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#589
|
316
|
+
class RBI::ConflictTree < ::RBI::Tree
|
317
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#596
|
318
|
+
sig { params(left_name: ::String, right_name: ::String).void }
|
319
|
+
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
|
320
|
+
|
321
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#607
|
322
|
+
sig { override.params(v: ::RBI::Printer).void }
|
323
|
+
def accept_printer(v); end
|
324
|
+
|
325
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#593
|
326
|
+
sig { returns(::RBI::Tree) }
|
327
|
+
def left; end
|
328
|
+
|
329
|
+
# @return [Tree]
|
330
|
+
#
|
331
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#593
|
332
|
+
def right; end
|
333
|
+
end
|
334
|
+
|
335
|
+
# Consts
|
336
|
+
#
|
337
|
+
# source://rbi//lib/rbi/model.rb#312
|
338
|
+
class RBI::Const < ::RBI::NodeWithComments
|
339
|
+
include ::RBI::Indexable
|
340
|
+
|
341
|
+
# source://rbi//lib/rbi/model.rb#327
|
342
|
+
sig do
|
343
|
+
params(
|
344
|
+
name: ::String,
|
345
|
+
value: ::String,
|
346
|
+
loc: T.nilable(::RBI::Loc),
|
347
|
+
comments: T::Array[::RBI::Comment],
|
348
|
+
block: T.nilable(T.proc.params(node: ::RBI::Const).void)
|
349
|
+
).void
|
350
|
+
end
|
351
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
352
|
+
|
353
|
+
# source://rbi//lib/rbi/printer.rb#335
|
354
|
+
sig { override.params(v: ::RBI::Printer).void }
|
355
|
+
def accept_printer(v); end
|
356
|
+
|
357
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#403
|
358
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
359
|
+
def compatible_with?(other); end
|
360
|
+
|
361
|
+
# source://rbi//lib/rbi/model.rb#335
|
362
|
+
sig { returns(::String) }
|
363
|
+
def fully_qualified_name; end
|
364
|
+
|
365
|
+
# source://rbi//lib/rbi/index.rb#103
|
366
|
+
sig { override.returns(T::Array[::String]) }
|
367
|
+
def index_ids; end
|
368
|
+
|
369
|
+
# source://rbi//lib/rbi/model.rb#316
|
370
|
+
sig { returns(::String) }
|
371
|
+
def name; end
|
372
|
+
|
373
|
+
# source://rbi//lib/rbi/model.rb#342
|
374
|
+
sig { override.returns(::String) }
|
375
|
+
def to_s; end
|
376
|
+
|
377
|
+
# @return [String]
|
378
|
+
#
|
379
|
+
# source://rbi//lib/rbi/model.rb#316
|
380
|
+
def value; end
|
381
|
+
end
|
382
|
+
|
383
|
+
# source://rbi//lib/rbi/model.rb#889
|
384
|
+
class RBI::Extend < ::RBI::Mixin
|
385
|
+
include ::RBI::Indexable
|
386
|
+
|
387
|
+
# source://rbi//lib/rbi/model.rb#901
|
388
|
+
sig do
|
389
|
+
params(
|
390
|
+
name: ::String,
|
391
|
+
names: ::String,
|
392
|
+
loc: T.nilable(::RBI::Loc),
|
393
|
+
comments: T::Array[::RBI::Comment],
|
394
|
+
block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
|
395
|
+
).void
|
396
|
+
end
|
397
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
398
|
+
|
399
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#502
|
400
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
401
|
+
def compatible_with?(other); end
|
402
|
+
|
403
|
+
# source://rbi//lib/rbi/index.rb#143
|
404
|
+
sig { override.returns(T::Array[::String]) }
|
405
|
+
def index_ids; end
|
406
|
+
|
407
|
+
# source://rbi//lib/rbi/model.rb#907
|
408
|
+
sig { override.returns(::String) }
|
409
|
+
def to_s; end
|
410
|
+
end
|
411
|
+
|
412
|
+
# source://rbi//lib/rbi/model.rb#137
|
413
|
+
class RBI::File
|
414
|
+
# source://rbi//lib/rbi/model.rb#156
|
415
|
+
sig do
|
416
|
+
params(
|
417
|
+
strictness: T.nilable(::String),
|
418
|
+
comments: T::Array[::RBI::Comment],
|
419
|
+
block: T.nilable(T.proc.params(file: ::RBI::File).void)
|
420
|
+
).void
|
421
|
+
end
|
422
|
+
def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
423
|
+
|
424
|
+
# source://rbi//lib/rbi/model.rb#164
|
425
|
+
sig { params(node: ::RBI::Node).void }
|
426
|
+
def <<(node); end
|
427
|
+
|
428
|
+
# source://rbi//lib/rbi/printer.rb#105
|
429
|
+
sig { params(v: ::RBI::Printer).void }
|
430
|
+
def accept_printer(v); end
|
431
|
+
|
432
|
+
# source://rbi//lib/rbi/model.rb#147
|
433
|
+
sig { returns(T::Array[::RBI::Comment]) }
|
434
|
+
def comments; end
|
435
|
+
|
436
|
+
# @return [Array<Comment>]
|
437
|
+
#
|
438
|
+
# source://rbi//lib/rbi/model.rb#147
|
439
|
+
def comments=(_arg0); end
|
440
|
+
|
441
|
+
# source://rbi//lib/rbi/model.rb#169
|
442
|
+
sig { returns(T::Boolean) }
|
443
|
+
def empty?; end
|
444
|
+
|
445
|
+
# source://rbi//lib/rbi/printer.rb#129
|
446
|
+
sig do
|
447
|
+
params(
|
448
|
+
out: T.any(::IO, ::StringIO),
|
449
|
+
indent: ::Integer,
|
450
|
+
print_locs: T::Boolean,
|
451
|
+
max_line_length: T.nilable(::Integer)
|
452
|
+
).void
|
453
|
+
end
|
454
|
+
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
455
|
+
|
456
|
+
# source://rbi//lib/rbi/model.rb#141
|
457
|
+
sig { returns(::RBI::Tree) }
|
458
|
+
def root; end
|
459
|
+
|
460
|
+
# @return [Tree]
|
461
|
+
#
|
462
|
+
# source://rbi//lib/rbi/model.rb#141
|
463
|
+
def root=(_arg0); end
|
464
|
+
|
465
|
+
# source://rbi//lib/rbi/model.rb#144
|
466
|
+
sig { returns(T.nilable(::String)) }
|
467
|
+
def strictness; end
|
468
|
+
|
469
|
+
# @return [String, nil]
|
470
|
+
#
|
471
|
+
# source://rbi//lib/rbi/model.rb#144
|
472
|
+
def strictness=(_arg0); end
|
473
|
+
|
474
|
+
# source://rbi//lib/rbi/printer.rb#135
|
475
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
476
|
+
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
477
|
+
end
|
478
|
+
|
479
|
+
# source://rbi//lib/rbi/formatter.rb#5
|
480
|
+
class RBI::Formatter
|
481
|
+
# source://rbi//lib/rbi/formatter.rb#36
|
482
|
+
sig do
|
483
|
+
params(
|
484
|
+
add_sig_templates: T::Boolean,
|
485
|
+
group_nodes: T::Boolean,
|
486
|
+
max_line_length: T.nilable(::Integer),
|
487
|
+
nest_singleton_methods: T::Boolean,
|
488
|
+
nest_non_public_methods: T::Boolean,
|
489
|
+
sort_nodes: T::Boolean
|
490
|
+
).void
|
491
|
+
end
|
492
|
+
def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
|
493
|
+
|
494
|
+
# source://rbi//lib/rbi/formatter.rb#15
|
495
|
+
sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) }
|
496
|
+
def add_sig_templates=(add_sig_templates); end
|
497
|
+
|
498
|
+
# source://rbi//lib/rbi/formatter.rb#59
|
499
|
+
sig { params(file: ::RBI::File).void }
|
500
|
+
def format_file(file); end
|
501
|
+
|
502
|
+
# source://rbi//lib/rbi/formatter.rb#64
|
503
|
+
sig { params(tree: ::RBI::Tree).void }
|
504
|
+
def format_tree(tree); end
|
505
|
+
|
506
|
+
# source://rbi//lib/rbi/formatter.rb#18
|
507
|
+
sig { params(group_nodes: T::Boolean).returns(T::Boolean) }
|
508
|
+
def group_nodes=(group_nodes); end
|
509
|
+
|
510
|
+
# source://rbi//lib/rbi/formatter.rb#24
|
511
|
+
sig { returns(T.nilable(::Integer)) }
|
512
|
+
def max_line_length; end
|
513
|
+
|
514
|
+
# @return [Integer, nil]
|
515
|
+
#
|
516
|
+
# source://rbi//lib/rbi/formatter.rb#24
|
517
|
+
def max_line_length=(_arg0); end
|
518
|
+
|
519
|
+
# source://rbi//lib/rbi/formatter.rb#21
|
520
|
+
sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) }
|
521
|
+
def nest_non_public_methods=(nest_non_public_methods); end
|
522
|
+
|
523
|
+
# source://rbi//lib/rbi/formatter.rb#12
|
524
|
+
sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) }
|
525
|
+
def nest_singleton_methods=(nest_singleton_methods); end
|
526
|
+
|
527
|
+
# source://rbi//lib/rbi/formatter.rb#53
|
528
|
+
sig { params(file: ::RBI::File).returns(::String) }
|
529
|
+
def print_file(file); end
|
530
|
+
|
531
|
+
# source://rbi//lib/rbi/formatter.rb#9
|
532
|
+
sig { params(sort_nodes: T::Boolean).returns(T::Boolean) }
|
533
|
+
def sort_nodes=(sort_nodes); end
|
534
|
+
end
|
535
|
+
|
536
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#88
|
537
|
+
class RBI::Group < ::RBI::Tree
|
538
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#95
|
539
|
+
sig { params(kind: ::RBI::Group::Kind).void }
|
540
|
+
def initialize(kind); end
|
541
|
+
|
542
|
+
# source://rbi//lib/rbi/printer.rb#838
|
543
|
+
sig { override.params(v: ::RBI::Printer).void }
|
544
|
+
def accept_printer(v); end
|
545
|
+
|
546
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#92
|
547
|
+
sig { returns(::RBI::Group::Kind) }
|
548
|
+
def kind; end
|
549
|
+
end
|
550
|
+
|
551
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#100
|
552
|
+
class RBI::Group::Kind < ::T::Enum
|
553
|
+
enums do
|
554
|
+
Mixins = new
|
555
|
+
RequiredAncestors = new
|
556
|
+
Helpers = new
|
557
|
+
TypeMembers = new
|
558
|
+
MixesInClassMethods = new
|
559
|
+
Sends = new
|
560
|
+
Attrs = new
|
561
|
+
TStructFields = new
|
562
|
+
TEnums = new
|
563
|
+
Inits = new
|
564
|
+
Methods = new
|
565
|
+
SingletonClasses = new
|
566
|
+
Consts = new
|
567
|
+
end
|
568
|
+
end
|
569
|
+
|
570
|
+
# Sorbet's misc.
|
571
|
+
#
|
572
|
+
# source://rbi//lib/rbi/model.rb#1372
|
573
|
+
class RBI::Helper < ::RBI::NodeWithComments
|
574
|
+
include ::RBI::Indexable
|
575
|
+
|
576
|
+
# source://rbi//lib/rbi/model.rb#1386
|
577
|
+
sig do
|
578
|
+
params(
|
579
|
+
name: ::String,
|
580
|
+
loc: T.nilable(::RBI::Loc),
|
581
|
+
comments: T::Array[::RBI::Comment],
|
582
|
+
block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
|
583
|
+
).void
|
584
|
+
end
|
585
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
586
|
+
|
587
|
+
# source://rbi//lib/rbi/printer.rb#825
|
588
|
+
sig { override.params(v: ::RBI::Printer).void }
|
589
|
+
def accept_printer(v); end
|
590
|
+
|
591
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#520
|
592
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
593
|
+
def compatible_with?(other); end
|
594
|
+
|
595
|
+
# source://rbi//lib/rbi/index.rb#173
|
596
|
+
sig { override.returns(T::Array[::String]) }
|
597
|
+
def index_ids; end
|
598
|
+
|
599
|
+
# source://rbi//lib/rbi/model.rb#1376
|
600
|
+
sig { returns(::String) }
|
601
|
+
def name; end
|
602
|
+
|
603
|
+
# source://rbi//lib/rbi/model.rb#1393
|
604
|
+
sig { override.returns(::String) }
|
605
|
+
def to_s; end
|
606
|
+
end
|
607
|
+
|
608
|
+
# source://rbi//lib/rbi/model.rb#866
|
609
|
+
class RBI::Include < ::RBI::Mixin
|
610
|
+
include ::RBI::Indexable
|
611
|
+
|
612
|
+
# source://rbi//lib/rbi/model.rb#878
|
613
|
+
sig do
|
614
|
+
params(
|
615
|
+
name: ::String,
|
616
|
+
names: ::String,
|
617
|
+
loc: T.nilable(::RBI::Loc),
|
618
|
+
comments: T::Array[::RBI::Comment],
|
619
|
+
block: T.nilable(T.proc.params(node: ::RBI::Include).void)
|
620
|
+
).void
|
621
|
+
end
|
622
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
623
|
+
|
624
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#493
|
625
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
626
|
+
def compatible_with?(other); end
|
627
|
+
|
628
|
+
# source://rbi//lib/rbi/index.rb#133
|
629
|
+
sig { override.returns(T::Array[::String]) }
|
630
|
+
def index_ids; end
|
631
|
+
|
632
|
+
# source://rbi//lib/rbi/model.rb#884
|
633
|
+
sig { override.returns(::String) }
|
634
|
+
def to_s; end
|
635
|
+
end
|
636
|
+
|
637
|
+
# source://rbi//lib/rbi/index.rb#5
|
638
|
+
class RBI::Index < ::RBI::Visitor
|
639
|
+
# source://rbi//lib/rbi/index.rb#21
|
640
|
+
sig { void }
|
641
|
+
def initialize; end
|
642
|
+
|
643
|
+
# source://rbi//lib/rbi/index.rb#32
|
644
|
+
sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
|
645
|
+
def [](id); end
|
646
|
+
|
647
|
+
# source://rbi//lib/rbi/index.rb#37
|
648
|
+
sig { params(nodes: ::RBI::Node).void }
|
649
|
+
def index(*nodes); end
|
650
|
+
|
651
|
+
# source://rbi//lib/rbi/index.rb#27
|
652
|
+
sig { returns(T::Array[::String]) }
|
653
|
+
def keys; end
|
654
|
+
|
655
|
+
# source://rbi//lib/rbi/index.rb#42
|
656
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
657
|
+
def visit(node); end
|
658
|
+
|
659
|
+
private
|
660
|
+
|
661
|
+
# source://rbi//lib/rbi/index.rb#59
|
662
|
+
sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
|
663
|
+
def index_node(node); end
|
664
|
+
|
665
|
+
class << self
|
666
|
+
# source://rbi//lib/rbi/index.rb#13
|
667
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Index) }
|
668
|
+
def index(*node); end
|
669
|
+
end
|
670
|
+
end
|
671
|
+
|
672
|
+
# A Node that can be referred to by a unique ID inside an index
|
673
|
+
#
|
674
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
675
|
+
#
|
676
|
+
# source://rbi//lib/rbi/index.rb#74
|
677
|
+
module RBI::Indexable
|
678
|
+
interface!
|
679
|
+
|
680
|
+
# Unique IDs that refer to this node.
|
681
|
+
#
|
682
|
+
# Some nodes can have multiple ids, for example an attribute accessor matches the ID of the
|
683
|
+
# getter and the setter.
|
684
|
+
#
|
685
|
+
# @abstract
|
686
|
+
#
|
687
|
+
# source://rbi//lib/rbi/index.rb#85
|
688
|
+
sig { abstract.returns(T::Array[::String]) }
|
689
|
+
def index_ids; end
|
690
|
+
end
|
691
|
+
|
692
|
+
# source://rbi//lib/rbi/model.rb#1069
|
693
|
+
class RBI::KwArg < ::RBI::Arg
|
694
|
+
# source://rbi//lib/rbi/model.rb#1082
|
695
|
+
sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
|
696
|
+
def initialize(keyword, value, loc: T.unsafe(nil)); end
|
697
|
+
|
698
|
+
# source://rbi//lib/rbi/model.rb#1088
|
699
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
700
|
+
def ==(other); end
|
701
|
+
|
702
|
+
# source://rbi//lib/rbi/printer.rb#622
|
703
|
+
sig { override.params(v: ::RBI::Printer).void }
|
704
|
+
def accept_printer(v); end
|
705
|
+
|
706
|
+
# source://rbi//lib/rbi/model.rb#1073
|
707
|
+
sig { returns(::String) }
|
708
|
+
def keyword; end
|
709
|
+
|
710
|
+
# source://rbi//lib/rbi/model.rb#1093
|
711
|
+
sig { returns(::String) }
|
712
|
+
def to_s; end
|
713
|
+
end
|
714
|
+
|
715
|
+
# source://rbi//lib/rbi/model.rb#755
|
716
|
+
class RBI::KwOptParam < ::RBI::Param
|
717
|
+
# source://rbi//lib/rbi/model.rb#770
|
718
|
+
sig do
|
719
|
+
params(
|
720
|
+
name: ::String,
|
721
|
+
value: ::String,
|
722
|
+
loc: T.nilable(::RBI::Loc),
|
723
|
+
comments: T::Array[::RBI::Comment],
|
724
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
|
725
|
+
).void
|
726
|
+
end
|
727
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
728
|
+
|
729
|
+
# source://rbi//lib/rbi/model.rb#782
|
730
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
731
|
+
def ==(other); end
|
732
|
+
|
733
|
+
# source://rbi//lib/rbi/printer.rb#513
|
734
|
+
sig { override.params(v: ::RBI::Printer).void }
|
735
|
+
def accept_printer(v); end
|
736
|
+
|
737
|
+
# source://rbi//lib/rbi/printer.rb#518
|
738
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
739
|
+
def print_comment_leading_space(v, last:); end
|
740
|
+
|
741
|
+
# source://rbi//lib/rbi/model.rb#777
|
742
|
+
sig { override.returns(::String) }
|
743
|
+
def to_s; end
|
744
|
+
|
745
|
+
# source://rbi//lib/rbi/model.rb#759
|
746
|
+
sig { returns(::String) }
|
747
|
+
def value; end
|
748
|
+
end
|
749
|
+
|
750
|
+
# source://rbi//lib/rbi/model.rb#728
|
751
|
+
class RBI::KwParam < ::RBI::Param
|
752
|
+
# source://rbi//lib/rbi/model.rb#739
|
753
|
+
sig do
|
754
|
+
params(
|
755
|
+
name: ::String,
|
756
|
+
loc: T.nilable(::RBI::Loc),
|
757
|
+
comments: T::Array[::RBI::Comment],
|
758
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
|
759
|
+
).void
|
760
|
+
end
|
761
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
762
|
+
|
763
|
+
# source://rbi//lib/rbi/model.rb#750
|
764
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
765
|
+
def ==(other); end
|
766
|
+
|
767
|
+
# source://rbi//lib/rbi/printer.rb#498
|
768
|
+
sig { override.params(v: ::RBI::Printer).void }
|
769
|
+
def accept_printer(v); end
|
770
|
+
|
771
|
+
# source://rbi//lib/rbi/printer.rb#503
|
772
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
773
|
+
def print_comment_leading_space(v, last:); end
|
774
|
+
|
775
|
+
# source://rbi//lib/rbi/model.rb#745
|
776
|
+
sig { override.returns(::String) }
|
777
|
+
def to_s; end
|
778
|
+
end
|
779
|
+
|
780
|
+
# source://rbi//lib/rbi/model.rb#787
|
781
|
+
class RBI::KwRestParam < ::RBI::Param
|
782
|
+
# source://rbi//lib/rbi/model.rb#798
|
783
|
+
sig do
|
784
|
+
params(
|
785
|
+
name: ::String,
|
786
|
+
loc: T.nilable(::RBI::Loc),
|
787
|
+
comments: T::Array[::RBI::Comment],
|
788
|
+
block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
|
789
|
+
).void
|
790
|
+
end
|
791
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
792
|
+
|
793
|
+
# source://rbi//lib/rbi/model.rb#809
|
794
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
795
|
+
def ==(other); end
|
796
|
+
|
797
|
+
# source://rbi//lib/rbi/printer.rb#528
|
798
|
+
sig { override.params(v: ::RBI::Printer).void }
|
799
|
+
def accept_printer(v); end
|
800
|
+
|
801
|
+
# source://rbi//lib/rbi/printer.rb#533
|
802
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
803
|
+
def print_comment_leading_space(v, last:); end
|
804
|
+
|
805
|
+
# source://rbi//lib/rbi/model.rb#804
|
806
|
+
sig { override.returns(::String) }
|
807
|
+
def to_s; end
|
808
|
+
end
|
809
|
+
|
810
|
+
# source://rbi//lib/rbi/loc.rb#5
|
811
|
+
class RBI::Loc
|
812
|
+
# source://rbi//lib/rbi/loc.rb#38
|
813
|
+
sig do
|
814
|
+
params(
|
815
|
+
file: T.nilable(::String),
|
816
|
+
begin_line: T.nilable(::Integer),
|
817
|
+
end_line: T.nilable(::Integer),
|
818
|
+
begin_column: T.nilable(::Integer),
|
819
|
+
end_column: T.nilable(::Integer)
|
820
|
+
).void
|
821
|
+
end
|
822
|
+
def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
|
823
|
+
|
824
|
+
# @return [Integer, nil]
|
825
|
+
#
|
826
|
+
# source://rbi//lib/rbi/loc.rb#27
|
827
|
+
def begin_column; end
|
828
|
+
|
829
|
+
# source://rbi//lib/rbi/loc.rb#27
|
830
|
+
sig { returns(T.nilable(::Integer)) }
|
831
|
+
def begin_line; end
|
832
|
+
|
833
|
+
# @return [Integer, nil]
|
834
|
+
#
|
835
|
+
# source://rbi//lib/rbi/loc.rb#27
|
836
|
+
def end_column; end
|
837
|
+
|
838
|
+
# @return [Integer, nil]
|
839
|
+
#
|
840
|
+
# source://rbi//lib/rbi/loc.rb#27
|
841
|
+
def end_line; end
|
842
|
+
|
843
|
+
# source://rbi//lib/rbi/loc.rb#24
|
844
|
+
sig { returns(T.nilable(::String)) }
|
845
|
+
def file; end
|
846
|
+
|
847
|
+
# source://rbi//lib/rbi/loc.rb#56
|
848
|
+
sig { returns(T.nilable(::String)) }
|
849
|
+
def source; end
|
850
|
+
|
851
|
+
# source://rbi//lib/rbi/loc.rb#47
|
852
|
+
sig { returns(::String) }
|
853
|
+
def to_s; end
|
854
|
+
|
855
|
+
class << self
|
856
|
+
# source://rbi//lib/rbi/loc.rb#12
|
857
|
+
sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
|
858
|
+
def from_prism(file, prism_location); end
|
859
|
+
end
|
860
|
+
end
|
861
|
+
|
862
|
+
# A tree that _might_ contain conflicts
|
863
|
+
#
|
864
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#330
|
865
|
+
class RBI::MergeTree < ::RBI::Tree
|
866
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#344
|
867
|
+
sig do
|
868
|
+
params(
|
869
|
+
loc: T.nilable(::RBI::Loc),
|
870
|
+
comments: T::Array[::RBI::Comment],
|
871
|
+
conflicts: T::Array[::RBI::Rewriters::Merge::Conflict],
|
872
|
+
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
|
873
|
+
).void
|
874
|
+
end
|
875
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
|
876
|
+
|
877
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#334
|
878
|
+
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
|
879
|
+
def conflicts; end
|
880
|
+
end
|
881
|
+
|
882
|
+
# Methods and args
|
883
|
+
#
|
884
|
+
# source://rbi//lib/rbi/model.rb#483
|
885
|
+
class RBI::Method < ::RBI::NodeWithComments
|
886
|
+
include ::RBI::Indexable
|
887
|
+
|
888
|
+
# source://rbi//lib/rbi/model.rb#513
|
889
|
+
sig do
|
890
|
+
params(
|
891
|
+
name: ::String,
|
892
|
+
params: T::Array[::RBI::Param],
|
893
|
+
is_singleton: T::Boolean,
|
894
|
+
visibility: ::RBI::Visibility,
|
895
|
+
sigs: T::Array[::RBI::Sig],
|
896
|
+
loc: T.nilable(::RBI::Loc),
|
897
|
+
comments: T::Array[::RBI::Comment],
|
898
|
+
block: T.nilable(T.proc.params(node: ::RBI::Method).void)
|
899
|
+
).void
|
900
|
+
end
|
901
|
+
def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
902
|
+
|
903
|
+
# source://rbi//lib/rbi/model.rb#533
|
904
|
+
sig { params(param: ::RBI::Param).void }
|
905
|
+
def <<(param); end
|
906
|
+
|
907
|
+
# source://rbi//lib/rbi/printer.rb#384
|
908
|
+
sig { override.params(v: ::RBI::Printer).void }
|
909
|
+
def accept_printer(v); end
|
910
|
+
|
911
|
+
# source://rbi//lib/rbi/model.rb#568
|
912
|
+
sig { params(name: ::String).void }
|
913
|
+
def add_block_param(name); end
|
914
|
+
|
915
|
+
# source://rbi//lib/rbi/model.rb#558
|
916
|
+
sig { params(name: ::String, default_value: ::String).void }
|
917
|
+
def add_kw_opt_param(name, default_value); end
|
918
|
+
|
919
|
+
# source://rbi//lib/rbi/model.rb#553
|
920
|
+
sig { params(name: ::String).void }
|
921
|
+
def add_kw_param(name); end
|
922
|
+
|
923
|
+
# source://rbi//lib/rbi/model.rb#563
|
924
|
+
sig { params(name: ::String).void }
|
925
|
+
def add_kw_rest_param(name); end
|
926
|
+
|
927
|
+
# source://rbi//lib/rbi/model.rb#543
|
928
|
+
sig { params(name: ::String, default_value: ::String).void }
|
929
|
+
def add_opt_param(name, default_value); end
|
930
|
+
|
931
|
+
# source://rbi//lib/rbi/model.rb#538
|
932
|
+
sig { params(name: ::String).void }
|
933
|
+
def add_param(name); end
|
934
|
+
|
935
|
+
# source://rbi//lib/rbi/model.rb#548
|
936
|
+
sig { params(name: ::String).void }
|
937
|
+
def add_rest_param(name); end
|
938
|
+
|
939
|
+
# source://rbi//lib/rbi/model.rb#585
|
940
|
+
sig do
|
941
|
+
params(
|
942
|
+
params: T::Array[::RBI::SigParam],
|
943
|
+
return_type: T.nilable(::String),
|
944
|
+
is_abstract: T::Boolean,
|
945
|
+
is_override: T::Boolean,
|
946
|
+
is_overridable: T::Boolean,
|
947
|
+
is_final: T::Boolean,
|
948
|
+
type_params: T::Array[::String],
|
949
|
+
checked: T.nilable(::Symbol),
|
950
|
+
block: T.proc.params(node: ::RBI::Sig).void
|
951
|
+
).void
|
952
|
+
end
|
953
|
+
def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end
|
954
|
+
|
955
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#461
|
956
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
957
|
+
def compatible_with?(other); end
|
958
|
+
|
959
|
+
# source://rbi//lib/rbi/model.rb#611
|
960
|
+
sig { returns(::String) }
|
961
|
+
def fully_qualified_name; end
|
962
|
+
|
963
|
+
# source://rbi//lib/rbi/index.rb#123
|
964
|
+
sig { override.returns(T::Array[::String]) }
|
965
|
+
def index_ids; end
|
966
|
+
|
967
|
+
# source://rbi//lib/rbi/printer.rb#437
|
968
|
+
sig { returns(T::Boolean) }
|
969
|
+
def inline_params?; end
|
970
|
+
|
971
|
+
# source://rbi//lib/rbi/model.rb#493
|
972
|
+
sig { returns(T::Boolean) }
|
973
|
+
def is_singleton; end
|
974
|
+
|
975
|
+
# @return [Boolean]
|
976
|
+
#
|
977
|
+
# source://rbi//lib/rbi/model.rb#493
|
978
|
+
def is_singleton=(_arg0); end
|
979
|
+
|
980
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#470
|
981
|
+
sig { override.params(other: ::RBI::Node).void }
|
982
|
+
def merge_with(other); end
|
983
|
+
|
984
|
+
# source://rbi//lib/rbi/model.rb#487
|
985
|
+
sig { returns(::String) }
|
986
|
+
def name; end
|
987
|
+
|
988
|
+
# @return [String]
|
989
|
+
#
|
990
|
+
# source://rbi//lib/rbi/model.rb#487
|
991
|
+
def name=(_arg0); end
|
992
|
+
|
993
|
+
# source://rbi//lib/rbi/printer.rb#432
|
994
|
+
sig { override.returns(T::Boolean) }
|
995
|
+
def oneline?; end
|
996
|
+
|
997
|
+
# source://rbi//lib/rbi/model.rb#490
|
998
|
+
sig { returns(T::Array[::RBI::Param]) }
|
999
|
+
def params; end
|
1000
|
+
|
1001
|
+
# source://rbi//lib/rbi/model.rb#499
|
1002
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
1003
|
+
def sigs; end
|
1004
|
+
|
1005
|
+
# @return [Array<Sig>]
|
1006
|
+
#
|
1007
|
+
# source://rbi//lib/rbi/model.rb#499
|
1008
|
+
def sigs=(_arg0); end
|
1009
|
+
|
1010
|
+
# source://rbi//lib/rbi/model.rb#620
|
1011
|
+
sig { override.returns(::String) }
|
1012
|
+
def to_s; end
|
1013
|
+
|
1014
|
+
# source://rbi//lib/rbi/model.rb#496
|
1015
|
+
sig { returns(::RBI::Visibility) }
|
1016
|
+
def visibility; end
|
1017
|
+
|
1018
|
+
# @return [Visibility]
|
1019
|
+
#
|
1020
|
+
# source://rbi//lib/rbi/model.rb#496
|
1021
|
+
def visibility=(_arg0); end
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
# source://rbi//lib/rbi/model.rb#1433
|
1025
|
+
class RBI::MixesInClassMethods < ::RBI::Mixin
|
1026
|
+
include ::RBI::Indexable
|
1027
|
+
|
1028
|
+
# source://rbi//lib/rbi/model.rb#1445
|
1029
|
+
sig do
|
1030
|
+
params(
|
1031
|
+
name: ::String,
|
1032
|
+
names: ::String,
|
1033
|
+
loc: T.nilable(::RBI::Loc),
|
1034
|
+
comments: T::Array[::RBI::Comment],
|
1035
|
+
block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
|
1036
|
+
).void
|
1037
|
+
end
|
1038
|
+
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1039
|
+
|
1040
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#511
|
1041
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1042
|
+
def compatible_with?(other); end
|
1043
|
+
|
1044
|
+
# source://rbi//lib/rbi/index.rb#153
|
1045
|
+
sig { override.returns(T::Array[::String]) }
|
1046
|
+
def index_ids; end
|
1047
|
+
|
1048
|
+
# source://rbi//lib/rbi/model.rb#1451
|
1049
|
+
sig { override.returns(::String) }
|
1050
|
+
def to_s; end
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
# Mixins
|
1054
|
+
#
|
1055
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1056
|
+
#
|
1057
|
+
# source://rbi//lib/rbi/model.rb#843
|
1058
|
+
class RBI::Mixin < ::RBI::NodeWithComments
|
1059
|
+
abstract!
|
1060
|
+
|
1061
|
+
# source://rbi//lib/rbi/model.rb#860
|
1062
|
+
sig do
|
1063
|
+
params(
|
1064
|
+
name: ::String,
|
1065
|
+
names: T::Array[::String],
|
1066
|
+
loc: T.nilable(::RBI::Loc),
|
1067
|
+
comments: T::Array[::RBI::Comment]
|
1068
|
+
).void
|
1069
|
+
end
|
1070
|
+
def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1071
|
+
|
1072
|
+
# source://rbi//lib/rbi/printer.rb#558
|
1073
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1074
|
+
def accept_printer(v); end
|
1075
|
+
|
1076
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#484
|
1077
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1078
|
+
def compatible_with?(other); end
|
1079
|
+
|
1080
|
+
# source://rbi//lib/rbi/model.rb#850
|
1081
|
+
sig { returns(T::Array[::String]) }
|
1082
|
+
def names; end
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# source://rbi//lib/rbi/model.rb#190
|
1086
|
+
class RBI::Module < ::RBI::Scope
|
1087
|
+
# source://rbi//lib/rbi/model.rb#204
|
1088
|
+
sig do
|
1089
|
+
params(
|
1090
|
+
name: ::String,
|
1091
|
+
loc: T.nilable(::RBI::Loc),
|
1092
|
+
comments: T::Array[::RBI::Comment],
|
1093
|
+
block: T.nilable(T.proc.params(node: ::RBI::Module).void)
|
1094
|
+
).void
|
1095
|
+
end
|
1096
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1097
|
+
|
1098
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#385
|
1099
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
1100
|
+
def compatible_with?(other); end
|
1101
|
+
|
1102
|
+
# source://rbi//lib/rbi/model.rb#211
|
1103
|
+
sig { override.returns(::String) }
|
1104
|
+
def fully_qualified_name; end
|
1105
|
+
|
1106
|
+
# source://rbi//lib/rbi/model.rb#194
|
1107
|
+
sig { returns(::String) }
|
1108
|
+
def name; end
|
1109
|
+
|
1110
|
+
# @return [String]
|
1111
|
+
#
|
1112
|
+
# source://rbi//lib/rbi/model.rb#194
|
1113
|
+
def name=(_arg0); end
|
1114
|
+
|
1115
|
+
# source://rbi//lib/rbi/printer.rb#270
|
1116
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1117
|
+
def print_header(v); end
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1121
|
+
#
|
1122
|
+
# source://rbi//lib/rbi/model.rb#5
|
1123
|
+
class RBI::Node
|
1124
|
+
abstract!
|
1125
|
+
|
1126
|
+
# source://rbi//lib/rbi/model.rb#18
|
1127
|
+
sig { params(loc: T.nilable(::RBI::Loc)).void }
|
1128
|
+
def initialize(loc: T.unsafe(nil)); end
|
1129
|
+
|
1130
|
+
# @abstract
|
1131
|
+
#
|
1132
|
+
# source://rbi//lib/rbi/printer.rb#146
|
1133
|
+
sig { abstract.params(v: ::RBI::Printer).void }
|
1134
|
+
def accept_printer(v); end
|
1135
|
+
|
1136
|
+
# Can `self` and `_other` be merged into a single definition?
|
1137
|
+
#
|
1138
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#287
|
1139
|
+
sig { params(_other: ::RBI::Node).returns(T::Boolean) }
|
1140
|
+
def compatible_with?(_other); end
|
1141
|
+
|
1142
|
+
# source://rbi//lib/rbi/model.rb#24
|
1143
|
+
sig { void }
|
1144
|
+
def detach; end
|
1145
|
+
|
1146
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#48
|
1147
|
+
sig { returns(::RBI::Group::Kind) }
|
1148
|
+
def group_kind; end
|
1149
|
+
|
1150
|
+
# source://rbi//lib/rbi/model.rb#15
|
1151
|
+
sig { returns(T.nilable(::RBI::Loc)) }
|
1152
|
+
def loc; end
|
1153
|
+
|
1154
|
+
# @return [Loc, nil]
|
1155
|
+
#
|
1156
|
+
# source://rbi//lib/rbi/model.rb#15
|
1157
|
+
def loc=(_arg0); end
|
1158
|
+
|
1159
|
+
# Merge `self` and `other` into a single definition
|
1160
|
+
#
|
1161
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#293
|
1162
|
+
sig { params(other: ::RBI::Node).void }
|
1163
|
+
def merge_with(other); end
|
1164
|
+
|
1165
|
+
# source://rbi//lib/rbi/printer.rb#179
|
1166
|
+
sig { returns(T::Boolean) }
|
1167
|
+
def oneline?; end
|
1168
|
+
|
1169
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#296
|
1170
|
+
sig { returns(T.nilable(::RBI::ConflictTree)) }
|
1171
|
+
def parent_conflict_tree; end
|
1172
|
+
|
1173
|
+
# source://rbi//lib/rbi/model.rb#46
|
1174
|
+
sig { returns(T.nilable(::RBI::Scope)) }
|
1175
|
+
def parent_scope; end
|
1176
|
+
|
1177
|
+
# source://rbi//lib/rbi/model.rb#12
|
1178
|
+
sig { returns(T.nilable(::RBI::Tree)) }
|
1179
|
+
def parent_tree; end
|
1180
|
+
|
1181
|
+
# @return [Tree, nil]
|
1182
|
+
#
|
1183
|
+
# source://rbi//lib/rbi/model.rb#12
|
1184
|
+
def parent_tree=(_arg0); end
|
1185
|
+
|
1186
|
+
# source://rbi//lib/rbi/printer.rb#156
|
1187
|
+
sig do
|
1188
|
+
params(
|
1189
|
+
out: T.any(::IO, ::StringIO),
|
1190
|
+
indent: ::Integer,
|
1191
|
+
print_locs: T::Boolean,
|
1192
|
+
max_line_length: T.nilable(::Integer)
|
1193
|
+
).void
|
1194
|
+
end
|
1195
|
+
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1196
|
+
|
1197
|
+
# source://rbi//lib/rbi/printer.rb#169
|
1198
|
+
sig { params(v: ::RBI::Printer).void }
|
1199
|
+
def print_blank_line_before(v); end
|
1200
|
+
|
1201
|
+
# source://rbi//lib/rbi/model.rb#33
|
1202
|
+
sig { params(node: ::RBI::Node).void }
|
1203
|
+
def replace(node); end
|
1204
|
+
|
1205
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#94
|
1206
|
+
sig { params(version: ::Gem::Version).returns(T::Boolean) }
|
1207
|
+
def satisfies_version?(version); end
|
1208
|
+
|
1209
|
+
# source://rbi//lib/rbi/printer.rb#162
|
1210
|
+
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
|
1211
|
+
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1215
|
+
#
|
1216
|
+
# source://rbi//lib/rbi/model.rb#83
|
1217
|
+
class RBI::NodeWithComments < ::RBI::Node
|
1218
|
+
abstract!
|
1219
|
+
|
1220
|
+
# source://rbi//lib/rbi/model.rb#93
|
1221
|
+
sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
1222
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1223
|
+
|
1224
|
+
# source://rbi//lib/rbi/model.rb#99
|
1225
|
+
sig { returns(T::Array[::String]) }
|
1226
|
+
def annotations; end
|
1227
|
+
|
1228
|
+
# source://rbi//lib/rbi/model.rb#90
|
1229
|
+
sig { returns(T::Array[::RBI::Comment]) }
|
1230
|
+
def comments; end
|
1231
|
+
|
1232
|
+
# @return [Array<Comment>]
|
1233
|
+
#
|
1234
|
+
# source://rbi//lib/rbi/model.rb#90
|
1235
|
+
def comments=(_arg0); end
|
1236
|
+
|
1237
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#311
|
1238
|
+
sig { override.params(other: ::RBI::Node).void }
|
1239
|
+
def merge_with(other); end
|
1240
|
+
|
1241
|
+
# source://rbi//lib/rbi/printer.rb#188
|
1242
|
+
sig { override.returns(T::Boolean) }
|
1243
|
+
def oneline?; end
|
1244
|
+
|
1245
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#104
|
1246
|
+
sig { returns(T::Array[::Gem::Requirement]) }
|
1247
|
+
def version_requirements; end
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
# source://rbi//lib/rbi/model.rb#674
|
1251
|
+
class RBI::OptParam < ::RBI::Param
|
1252
|
+
# source://rbi//lib/rbi/model.rb#689
|
1253
|
+
sig do
|
1254
|
+
params(
|
1255
|
+
name: ::String,
|
1256
|
+
value: ::String,
|
1257
|
+
loc: T.nilable(::RBI::Loc),
|
1258
|
+
comments: T::Array[::RBI::Comment],
|
1259
|
+
block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
|
1260
|
+
).void
|
1261
|
+
end
|
1262
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1263
|
+
|
1264
|
+
# source://rbi//lib/rbi/model.rb#696
|
1265
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
1266
|
+
def ==(other); end
|
1267
|
+
|
1268
|
+
# source://rbi//lib/rbi/printer.rb#468
|
1269
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1270
|
+
def accept_printer(v); end
|
1271
|
+
|
1272
|
+
# source://rbi//lib/rbi/printer.rb#473
|
1273
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
1274
|
+
def print_comment_leading_space(v, last:); end
|
1275
|
+
|
1276
|
+
# source://rbi//lib/rbi/model.rb#678
|
1277
|
+
sig { returns(::String) }
|
1278
|
+
def value; end
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1282
|
+
#
|
1283
|
+
# source://rbi//lib/rbi/model.rb#625
|
1284
|
+
class RBI::Param < ::RBI::NodeWithComments
|
1285
|
+
abstract!
|
1286
|
+
|
1287
|
+
# source://rbi//lib/rbi/model.rb#641
|
1288
|
+
sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
1289
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1290
|
+
|
1291
|
+
# source://rbi//lib/rbi/printer.rb#446
|
1292
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1293
|
+
def accept_printer(v); end
|
1294
|
+
|
1295
|
+
# source://rbi//lib/rbi/printer.rb#459
|
1296
|
+
sig { returns(T::Array[::String]) }
|
1297
|
+
def comments_lines; end
|
1298
|
+
|
1299
|
+
# source://rbi//lib/rbi/model.rb#632
|
1300
|
+
sig { returns(::String) }
|
1301
|
+
def name; end
|
1302
|
+
|
1303
|
+
# source://rbi//lib/rbi/printer.rb#451
|
1304
|
+
sig { params(v: ::RBI::Printer, last: T::Boolean).void }
|
1305
|
+
def print_comment_leading_space(v, last:); end
|
1306
|
+
|
1307
|
+
# source://rbi//lib/rbi/model.rb#647
|
1308
|
+
sig { override.returns(::String) }
|
1309
|
+
def to_s; end
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
# source://rbi//lib/rbi/parser.rb#7
|
1313
|
+
class RBI::ParseError < ::StandardError
|
1314
|
+
# source://rbi//lib/rbi/parser.rb#14
|
1315
|
+
sig { params(message: ::String, location: ::RBI::Loc).void }
|
1316
|
+
def initialize(message, location); end
|
1317
|
+
|
1318
|
+
# source://rbi//lib/rbi/parser.rb#11
|
1319
|
+
sig { returns(::RBI::Loc) }
|
1320
|
+
def location; end
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
# source://rbi//lib/rbi/parser.rb#53
|
1324
|
+
class RBI::Parser
|
1325
|
+
# source://rbi//lib/rbi/parser.rb#88
|
1326
|
+
sig { params(path: ::String).returns(::RBI::Tree) }
|
1327
|
+
def parse_file(path); end
|
1328
|
+
|
1329
|
+
# source://rbi//lib/rbi/parser.rb#83
|
1330
|
+
sig { params(string: ::String).returns(::RBI::Tree) }
|
1331
|
+
def parse_string(string); end
|
1332
|
+
|
1333
|
+
private
|
1334
|
+
|
1335
|
+
# source://rbi//lib/rbi/parser.rb#95
|
1336
|
+
sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
|
1337
|
+
def parse(source, file:); end
|
1338
|
+
|
1339
|
+
class << self
|
1340
|
+
# source://rbi//lib/rbi/parser.rb#65
|
1341
|
+
sig { params(path: ::String).returns(::RBI::Tree) }
|
1342
|
+
def parse_file(path); end
|
1343
|
+
|
1344
|
+
# source://rbi//lib/rbi/parser.rb#70
|
1345
|
+
sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
|
1346
|
+
def parse_files(paths); end
|
1347
|
+
|
1348
|
+
# source://rbi//lib/rbi/parser.rb#60
|
1349
|
+
sig { params(string: ::String).returns(::RBI::Tree) }
|
1350
|
+
def parse_string(string); end
|
1351
|
+
|
1352
|
+
# source://rbi//lib/rbi/parser.rb#76
|
1353
|
+
sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
|
1354
|
+
def parse_strings(strings); end
|
1355
|
+
end
|
1356
|
+
end
|
1357
|
+
|
1358
|
+
# source://rbi//lib/rbi/parser.rb#791
|
1359
|
+
class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
|
1360
|
+
# source://rbi//lib/rbi/parser.rb#798
|
1361
|
+
sig { params(content: ::String, file: ::String).void }
|
1362
|
+
def initialize(content, file:); end
|
1363
|
+
|
1364
|
+
# source://rbi//lib/rbi/parser.rb#795
|
1365
|
+
sig { returns(::RBI::Sig) }
|
1366
|
+
def current; end
|
1367
|
+
|
1368
|
+
# source://rbi//lib/rbi/parser.rb#850
|
1369
|
+
sig { override.params(node: ::Prism::AssocNode).void }
|
1370
|
+
def visit_assoc_node(node); end
|
1371
|
+
|
1372
|
+
# source://rbi//lib/rbi/parser.rb#805
|
1373
|
+
sig { override.params(node: ::Prism::CallNode).void }
|
1374
|
+
def visit_call_node(node); end
|
1375
|
+
end
|
1376
|
+
|
1377
|
+
# source://rbi//lib/rbi/parser.rb#153
|
1378
|
+
class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
|
1379
|
+
# source://rbi//lib/rbi/parser.rb#163
|
1380
|
+
sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
|
1381
|
+
def initialize(source, comments:, file:); end
|
1382
|
+
|
1383
|
+
# source://rbi//lib/rbi/parser.rb#160
|
1384
|
+
sig { returns(T.nilable(::Prism::Node)) }
|
1385
|
+
def last_node; end
|
1386
|
+
|
1387
|
+
# source://rbi//lib/rbi/parser.rb#157
|
1388
|
+
sig { returns(::RBI::Tree) }
|
1389
|
+
def tree; end
|
1390
|
+
|
1391
|
+
# source://rbi//lib/rbi/parser.rb#299
|
1392
|
+
sig { params(node: ::Prism::CallNode).void }
|
1393
|
+
def visit_call_node(node); end
|
1394
|
+
|
1395
|
+
# source://rbi//lib/rbi/parser.rb#176
|
1396
|
+
sig { override.params(node: ::Prism::ClassNode).void }
|
1397
|
+
def visit_class_node(node); end
|
1398
|
+
|
1399
|
+
# source://rbi//lib/rbi/parser.rb#208
|
1400
|
+
sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
|
1401
|
+
def visit_constant_assign(node); end
|
1402
|
+
|
1403
|
+
# source://rbi//lib/rbi/parser.rb#201
|
1404
|
+
sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
|
1405
|
+
def visit_constant_path_write_node(node); end
|
1406
|
+
|
1407
|
+
# source://rbi//lib/rbi/parser.rb#194
|
1408
|
+
sig { override.params(node: ::Prism::ConstantWriteNode).void }
|
1409
|
+
def visit_constant_write_node(node); end
|
1410
|
+
|
1411
|
+
# source://rbi//lib/rbi/parser.rb#241
|
1412
|
+
sig { override.params(node: ::Prism::DefNode).void }
|
1413
|
+
def visit_def_node(node); end
|
1414
|
+
|
1415
|
+
# source://rbi//lib/rbi/parser.rb#255
|
1416
|
+
sig { override.params(node: ::Prism::ModuleNode).void }
|
1417
|
+
def visit_module_node(node); end
|
1418
|
+
|
1419
|
+
# source://rbi//lib/rbi/parser.rb#272
|
1420
|
+
sig { override.params(node: ::Prism::ProgramNode).void }
|
1421
|
+
def visit_program_node(node); end
|
1422
|
+
|
1423
|
+
# source://rbi//lib/rbi/parser.rb#283
|
1424
|
+
sig { override.params(node: ::Prism::SingletonClassNode).void }
|
1425
|
+
def visit_singleton_class_node(node); end
|
1426
|
+
|
1427
|
+
private
|
1428
|
+
|
1429
|
+
# Collect all the remaining comments within a node
|
1430
|
+
#
|
1431
|
+
# source://rbi//lib/rbi/parser.rb#467
|
1432
|
+
sig { params(node: ::Prism::Node).void }
|
1433
|
+
def collect_dangling_comments(node); end
|
1434
|
+
|
1435
|
+
# Collect all the remaining comments after visiting the tree
|
1436
|
+
#
|
1437
|
+
# source://rbi//lib/rbi/parser.rb#485
|
1438
|
+
sig { void }
|
1439
|
+
def collect_orphan_comments; end
|
1440
|
+
|
1441
|
+
# source://rbi//lib/rbi/parser.rb#508
|
1442
|
+
sig { returns(::RBI::Tree) }
|
1443
|
+
def current_scope; end
|
1444
|
+
|
1445
|
+
# source://rbi//lib/rbi/parser.rb#513
|
1446
|
+
sig { returns(T::Array[::RBI::Sig]) }
|
1447
|
+
def current_sigs; end
|
1448
|
+
|
1449
|
+
# source://rbi//lib/rbi/parser.rb#520
|
1450
|
+
sig { returns(T::Array[::RBI::Comment]) }
|
1451
|
+
def current_sigs_comments; end
|
1452
|
+
|
1453
|
+
# source://rbi//lib/rbi/parser.rb#527
|
1454
|
+
sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
|
1455
|
+
def node_comments(node); end
|
1456
|
+
|
1457
|
+
# source://rbi//lib/rbi/parser.rb#545
|
1458
|
+
sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
|
1459
|
+
def parse_comment(node); end
|
1460
|
+
|
1461
|
+
# source://rbi//lib/rbi/parser.rb#574
|
1462
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
|
1463
|
+
def parse_params(node); end
|
1464
|
+
|
1465
|
+
# source://rbi//lib/rbi/parser.rb#550
|
1466
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
|
1467
|
+
def parse_send_args(node); end
|
1468
|
+
|
1469
|
+
# source://rbi//lib/rbi/parser.rb#648
|
1470
|
+
sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
|
1471
|
+
def parse_sig(node); end
|
1472
|
+
|
1473
|
+
# source://rbi//lib/rbi/parser.rb#658
|
1474
|
+
sig do
|
1475
|
+
params(
|
1476
|
+
node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
|
1477
|
+
).returns(T.nilable(::RBI::Struct))
|
1478
|
+
end
|
1479
|
+
def parse_struct(node); end
|
1480
|
+
|
1481
|
+
# source://rbi//lib/rbi/parser.rb#708
|
1482
|
+
sig { params(send: ::Prism::CallNode).void }
|
1483
|
+
def parse_tstruct_field(send); end
|
1484
|
+
|
1485
|
+
# source://rbi//lib/rbi/parser.rb#745
|
1486
|
+
sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
|
1487
|
+
def parse_visibility(name, node); end
|
1488
|
+
|
1489
|
+
# source://rbi//lib/rbi/parser.rb#759
|
1490
|
+
sig { void }
|
1491
|
+
def separate_header_comments; end
|
1492
|
+
|
1493
|
+
# source://rbi//lib/rbi/parser.rb#769
|
1494
|
+
sig { void }
|
1495
|
+
def set_root_tree_loc; end
|
1496
|
+
|
1497
|
+
# source://rbi//lib/rbi/parser.rb#783
|
1498
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
1499
|
+
def type_variable_definition?(node); end
|
1500
|
+
end
|
1501
|
+
|
1502
|
+
# source://rbi//lib/rbi/parser.rb#122
|
1503
|
+
class RBI::Parser::Visitor < ::Prism::Visitor
|
1504
|
+
# source://rbi//lib/rbi/parser.rb#126
|
1505
|
+
sig { params(source: ::String, file: ::String).void }
|
1506
|
+
def initialize(source, file:); end
|
1507
|
+
|
1508
|
+
private
|
1509
|
+
|
1510
|
+
# source://rbi//lib/rbi/parser.rb#136
|
1511
|
+
sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
|
1512
|
+
def node_loc(node); end
|
1513
|
+
|
1514
|
+
# source://rbi//lib/rbi/parser.rb#141
|
1515
|
+
sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
|
1516
|
+
def node_string(node); end
|
1517
|
+
|
1518
|
+
# source://rbi//lib/rbi/parser.rb#148
|
1519
|
+
sig { params(node: ::Prism::Node).returns(::String) }
|
1520
|
+
def node_string!(node); end
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# source://rbi//lib/rbi/printer.rb#5
|
1524
|
+
class RBI::Printer < ::RBI::Visitor
|
1525
|
+
# source://rbi//lib/rbi/printer.rb#28
|
1526
|
+
sig do
|
1527
|
+
params(
|
1528
|
+
out: T.any(::IO, ::StringIO),
|
1529
|
+
indent: ::Integer,
|
1530
|
+
print_locs: T::Boolean,
|
1531
|
+
max_line_length: T.nilable(::Integer)
|
1532
|
+
).void
|
1533
|
+
end
|
1534
|
+
def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
|
1535
|
+
|
1536
|
+
# source://rbi//lib/rbi/printer.rb#15
|
1537
|
+
sig { returns(::Integer) }
|
1538
|
+
def current_indent; end
|
1539
|
+
|
1540
|
+
# source://rbi//lib/rbi/printer.rb#46
|
1541
|
+
sig { void }
|
1542
|
+
def dedent; end
|
1543
|
+
|
1544
|
+
# @return [Boolean]
|
1545
|
+
#
|
1546
|
+
# source://rbi//lib/rbi/printer.rb#9
|
1547
|
+
def in_visibility_group; end
|
1548
|
+
|
1549
|
+
# @return [Boolean]
|
1550
|
+
#
|
1551
|
+
# source://rbi//lib/rbi/printer.rb#9
|
1552
|
+
def in_visibility_group=(_arg0); end
|
1553
|
+
|
1554
|
+
# Printing
|
1555
|
+
#
|
1556
|
+
# source://rbi//lib/rbi/printer.rb#41
|
1557
|
+
sig { void }
|
1558
|
+
def indent; end
|
1559
|
+
|
1560
|
+
# source://rbi//lib/rbi/printer.rb#18
|
1561
|
+
sig { returns(T.nilable(::Integer)) }
|
1562
|
+
def max_line_length; end
|
1563
|
+
|
1564
|
+
# source://rbi//lib/rbi/printer.rb#12
|
1565
|
+
sig { returns(T.nilable(::RBI::Node)) }
|
1566
|
+
def previous_node; end
|
1567
|
+
|
1568
|
+
# Print a string without indentation nor `\n` at the end.
|
1569
|
+
#
|
1570
|
+
# source://rbi//lib/rbi/printer.rb#52
|
1571
|
+
sig { params(string: ::String).void }
|
1572
|
+
def print(string); end
|
1573
|
+
|
1574
|
+
# source://rbi//lib/rbi/printer.rb#9
|
1575
|
+
sig { returns(T::Boolean) }
|
1576
|
+
def print_locs; end
|
1577
|
+
|
1578
|
+
# @return [Boolean]
|
1579
|
+
#
|
1580
|
+
# source://rbi//lib/rbi/printer.rb#9
|
1581
|
+
def print_locs=(_arg0); end
|
1582
|
+
|
1583
|
+
# Print a string with indentation and `\n` at the end.
|
1584
|
+
#
|
1585
|
+
# source://rbi//lib/rbi/printer.rb#72
|
1586
|
+
sig { params(string: ::String).void }
|
1587
|
+
def printl(string); end
|
1588
|
+
|
1589
|
+
# Print a string without indentation but with a `\n` at the end.
|
1590
|
+
#
|
1591
|
+
# source://rbi//lib/rbi/printer.rb#58
|
1592
|
+
sig { params(string: T.nilable(::String)).void }
|
1593
|
+
def printn(string = T.unsafe(nil)); end
|
1594
|
+
|
1595
|
+
# Print a string with indentation but without a `\n` at the end.
|
1596
|
+
#
|
1597
|
+
# source://rbi//lib/rbi/printer.rb#65
|
1598
|
+
sig { params(string: T.nilable(::String)).void }
|
1599
|
+
def printt(string = T.unsafe(nil)); end
|
1600
|
+
|
1601
|
+
# source://rbi//lib/rbi/printer.rb#83
|
1602
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1603
|
+
def visit(node); end
|
1604
|
+
|
1605
|
+
# source://rbi//lib/rbi/printer.rb#90
|
1606
|
+
sig { override.params(nodes: T::Array[::RBI::Node]).void }
|
1607
|
+
def visit_all(nodes); end
|
1608
|
+
|
1609
|
+
# source://rbi//lib/rbi/printer.rb#78
|
1610
|
+
sig { params(file: ::RBI::File).void }
|
1611
|
+
def visit_file(file); end
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# source://rbi//lib/rbi/model.rb#982
|
1615
|
+
class RBI::Private < ::RBI::Visibility
|
1616
|
+
# source://rbi//lib/rbi/model.rb#992
|
1617
|
+
sig do
|
1618
|
+
params(
|
1619
|
+
loc: T.nilable(::RBI::Loc),
|
1620
|
+
comments: T::Array[::RBI::Comment],
|
1621
|
+
block: T.nilable(T.proc.params(node: ::RBI::Private).void)
|
1622
|
+
).void
|
1623
|
+
end
|
1624
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1625
|
+
end
|
1626
|
+
|
1627
|
+
# source://rbi//lib/rbi/model.rb#966
|
1628
|
+
class RBI::Protected < ::RBI::Visibility
|
1629
|
+
# source://rbi//lib/rbi/model.rb#976
|
1630
|
+
sig do
|
1631
|
+
params(
|
1632
|
+
loc: T.nilable(::RBI::Loc),
|
1633
|
+
comments: T::Array[::RBI::Comment],
|
1634
|
+
block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
|
1635
|
+
).void
|
1636
|
+
end
|
1637
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1638
|
+
end
|
1639
|
+
|
1640
|
+
# source://rbi//lib/rbi/model.rb#950
|
1641
|
+
class RBI::Public < ::RBI::Visibility
|
1642
|
+
# source://rbi//lib/rbi/model.rb#960
|
1643
|
+
sig do
|
1644
|
+
params(
|
1645
|
+
loc: T.nilable(::RBI::Loc),
|
1646
|
+
comments: T::Array[::RBI::Comment],
|
1647
|
+
block: T.nilable(T.proc.params(node: ::RBI::Public).void)
|
1648
|
+
).void
|
1649
|
+
end
|
1650
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
# source://rbi//lib/rbi/model.rb#652
|
1654
|
+
class RBI::ReqParam < ::RBI::Param
|
1655
|
+
# source://rbi//lib/rbi/model.rb#663
|
1656
|
+
sig do
|
1657
|
+
params(
|
1658
|
+
name: ::String,
|
1659
|
+
loc: T.nilable(::RBI::Loc),
|
1660
|
+
comments: T::Array[::RBI::Comment],
|
1661
|
+
block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
|
1662
|
+
).void
|
1663
|
+
end
|
1664
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1665
|
+
|
1666
|
+
# source://rbi//lib/rbi/model.rb#669
|
1667
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
1668
|
+
def ==(other); end
|
1669
|
+
end
|
1670
|
+
|
1671
|
+
# source://rbi//lib/rbi/model.rb#1456
|
1672
|
+
class RBI::RequiresAncestor < ::RBI::NodeWithComments
|
1673
|
+
include ::RBI::Indexable
|
1674
|
+
|
1675
|
+
# source://rbi//lib/rbi/model.rb#1469
|
1676
|
+
sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
1677
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
1678
|
+
|
1679
|
+
# source://rbi//lib/rbi/printer.rb#870
|
1680
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1681
|
+
def accept_printer(v); end
|
1682
|
+
|
1683
|
+
# source://rbi//lib/rbi/index.rb#163
|
1684
|
+
sig { override.returns(T::Array[::String]) }
|
1685
|
+
def index_ids; end
|
1686
|
+
|
1687
|
+
# source://rbi//lib/rbi/model.rb#1460
|
1688
|
+
sig { returns(::String) }
|
1689
|
+
def name; end
|
1690
|
+
|
1691
|
+
# source://rbi//lib/rbi/model.rb#1475
|
1692
|
+
sig { override.returns(::String) }
|
1693
|
+
def to_s; end
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
# source://rbi//lib/rbi/model.rb#701
|
1697
|
+
class RBI::RestParam < ::RBI::Param
|
1698
|
+
# source://rbi//lib/rbi/model.rb#712
|
1699
|
+
sig do
|
1700
|
+
params(
|
1701
|
+
name: ::String,
|
1702
|
+
loc: T.nilable(::RBI::Loc),
|
1703
|
+
comments: T::Array[::RBI::Comment],
|
1704
|
+
block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
|
1705
|
+
).void
|
1706
|
+
end
|
1707
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
1708
|
+
|
1709
|
+
# source://rbi//lib/rbi/model.rb#723
|
1710
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
1711
|
+
def ==(other); end
|
1712
|
+
|
1713
|
+
# source://rbi//lib/rbi/printer.rb#483
|
1714
|
+
sig { override.params(v: ::RBI::Printer).void }
|
1715
|
+
def accept_printer(v); end
|
1716
|
+
|
1717
|
+
# source://rbi//lib/rbi/printer.rb#488
|
1718
|
+
sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
|
1719
|
+
def print_comment_leading_space(v, last:); end
|
1720
|
+
|
1721
|
+
# source://rbi//lib/rbi/model.rb#718
|
1722
|
+
sig { override.returns(::String) }
|
1723
|
+
def to_s; end
|
1724
|
+
end
|
1725
|
+
|
1726
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5
|
1727
|
+
module RBI::Rewriters; end
|
1728
|
+
|
1729
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6
|
1730
|
+
class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
|
1731
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10
|
1732
|
+
sig { params(with_todo_comment: T::Boolean).void }
|
1733
|
+
def initialize(with_todo_comment: T.unsafe(nil)); end
|
1734
|
+
|
1735
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16
|
1736
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1737
|
+
def visit(node); end
|
1738
|
+
|
1739
|
+
private
|
1740
|
+
|
1741
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30
|
1742
|
+
sig { params(attr: ::RBI::Attr).void }
|
1743
|
+
def add_attr_sig(attr); end
|
1744
|
+
|
1745
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45
|
1746
|
+
sig { params(method: ::RBI::Method).void }
|
1747
|
+
def add_method_sig(method); end
|
1748
|
+
|
1749
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56
|
1750
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
1751
|
+
def add_todo_comment(node); end
|
1752
|
+
end
|
1753
|
+
|
1754
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#6
|
1755
|
+
class RBI::Rewriters::Annotate < ::RBI::Visitor
|
1756
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#10
|
1757
|
+
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
|
1758
|
+
def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
|
1759
|
+
|
1760
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#18
|
1761
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1762
|
+
def visit(node); end
|
1763
|
+
|
1764
|
+
private
|
1765
|
+
|
1766
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#31
|
1767
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
1768
|
+
def annotate_node(node); end
|
1769
|
+
|
1770
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#38
|
1771
|
+
sig { params(node: ::RBI::Node).returns(T::Boolean) }
|
1772
|
+
def root?(node); end
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#6
|
1776
|
+
class RBI::Rewriters::Deannotate < ::RBI::Visitor
|
1777
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#10
|
1778
|
+
sig { params(annotation: ::String).void }
|
1779
|
+
def initialize(annotation); end
|
1780
|
+
|
1781
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#16
|
1782
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1783
|
+
def visit(node); end
|
1784
|
+
|
1785
|
+
private
|
1786
|
+
|
1787
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#27
|
1788
|
+
sig { params(node: ::RBI::NodeWithComments).void }
|
1789
|
+
def deannotate_node(node); end
|
1790
|
+
end
|
1791
|
+
|
1792
|
+
# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations
|
1793
|
+
# in comments. As an example:
|
1794
|
+
#
|
1795
|
+
# ~~~rb
|
1796
|
+
# tree = Parser.parse_string(<<~RBI)
|
1797
|
+
# class Foo
|
1798
|
+
# # @version > 0.3.0
|
1799
|
+
# def bar
|
1800
|
+
# end
|
1801
|
+
#
|
1802
|
+
# # @version <= 0.3.0
|
1803
|
+
# def bar(arg1)
|
1804
|
+
# end
|
1805
|
+
# end
|
1806
|
+
# RBI
|
1807
|
+
#
|
1808
|
+
# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1"))
|
1809
|
+
#
|
1810
|
+
# assert_equal(<<~RBI, tree.string)
|
1811
|
+
# class Foo
|
1812
|
+
# # @version > 0.3.0
|
1813
|
+
# def bar
|
1814
|
+
# end
|
1815
|
+
# end
|
1816
|
+
# RBI
|
1817
|
+
# ~~~
|
1818
|
+
#
|
1819
|
+
# Supported operators:
|
1820
|
+
# - equals `=`
|
1821
|
+
# - not equals `!=`
|
1822
|
+
# - greater than `>`
|
1823
|
+
# - greater than or equal to `>=`
|
1824
|
+
# - less than `<`
|
1825
|
+
# - less than or equal to `<=`
|
1826
|
+
# - pessimistic or twiddle-wakka`~>`
|
1827
|
+
#
|
1828
|
+
# And/or logic:
|
1829
|
+
# - "And" logic: put multiple versions on the same line
|
1830
|
+
# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0
|
1831
|
+
# - "Or" logic: put multiple versions on subsequent lines
|
1832
|
+
# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0
|
1833
|
+
# ```
|
1834
|
+
# # @version < 0.3.0
|
1835
|
+
# # @version > 1.0.0
|
1836
|
+
# ```
|
1837
|
+
# Prerelease versions:
|
1838
|
+
# - Prerelease versions are considered less than their non-prerelease counterparts
|
1839
|
+
# - e.g. `0.4.0-prerelease` is less than `0.4.0`
|
1840
|
+
#
|
1841
|
+
# RBI with no versions:
|
1842
|
+
# - RBI with no version annotations are automatically counted towards ALL versions
|
1843
|
+
#
|
1844
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#57
|
1845
|
+
class RBI::Rewriters::FilterVersions < ::RBI::Visitor
|
1846
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#73
|
1847
|
+
sig { params(version: ::Gem::Version).void }
|
1848
|
+
def initialize(version); end
|
1849
|
+
|
1850
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#79
|
1851
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1852
|
+
def visit(node); end
|
1853
|
+
|
1854
|
+
class << self
|
1855
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#66
|
1856
|
+
sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
|
1857
|
+
def filter(tree, version); end
|
1858
|
+
end
|
1859
|
+
end
|
1860
|
+
|
1861
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#60
|
1862
|
+
RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
|
1863
|
+
|
1864
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#6
|
1865
|
+
class RBI::Rewriters::GroupNodes < ::RBI::Visitor
|
1866
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#10
|
1867
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1868
|
+
def visit(node); end
|
1869
|
+
end
|
1870
|
+
|
1871
|
+
# Merge two RBI trees together
|
1872
|
+
#
|
1873
|
+
# Be this `Tree`:
|
1874
|
+
# ~~~rb
|
1875
|
+
# class Foo
|
1876
|
+
# attr_accessor :a
|
1877
|
+
# def m; end
|
1878
|
+
# C = 10
|
1879
|
+
# end
|
1880
|
+
# ~~~
|
1881
|
+
#
|
1882
|
+
# Merged with this one:
|
1883
|
+
# ~~~rb
|
1884
|
+
# class Foo
|
1885
|
+
# attr_reader :a
|
1886
|
+
# def m(x); end
|
1887
|
+
# C = 10
|
1888
|
+
# end
|
1889
|
+
# ~~~
|
1890
|
+
#
|
1891
|
+
# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`:
|
1892
|
+
# ~~~rb
|
1893
|
+
# class Foo
|
1894
|
+
# <<<<<<< left
|
1895
|
+
# attr_accessor :a
|
1896
|
+
# def m; end
|
1897
|
+
# =======
|
1898
|
+
# attr_reader :a
|
1899
|
+
# def m(x); end
|
1900
|
+
# >>>>>>> right
|
1901
|
+
# C = 10
|
1902
|
+
# end
|
1903
|
+
# ~~~
|
1904
|
+
#
|
1905
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#39
|
1906
|
+
class RBI::Rewriters::Merge
|
1907
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#70
|
1908
|
+
sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
|
1909
|
+
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
1910
|
+
|
1911
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#79
|
1912
|
+
sig { params(tree: ::RBI::Tree).void }
|
1913
|
+
def merge(tree); end
|
1914
|
+
|
1915
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#67
|
1916
|
+
sig { returns(::RBI::MergeTree) }
|
1917
|
+
def tree; end
|
1918
|
+
|
1919
|
+
class << self
|
1920
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#54
|
1921
|
+
sig do
|
1922
|
+
params(
|
1923
|
+
left: ::RBI::Tree,
|
1924
|
+
right: ::RBI::Tree,
|
1925
|
+
left_name: ::String,
|
1926
|
+
right_name: ::String,
|
1927
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
1928
|
+
).returns(::RBI::MergeTree)
|
1929
|
+
end
|
1930
|
+
def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
1931
|
+
end
|
1932
|
+
end
|
1933
|
+
|
1934
|
+
# Used for logging / error displaying purpose
|
1935
|
+
#
|
1936
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#86
|
1937
|
+
class RBI::Rewriters::Merge::Conflict < ::T::Struct
|
1938
|
+
const :left, ::RBI::Node
|
1939
|
+
const :right, ::RBI::Node
|
1940
|
+
const :left_name, ::String
|
1941
|
+
const :right_name, ::String
|
1942
|
+
|
1943
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#95
|
1944
|
+
sig { returns(::String) }
|
1945
|
+
def to_s; end
|
1946
|
+
|
1947
|
+
class << self
|
1948
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
1949
|
+
def inherited(s); end
|
1950
|
+
end
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
# Merge adjacent conflict trees
|
1954
|
+
#
|
1955
|
+
# Transform this:
|
1956
|
+
# ~~~rb
|
1957
|
+
# class Foo
|
1958
|
+
# <<<<<<< left
|
1959
|
+
# def m1; end
|
1960
|
+
# =======
|
1961
|
+
# def m1(a); end
|
1962
|
+
# >>>>>>> right
|
1963
|
+
# <<<<<<< left
|
1964
|
+
# def m2(a); end
|
1965
|
+
# =======
|
1966
|
+
# def m2; end
|
1967
|
+
# >>>>>>> right
|
1968
|
+
# end
|
1969
|
+
# ~~~
|
1970
|
+
#
|
1971
|
+
# Into this:
|
1972
|
+
# ~~~rb
|
1973
|
+
# class Foo
|
1974
|
+
# <<<<<<< left
|
1975
|
+
# def m1; end
|
1976
|
+
# def m2(a); end
|
1977
|
+
# =======
|
1978
|
+
# def m1(a); end
|
1979
|
+
# def m2; end
|
1980
|
+
# >>>>>>> right
|
1981
|
+
# end
|
1982
|
+
# ~~~
|
1983
|
+
#
|
1984
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#245
|
1985
|
+
class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
|
1986
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#247
|
1987
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
1988
|
+
def visit(node); end
|
1989
|
+
|
1990
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#252
|
1991
|
+
sig { override.params(nodes: T::Array[::RBI::Node]).void }
|
1992
|
+
def visit_all(nodes); end
|
1993
|
+
|
1994
|
+
private
|
1995
|
+
|
1996
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#273
|
1997
|
+
sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
|
1998
|
+
def merge_conflict_trees(left, right); end
|
1999
|
+
end
|
2000
|
+
|
2001
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#42
|
2002
|
+
class RBI::Rewriters::Merge::Keep < ::T::Enum
|
2003
|
+
enums do
|
2004
|
+
NONE = new
|
2005
|
+
LEFT = new
|
2006
|
+
RIGHT = new
|
2007
|
+
end
|
2008
|
+
end
|
2009
|
+
|
2010
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#100
|
2011
|
+
class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
|
2012
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#107
|
2013
|
+
sig do
|
2014
|
+
params(
|
2015
|
+
output: ::RBI::Tree,
|
2016
|
+
left_name: ::String,
|
2017
|
+
right_name: ::String,
|
2018
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
2019
|
+
).void
|
2020
|
+
end
|
2021
|
+
def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
2022
|
+
|
2023
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#104
|
2024
|
+
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
|
2025
|
+
def conflicts; end
|
2026
|
+
|
2027
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#119
|
2028
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2029
|
+
def visit(node); end
|
2030
|
+
|
2031
|
+
private
|
2032
|
+
|
2033
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#168
|
2034
|
+
sig { returns(::RBI::Tree) }
|
2035
|
+
def current_scope; end
|
2036
|
+
|
2037
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#185
|
2038
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
|
2039
|
+
def make_conflict_scope(left, right); end
|
2040
|
+
|
2041
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#192
|
2042
|
+
sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
|
2043
|
+
def make_conflict_tree(left, right); end
|
2044
|
+
|
2045
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#173
|
2046
|
+
sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
|
2047
|
+
def previous_definition(node); end
|
2048
|
+
|
2049
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#204
|
2050
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
|
2051
|
+
def replace_scope_header(left, right); end
|
2052
|
+
end
|
2053
|
+
|
2054
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6
|
2055
|
+
class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
|
2056
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10
|
2057
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2058
|
+
def visit(node); end
|
2059
|
+
end
|
2060
|
+
|
2061
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6
|
2062
|
+
class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
|
2063
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10
|
2064
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2065
|
+
def visit(node); end
|
2066
|
+
end
|
2067
|
+
|
2068
|
+
# Remove all definitions existing in the index from the current tree
|
2069
|
+
#
|
2070
|
+
# Let's create an `Index` from two different `Tree`s:
|
2071
|
+
# ~~~rb
|
2072
|
+
# tree1 = Parse.parse_string(<<~RBI)
|
2073
|
+
# class Foo
|
2074
|
+
# def foo; end
|
2075
|
+
# end
|
2076
|
+
# RBI
|
2077
|
+
#
|
2078
|
+
# tree2 = Parse.parse_string(<<~RBI)
|
2079
|
+
# FOO = 10
|
2080
|
+
# RBI
|
2081
|
+
#
|
2082
|
+
# index = Index.index(tree1, tree2)
|
2083
|
+
# ~~~
|
2084
|
+
#
|
2085
|
+
# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean:
|
2086
|
+
# ~~~rb
|
2087
|
+
# tree_to_clean = Parser.parse_string(<<~RBI)
|
2088
|
+
# class Foo
|
2089
|
+
# def foo; end
|
2090
|
+
# def bar; end
|
2091
|
+
# end
|
2092
|
+
# FOO = 10
|
2093
|
+
# BAR = 42
|
2094
|
+
# RBI
|
2095
|
+
#
|
2096
|
+
# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index)
|
2097
|
+
#
|
2098
|
+
# assert_equal(<<~RBI, cleaned_tree)
|
2099
|
+
# class Foo
|
2100
|
+
# def bar; end
|
2101
|
+
# end
|
2102
|
+
# BAR = 42
|
2103
|
+
# RBI
|
2104
|
+
#
|
2105
|
+
# assert_equal(<<~OPERATIONS, operations.join("\n"))
|
2106
|
+
# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16)
|
2107
|
+
# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8)
|
2108
|
+
# OPERATIONS
|
2109
|
+
# ~~~
|
2110
|
+
#
|
2111
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48
|
2112
|
+
class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
|
2113
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55
|
2114
|
+
sig { params(index: ::RBI::Index).void }
|
2115
|
+
def initialize(index); end
|
2116
|
+
|
2117
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52
|
2118
|
+
sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
|
2119
|
+
def operations; end
|
2120
|
+
|
2121
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83
|
2122
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2123
|
+
def visit(node); end
|
2124
|
+
|
2125
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78
|
2126
|
+
sig { params(nodes: T::Array[::RBI::Node]).void }
|
2127
|
+
def visit_all(nodes); end
|
2128
|
+
|
2129
|
+
private
|
2130
|
+
|
2131
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111
|
2132
|
+
sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
|
2133
|
+
def can_delete_node?(node, previous); end
|
2134
|
+
|
2135
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129
|
2136
|
+
sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
|
2137
|
+
def delete_node(node, previous); end
|
2138
|
+
|
2139
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102
|
2140
|
+
sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
|
2141
|
+
def previous_definition_for(node); end
|
2142
|
+
|
2143
|
+
class << self
|
2144
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70
|
2145
|
+
sig do
|
2146
|
+
params(
|
2147
|
+
tree: ::RBI::Tree,
|
2148
|
+
index: ::RBI::Index
|
2149
|
+
).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]])
|
2150
|
+
end
|
2151
|
+
def remove(tree, index); end
|
2152
|
+
end
|
2153
|
+
end
|
2154
|
+
|
2155
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134
|
2156
|
+
class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
|
2157
|
+
const :deleted_node, ::RBI::Node
|
2158
|
+
const :duplicate_of, ::RBI::Node
|
2159
|
+
|
2160
|
+
# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141
|
2161
|
+
sig { returns(::String) }
|
2162
|
+
def to_s; end
|
2163
|
+
|
2164
|
+
class << self
|
2165
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
2166
|
+
def inherited(s); end
|
2167
|
+
end
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6
|
2171
|
+
class RBI::Rewriters::SortNodes < ::RBI::Visitor
|
2172
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#10
|
2173
|
+
sig { override.params(node: T.nilable(::RBI::Node)).void }
|
2174
|
+
def visit(node); end
|
2175
|
+
|
2176
|
+
private
|
2177
|
+
|
2178
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#73
|
2179
|
+
sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
|
2180
|
+
def group_rank(kind); end
|
2181
|
+
|
2182
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#94
|
2183
|
+
sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
|
2184
|
+
def node_name(node); end
|
2185
|
+
|
2186
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#45
|
2187
|
+
sig { params(node: ::RBI::Node).returns(::Integer) }
|
2188
|
+
def node_rank(node); end
|
2189
|
+
|
2190
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#106
|
2191
|
+
sig { params(node: ::RBI::Node).void }
|
2192
|
+
def sort_node_names!(node); end
|
2193
|
+
end
|
2194
|
+
|
2195
|
+
# Scopes
|
2196
|
+
#
|
2197
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2198
|
+
#
|
2199
|
+
# source://rbi//lib/rbi/model.rb#176
|
2200
|
+
class RBI::Scope < ::RBI::Tree
|
2201
|
+
include ::RBI::Indexable
|
2202
|
+
|
2203
|
+
abstract!
|
2204
|
+
|
2205
|
+
# source://rbi//lib/rbi/printer.rb#242
|
2206
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2207
|
+
def accept_printer(v); end
|
2208
|
+
|
2209
|
+
# Duplicate `self` scope without its body
|
2210
|
+
#
|
2211
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#356
|
2212
|
+
sig { returns(T.self_type) }
|
2213
|
+
def dup_empty; end
|
2214
|
+
|
2215
|
+
# @abstract
|
2216
|
+
#
|
2217
|
+
# source://rbi//lib/rbi/model.rb#182
|
2218
|
+
sig { abstract.returns(::String) }
|
2219
|
+
def fully_qualified_name; end
|
2220
|
+
|
2221
|
+
# source://rbi//lib/rbi/index.rb#93
|
2222
|
+
sig { override.returns(T::Array[::String]) }
|
2223
|
+
def index_ids; end
|
2224
|
+
|
2225
|
+
# source://rbi//lib/rbi/printer.rb#256
|
2226
|
+
sig { params(v: ::RBI::Printer).void }
|
2227
|
+
def print_body(v); end
|
2228
|
+
|
2229
|
+
# @abstract
|
2230
|
+
#
|
2231
|
+
# source://rbi//lib/rbi/printer.rb#253
|
2232
|
+
sig { abstract.params(v: ::RBI::Printer).void }
|
2233
|
+
def print_header(v); end
|
2234
|
+
|
2235
|
+
# source://rbi//lib/rbi/model.rb#185
|
2236
|
+
sig { override.returns(::String) }
|
2237
|
+
def to_s; end
|
2238
|
+
end
|
2239
|
+
|
2240
|
+
# A conflict between two scope headers
|
2241
|
+
#
|
2242
|
+
# Is rendered as a merge conflict between `left` and` right` for scope definitions:
|
2243
|
+
# ~~~rb
|
2244
|
+
# <<<<<<< left
|
2245
|
+
# class Foo
|
2246
|
+
# =======
|
2247
|
+
# module Foo
|
2248
|
+
# >>>>>>> right
|
2249
|
+
# def m1; end
|
2250
|
+
# end
|
2251
|
+
# ~~~
|
2252
|
+
#
|
2253
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#628
|
2254
|
+
class RBI::ScopeConflict < ::RBI::Tree
|
2255
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#642
|
2256
|
+
sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
|
2257
|
+
def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
|
2258
|
+
|
2259
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#651
|
2260
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2261
|
+
def accept_printer(v); end
|
2262
|
+
|
2263
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#632
|
2264
|
+
sig { returns(::RBI::Scope) }
|
2265
|
+
def left; end
|
2266
|
+
|
2267
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#667
|
2268
|
+
sig { override.returns(T::Boolean) }
|
2269
|
+
def oneline?; end
|
2270
|
+
|
2271
|
+
# @return [Scope]
|
2272
|
+
#
|
2273
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#632
|
2274
|
+
def right; end
|
2275
|
+
end
|
2276
|
+
|
2277
|
+
# Sends
|
2278
|
+
#
|
2279
|
+
# source://rbi//lib/rbi/model.rb#1000
|
2280
|
+
class RBI::Send < ::RBI::NodeWithComments
|
2281
|
+
include ::RBI::Indexable
|
2282
|
+
|
2283
|
+
# source://rbi//lib/rbi/model.rb#1018
|
2284
|
+
sig do
|
2285
|
+
params(
|
2286
|
+
method: ::String,
|
2287
|
+
args: T::Array[::RBI::Arg],
|
2288
|
+
loc: T.nilable(::RBI::Loc),
|
2289
|
+
comments: T::Array[::RBI::Comment],
|
2290
|
+
block: T.nilable(T.proc.params(node: ::RBI::Send).void)
|
2291
|
+
).void
|
2292
|
+
end
|
2293
|
+
def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2294
|
+
|
2295
|
+
# source://rbi//lib/rbi/model.rb#1026
|
2296
|
+
sig { params(arg: ::RBI::Arg).void }
|
2297
|
+
def <<(arg); end
|
2298
|
+
|
2299
|
+
# source://rbi//lib/rbi/model.rb#1031
|
2300
|
+
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
|
2301
|
+
def ==(other); end
|
2302
|
+
|
2303
|
+
# source://rbi//lib/rbi/printer.rb#592
|
2304
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2305
|
+
def accept_printer(v); end
|
2306
|
+
|
2307
|
+
# source://rbi//lib/rbi/model.rb#1007
|
2308
|
+
sig { returns(T::Array[::RBI::Arg]) }
|
2309
|
+
def args; end
|
2310
|
+
|
2311
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#529
|
2312
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2313
|
+
def compatible_with?(other); end
|
2314
|
+
|
2315
|
+
# source://rbi//lib/rbi/index.rb#193
|
2316
|
+
sig { override.returns(T::Array[::String]) }
|
2317
|
+
def index_ids; end
|
2318
|
+
|
2319
|
+
# source://rbi//lib/rbi/model.rb#1004
|
2320
|
+
sig { returns(::String) }
|
2321
|
+
def method; end
|
2322
|
+
|
2323
|
+
# source://rbi//lib/rbi/model.rb#1036
|
2324
|
+
sig { returns(::String) }
|
2325
|
+
def to_s; end
|
2326
|
+
end
|
2327
|
+
|
2328
|
+
# Sorbet's sigs
|
2329
|
+
#
|
2330
|
+
# source://rbi//lib/rbi/model.rb#1100
|
2331
|
+
class RBI::Sig < ::RBI::Node
|
2332
|
+
# source://rbi//lib/rbi/model.rb#1132
|
2333
|
+
sig do
|
2334
|
+
params(
|
2335
|
+
params: T::Array[::RBI::SigParam],
|
2336
|
+
return_type: T.nilable(::String),
|
2337
|
+
is_abstract: T::Boolean,
|
2338
|
+
is_override: T::Boolean,
|
2339
|
+
is_overridable: T::Boolean,
|
2340
|
+
is_final: T::Boolean,
|
2341
|
+
type_params: T::Array[::String],
|
2342
|
+
checked: T.nilable(::Symbol),
|
2343
|
+
loc: T.nilable(::RBI::Loc),
|
2344
|
+
block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
|
2345
|
+
).void
|
2346
|
+
end
|
2347
|
+
def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
|
2348
|
+
|
2349
|
+
# source://rbi//lib/rbi/model.rb#1157
|
2350
|
+
sig { params(param: ::RBI::SigParam).void }
|
2351
|
+
def <<(param); end
|
2352
|
+
|
2353
|
+
# source://rbi//lib/rbi/model.rb#1167
|
2354
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2355
|
+
def ==(other); end
|
2356
|
+
|
2357
|
+
# source://rbi//lib/rbi/printer.rb#633
|
2358
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2359
|
+
def accept_printer(v); end
|
2360
|
+
|
2361
|
+
# source://rbi//lib/rbi/model.rb#1162
|
2362
|
+
sig { params(name: ::String, type: ::String).void }
|
2363
|
+
def add_param(name, type); end
|
2364
|
+
|
2365
|
+
# source://rbi//lib/rbi/model.rb#1116
|
2366
|
+
sig { returns(T.nilable(::Symbol)) }
|
2367
|
+
def checked; end
|
2368
|
+
|
2369
|
+
# @return [Symbol, nil]
|
2370
|
+
#
|
2371
|
+
# source://rbi//lib/rbi/model.rb#1116
|
2372
|
+
def checked=(_arg0); end
|
2373
|
+
|
2374
|
+
# source://rbi//lib/rbi/printer.rb#656
|
2375
|
+
sig { returns(T::Boolean) }
|
2376
|
+
def inline_params?; end
|
2377
|
+
|
2378
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2379
|
+
sig { returns(T::Boolean) }
|
2380
|
+
def is_abstract; end
|
2381
|
+
|
2382
|
+
# @return [Boolean]
|
2383
|
+
#
|
2384
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2385
|
+
def is_abstract=(_arg0); end
|
2386
|
+
|
2387
|
+
# @return [Boolean]
|
2388
|
+
#
|
2389
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2390
|
+
def is_final; end
|
2391
|
+
|
2392
|
+
# @return [Boolean]
|
2393
|
+
#
|
2394
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2395
|
+
def is_final=(_arg0); end
|
2396
|
+
|
2397
|
+
# @return [Boolean]
|
2398
|
+
#
|
2399
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2400
|
+
def is_overridable; end
|
2401
|
+
|
2402
|
+
# @return [Boolean]
|
2403
|
+
#
|
2404
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2405
|
+
def is_overridable=(_arg0); end
|
2406
|
+
|
2407
|
+
# @return [Boolean]
|
2408
|
+
#
|
2409
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2410
|
+
def is_override; end
|
2411
|
+
|
2412
|
+
# @return [Boolean]
|
2413
|
+
#
|
2414
|
+
# source://rbi//lib/rbi/model.rb#1110
|
2415
|
+
def is_override=(_arg0); end
|
2416
|
+
|
2417
|
+
# source://rbi//lib/rbi/printer.rb#651
|
2418
|
+
sig { override.returns(T::Boolean) }
|
2419
|
+
def oneline?; end
|
2420
|
+
|
2421
|
+
# source://rbi//lib/rbi/model.rb#1104
|
2422
|
+
sig { returns(T::Array[::RBI::SigParam]) }
|
2423
|
+
def params; end
|
2424
|
+
|
2425
|
+
# source://rbi//lib/rbi/model.rb#1107
|
2426
|
+
sig { returns(T.nilable(::String)) }
|
2427
|
+
def return_type; end
|
2428
|
+
|
2429
|
+
# @return [String, nil]
|
2430
|
+
#
|
2431
|
+
# source://rbi//lib/rbi/model.rb#1107
|
2432
|
+
def return_type=(_arg0); end
|
2433
|
+
|
2434
|
+
# source://rbi//lib/rbi/model.rb#1113
|
2435
|
+
sig { returns(T::Array[::String]) }
|
2436
|
+
def type_params; end
|
2437
|
+
|
2438
|
+
private
|
2439
|
+
|
2440
|
+
# source://rbi//lib/rbi/printer.rb#698
|
2441
|
+
sig { params(v: ::RBI::Printer).void }
|
2442
|
+
def print_as_block(v); end
|
2443
|
+
|
2444
|
+
# source://rbi//lib/rbi/printer.rb#674
|
2445
|
+
sig { params(v: ::RBI::Printer).void }
|
2446
|
+
def print_as_line(v); end
|
2447
|
+
|
2448
|
+
# source://rbi//lib/rbi/printer.rb#663
|
2449
|
+
sig { returns(T::Array[::String]) }
|
2450
|
+
def sig_modifiers; end
|
2451
|
+
end
|
2452
|
+
|
2453
|
+
# source://rbi//lib/rbi/model.rb#1176
|
2454
|
+
class RBI::SigParam < ::RBI::NodeWithComments
|
2455
|
+
# source://rbi//lib/rbi/model.rb#1191
|
2456
|
+
sig do
|
2457
|
+
params(
|
2458
|
+
name: ::String,
|
2459
|
+
type: ::String,
|
2460
|
+
loc: T.nilable(::RBI::Loc),
|
2461
|
+
comments: T::Array[::RBI::Comment],
|
2462
|
+
block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
|
2463
|
+
).void
|
2464
|
+
end
|
2465
|
+
def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2466
|
+
|
2467
|
+
# source://rbi//lib/rbi/model.rb#1199
|
2468
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2469
|
+
def ==(other); end
|
2470
|
+
|
2471
|
+
# source://rbi//lib/rbi/printer.rb#751
|
2472
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2473
|
+
def accept_printer(v); end
|
2474
|
+
|
2475
|
+
# source://rbi//lib/rbi/printer.rb#764
|
2476
|
+
sig { returns(T::Array[::String]) }
|
2477
|
+
def comments_lines; end
|
2478
|
+
|
2479
|
+
# source://rbi//lib/rbi/model.rb#1180
|
2480
|
+
sig { returns(::String) }
|
2481
|
+
def name; end
|
2482
|
+
|
2483
|
+
# source://rbi//lib/rbi/printer.rb#756
|
2484
|
+
sig { params(v: ::RBI::Printer, last: T::Boolean).void }
|
2485
|
+
def print_comment_leading_space(v, last:); end
|
2486
|
+
|
2487
|
+
# @return [String]
|
2488
|
+
#
|
2489
|
+
# source://rbi//lib/rbi/model.rb#1180
|
2490
|
+
def type; end
|
2491
|
+
end
|
2492
|
+
|
2493
|
+
# source://rbi//lib/rbi/model.rb#251
|
2494
|
+
class RBI::SingletonClass < ::RBI::Scope
|
2495
|
+
# source://rbi//lib/rbi/model.rb#261
|
2496
|
+
sig do
|
2497
|
+
params(
|
2498
|
+
loc: T.nilable(::RBI::Loc),
|
2499
|
+
comments: T::Array[::RBI::Comment],
|
2500
|
+
block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
|
2501
|
+
).void
|
2502
|
+
end
|
2503
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2504
|
+
|
2505
|
+
# source://rbi//lib/rbi/model.rb#267
|
2506
|
+
sig { override.returns(::String) }
|
2507
|
+
def fully_qualified_name; end
|
2508
|
+
|
2509
|
+
# source://rbi//lib/rbi/printer.rb#321
|
2510
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2511
|
+
def print_header(v); end
|
2512
|
+
end
|
2513
|
+
|
2514
|
+
# source://rbi//lib/rbi/model.rb#272
|
2515
|
+
class RBI::Struct < ::RBI::Scope
|
2516
|
+
# source://rbi//lib/rbi/model.rb#294
|
2517
|
+
sig do
|
2518
|
+
params(
|
2519
|
+
name: ::String,
|
2520
|
+
members: T::Array[::Symbol],
|
2521
|
+
keyword_init: T::Boolean,
|
2522
|
+
loc: T.nilable(::RBI::Loc),
|
2523
|
+
comments: T::Array[::RBI::Comment],
|
2524
|
+
block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
|
2525
|
+
).void
|
2526
|
+
end
|
2527
|
+
def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2528
|
+
|
2529
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#394
|
2530
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2531
|
+
def compatible_with?(other); end
|
2532
|
+
|
2533
|
+
# source://rbi//lib/rbi/model.rb#303
|
2534
|
+
sig { override.returns(::String) }
|
2535
|
+
def fully_qualified_name; end
|
2536
|
+
|
2537
|
+
# source://rbi//lib/rbi/model.rb#282
|
2538
|
+
sig { returns(T::Boolean) }
|
2539
|
+
def keyword_init; end
|
2540
|
+
|
2541
|
+
# @return [Boolean]
|
2542
|
+
#
|
2543
|
+
# source://rbi//lib/rbi/model.rb#282
|
2544
|
+
def keyword_init=(_arg0); end
|
2545
|
+
|
2546
|
+
# source://rbi//lib/rbi/model.rb#279
|
2547
|
+
sig { returns(T::Array[::Symbol]) }
|
2548
|
+
def members; end
|
2549
|
+
|
2550
|
+
# @return [Array<Symbol>]
|
2551
|
+
#
|
2552
|
+
# source://rbi//lib/rbi/model.rb#279
|
2553
|
+
def members=(_arg0); end
|
2554
|
+
|
2555
|
+
# source://rbi//lib/rbi/model.rb#276
|
2556
|
+
sig { returns(::String) }
|
2557
|
+
def name; end
|
2558
|
+
|
2559
|
+
# @return [String]
|
2560
|
+
#
|
2561
|
+
# source://rbi//lib/rbi/model.rb#276
|
2562
|
+
def name=(_arg0); end
|
2563
|
+
|
2564
|
+
# source://rbi//lib/rbi/printer.rb#300
|
2565
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2566
|
+
def print_header(v); end
|
2567
|
+
end
|
2568
|
+
|
2569
|
+
# Sorbet's T::Enum
|
2570
|
+
#
|
2571
|
+
# source://rbi//lib/rbi/model.rb#1317
|
2572
|
+
class RBI::TEnum < ::RBI::Class
|
2573
|
+
# source://rbi//lib/rbi/model.rb#1328
|
2574
|
+
sig do
|
2575
|
+
params(
|
2576
|
+
name: ::String,
|
2577
|
+
loc: T.nilable(::RBI::Loc),
|
2578
|
+
comments: T::Array[::RBI::Comment],
|
2579
|
+
block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
|
2580
|
+
).void
|
2581
|
+
end
|
2582
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2583
|
+
end
|
2584
|
+
|
2585
|
+
# source://rbi//lib/rbi/model.rb#1334
|
2586
|
+
class RBI::TEnumBlock < ::RBI::NodeWithComments
|
2587
|
+
include ::RBI::Indexable
|
2588
|
+
|
2589
|
+
# source://rbi//lib/rbi/model.rb#1348
|
2590
|
+
sig do
|
2591
|
+
params(
|
2592
|
+
names: T::Array[::String],
|
2593
|
+
loc: T.nilable(::RBI::Loc),
|
2594
|
+
comments: T::Array[::RBI::Comment],
|
2595
|
+
block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
|
2596
|
+
).void
|
2597
|
+
end
|
2598
|
+
def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2599
|
+
|
2600
|
+
# source://rbi//lib/rbi/model.rb#1360
|
2601
|
+
sig { params(name: ::String).void }
|
2602
|
+
def <<(name); end
|
2603
|
+
|
2604
|
+
# source://rbi//lib/rbi/printer.rb#795
|
2605
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2606
|
+
def accept_printer(v); end
|
2607
|
+
|
2608
|
+
# source://rbi//lib/rbi/model.rb#1355
|
2609
|
+
sig { returns(T::Boolean) }
|
2610
|
+
def empty?; end
|
2611
|
+
|
2612
|
+
# source://rbi//lib/rbi/index.rb#223
|
2613
|
+
sig { override.returns(T::Array[::String]) }
|
2614
|
+
def index_ids; end
|
2615
|
+
|
2616
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#556
|
2617
|
+
sig { override.params(other: ::RBI::Node).void }
|
2618
|
+
def merge_with(other); end
|
2619
|
+
|
2620
|
+
# source://rbi//lib/rbi/model.rb#1338
|
2621
|
+
sig { returns(T::Array[::String]) }
|
2622
|
+
def names; end
|
2623
|
+
|
2624
|
+
# source://rbi//lib/rbi/model.rb#1365
|
2625
|
+
sig { override.returns(::String) }
|
2626
|
+
def to_s; end
|
2627
|
+
end
|
2628
|
+
|
2629
|
+
# Sorbet's T::Struct
|
2630
|
+
#
|
2631
|
+
# source://rbi//lib/rbi/model.rb#1206
|
2632
|
+
class RBI::TStruct < ::RBI::Class
|
2633
|
+
# source://rbi//lib/rbi/model.rb#1217
|
2634
|
+
sig do
|
2635
|
+
params(
|
2636
|
+
name: ::String,
|
2637
|
+
loc: T.nilable(::RBI::Loc),
|
2638
|
+
comments: T::Array[::RBI::Comment],
|
2639
|
+
block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
|
2640
|
+
).void
|
2641
|
+
end
|
2642
|
+
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2643
|
+
end
|
2644
|
+
|
2645
|
+
# source://rbi//lib/rbi/model.rb#1255
|
2646
|
+
class RBI::TStructConst < ::RBI::TStructField
|
2647
|
+
include ::RBI::Indexable
|
2648
|
+
|
2649
|
+
# source://rbi//lib/rbi/model.rb#1268
|
2650
|
+
sig do
|
2651
|
+
params(
|
2652
|
+
name: ::String,
|
2653
|
+
type: ::String,
|
2654
|
+
default: T.nilable(::String),
|
2655
|
+
loc: T.nilable(::RBI::Loc),
|
2656
|
+
comments: T::Array[::RBI::Comment],
|
2657
|
+
block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
|
2658
|
+
).void
|
2659
|
+
end
|
2660
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2661
|
+
|
2662
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#547
|
2663
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2664
|
+
def compatible_with?(other); end
|
2665
|
+
|
2666
|
+
# source://rbi//lib/rbi/model.rb#1274
|
2667
|
+
sig { override.returns(T::Array[::String]) }
|
2668
|
+
def fully_qualified_names; end
|
2669
|
+
|
2670
|
+
# source://rbi//lib/rbi/index.rb#203
|
2671
|
+
sig { override.returns(T::Array[::String]) }
|
2672
|
+
def index_ids; end
|
2673
|
+
|
2674
|
+
# source://rbi//lib/rbi/model.rb#1280
|
2675
|
+
sig { override.returns(::String) }
|
2676
|
+
def to_s; end
|
2677
|
+
end
|
2678
|
+
|
2679
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2680
|
+
#
|
2681
|
+
# source://rbi//lib/rbi/model.rb#1223
|
2682
|
+
class RBI::TStructField < ::RBI::NodeWithComments
|
2683
|
+
abstract!
|
2684
|
+
|
2685
|
+
# source://rbi//lib/rbi/model.rb#1244
|
2686
|
+
sig do
|
2687
|
+
params(
|
2688
|
+
name: ::String,
|
2689
|
+
type: ::String,
|
2690
|
+
default: T.nilable(::String),
|
2691
|
+
loc: T.nilable(::RBI::Loc),
|
2692
|
+
comments: T::Array[::RBI::Comment]
|
2693
|
+
).void
|
2694
|
+
end
|
2695
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
2696
|
+
|
2697
|
+
# source://rbi//lib/rbi/printer.rb#773
|
2698
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2699
|
+
def accept_printer(v); end
|
2700
|
+
|
2701
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#538
|
2702
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2703
|
+
def compatible_with?(other); end
|
2704
|
+
|
2705
|
+
# source://rbi//lib/rbi/model.rb#1233
|
2706
|
+
sig { returns(T.nilable(::String)) }
|
2707
|
+
def default; end
|
2708
|
+
|
2709
|
+
# @return [String, nil]
|
2710
|
+
#
|
2711
|
+
# source://rbi//lib/rbi/model.rb#1233
|
2712
|
+
def default=(_arg0); end
|
2713
|
+
|
2714
|
+
# @abstract
|
2715
|
+
#
|
2716
|
+
# source://rbi//lib/rbi/model.rb#1252
|
2717
|
+
sig { abstract.returns(T::Array[::String]) }
|
2718
|
+
def fully_qualified_names; end
|
2719
|
+
|
2720
|
+
# source://rbi//lib/rbi/model.rb#1230
|
2721
|
+
sig { returns(::String) }
|
2722
|
+
def name; end
|
2723
|
+
|
2724
|
+
# @return [String]
|
2725
|
+
#
|
2726
|
+
# source://rbi//lib/rbi/model.rb#1230
|
2727
|
+
def name=(_arg0); end
|
2728
|
+
|
2729
|
+
# @return [String]
|
2730
|
+
#
|
2731
|
+
# source://rbi//lib/rbi/model.rb#1230
|
2732
|
+
def type; end
|
2733
|
+
|
2734
|
+
# @return [String]
|
2735
|
+
#
|
2736
|
+
# source://rbi//lib/rbi/model.rb#1230
|
2737
|
+
def type=(_arg0); end
|
2738
|
+
end
|
2739
|
+
|
2740
|
+
# source://rbi//lib/rbi/model.rb#1285
|
2741
|
+
class RBI::TStructProp < ::RBI::TStructField
|
2742
|
+
include ::RBI::Indexable
|
2743
|
+
|
2744
|
+
# source://rbi//lib/rbi/model.rb#1298
|
2745
|
+
sig do
|
2746
|
+
params(
|
2747
|
+
name: ::String,
|
2748
|
+
type: ::String,
|
2749
|
+
default: T.nilable(::String),
|
2750
|
+
loc: T.nilable(::RBI::Loc),
|
2751
|
+
comments: T::Array[::RBI::Comment],
|
2752
|
+
block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
|
2753
|
+
).void
|
2754
|
+
end
|
2755
|
+
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2756
|
+
|
2757
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#570
|
2758
|
+
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
|
2759
|
+
def compatible_with?(other); end
|
2760
|
+
|
2761
|
+
# source://rbi//lib/rbi/model.rb#1304
|
2762
|
+
sig { override.returns(T::Array[::String]) }
|
2763
|
+
def fully_qualified_names; end
|
2764
|
+
|
2765
|
+
# source://rbi//lib/rbi/index.rb#213
|
2766
|
+
sig { override.returns(T::Array[::String]) }
|
2767
|
+
def index_ids; end
|
2768
|
+
|
2769
|
+
# source://rbi//lib/rbi/model.rb#1310
|
2770
|
+
sig { override.returns(::String) }
|
2771
|
+
def to_s; end
|
2772
|
+
end
|
2773
|
+
|
2774
|
+
# source://rbi//lib/rbi/model.rb#106
|
2775
|
+
class RBI::Tree < ::RBI::NodeWithComments
|
2776
|
+
# source://rbi//lib/rbi/model.rb#119
|
2777
|
+
sig do
|
2778
|
+
params(
|
2779
|
+
loc: T.nilable(::RBI::Loc),
|
2780
|
+
comments: T::Array[::RBI::Comment],
|
2781
|
+
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
|
2782
|
+
).void
|
2783
|
+
end
|
2784
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2785
|
+
|
2786
|
+
# source://rbi//lib/rbi/model.rb#126
|
2787
|
+
sig { params(node: ::RBI::Node).void }
|
2788
|
+
def <<(node); end
|
2789
|
+
|
2790
|
+
# source://rbi//lib/rbi/printer.rb#226
|
2791
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2792
|
+
def accept_printer(v); end
|
2793
|
+
|
2794
|
+
# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66
|
2795
|
+
sig { params(with_todo_comment: T::Boolean).void }
|
2796
|
+
def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
|
2797
|
+
|
2798
|
+
# source://rbi//lib/rbi/rewriters/annotate.rb#49
|
2799
|
+
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
|
2800
|
+
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
|
2801
|
+
|
2802
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#38
|
2803
|
+
sig do
|
2804
|
+
params(
|
2805
|
+
name: ::String,
|
2806
|
+
superclass_name: T.nilable(::String),
|
2807
|
+
block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
|
2808
|
+
).returns(::RBI::Scope)
|
2809
|
+
end
|
2810
|
+
def create_class(name, superclass_name: T.unsafe(nil), &block); end
|
2811
|
+
|
2812
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#45
|
2813
|
+
sig { params(name: ::String, value: ::String).void }
|
2814
|
+
def create_constant(name, value:); end
|
2815
|
+
|
2816
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#55
|
2817
|
+
sig { params(name: ::String).void }
|
2818
|
+
def create_extend(name); end
|
2819
|
+
|
2820
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#50
|
2821
|
+
sig { params(name: ::String).void }
|
2822
|
+
def create_include(name); end
|
2823
|
+
|
2824
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#89
|
2825
|
+
sig do
|
2826
|
+
params(
|
2827
|
+
name: ::String,
|
2828
|
+
parameters: T::Array[::RBI::TypedParam],
|
2829
|
+
return_type: ::String,
|
2830
|
+
class_method: T::Boolean,
|
2831
|
+
visibility: ::RBI::Visibility,
|
2832
|
+
comments: T::Array[::RBI::Comment]
|
2833
|
+
).void
|
2834
|
+
end
|
2835
|
+
def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
|
2836
|
+
|
2837
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#113
|
2838
|
+
sig do
|
2839
|
+
params(
|
2840
|
+
name: ::String,
|
2841
|
+
sigs: T::Array[::RBI::Sig],
|
2842
|
+
parameters: T::Array[::RBI::Param],
|
2843
|
+
class_method: T::Boolean,
|
2844
|
+
visibility: ::RBI::Visibility,
|
2845
|
+
comments: T::Array[::RBI::Comment]
|
2846
|
+
).void
|
2847
|
+
end
|
2848
|
+
def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
|
2849
|
+
|
2850
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#60
|
2851
|
+
sig { params(name: ::String).void }
|
2852
|
+
def create_mixes_in_class_methods(name); end
|
2853
|
+
|
2854
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#25
|
2855
|
+
sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
2856
|
+
def create_module(name, &block); end
|
2857
|
+
|
2858
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#9
|
2859
|
+
sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
2860
|
+
def create_path(constant, &block); end
|
2861
|
+
|
2862
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#135
|
2863
|
+
sig do
|
2864
|
+
params(
|
2865
|
+
parameters: T::Hash[T.any(::String, ::Symbol), ::String],
|
2866
|
+
type_parameters: T::Array[::String],
|
2867
|
+
return_type: ::String
|
2868
|
+
).returns(::RBI::Sig)
|
2869
|
+
end
|
2870
|
+
def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end
|
2871
|
+
|
2872
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#74
|
2873
|
+
sig do
|
2874
|
+
params(
|
2875
|
+
name: ::String,
|
2876
|
+
type: ::String,
|
2877
|
+
variance: ::Symbol,
|
2878
|
+
fixed: T.nilable(::String),
|
2879
|
+
upper: T.nilable(::String),
|
2880
|
+
lower: T.nilable(::String)
|
2881
|
+
).void
|
2882
|
+
end
|
2883
|
+
def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
|
2884
|
+
|
2885
|
+
# source://rbi//lib/rbi/rewriters/deannotate.rb#41
|
2886
|
+
sig { params(annotation: ::String).void }
|
2887
|
+
def deannotate!(annotation); end
|
2888
|
+
|
2889
|
+
# source://rbi//lib/rbi/model.rb#132
|
2890
|
+
sig { returns(T::Boolean) }
|
2891
|
+
def empty?; end
|
2892
|
+
|
2893
|
+
# source://rbi//lib/rbi/rewriters/filter_versions.rb#118
|
2894
|
+
sig { params(version: ::Gem::Version).void }
|
2895
|
+
def filter_versions!(version); end
|
2896
|
+
|
2897
|
+
# source://rbi//lib/rbi/rewriters/group_nodes.rb#38
|
2898
|
+
sig { void }
|
2899
|
+
def group_nodes!; end
|
2900
|
+
|
2901
|
+
# source://rbi//lib/rbi/index.rb#68
|
2902
|
+
sig { returns(::RBI::Index) }
|
2903
|
+
def index; end
|
2904
|
+
|
2905
|
+
# source://rbi//lib/rbi/rewriters/merge_trees.rb#324
|
2906
|
+
sig do
|
2907
|
+
params(
|
2908
|
+
other: ::RBI::Tree,
|
2909
|
+
left_name: ::String,
|
2910
|
+
right_name: ::String,
|
2911
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
2912
|
+
).returns(::RBI::MergeTree)
|
2913
|
+
end
|
2914
|
+
def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
2915
|
+
|
2916
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46
|
2917
|
+
sig { void }
|
2918
|
+
def nest_non_public_methods!; end
|
2919
|
+
|
2920
|
+
# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36
|
2921
|
+
sig { void }
|
2922
|
+
def nest_singleton_methods!; end
|
2923
|
+
|
2924
|
+
# source://rbi//lib/rbi/model.rb#110
|
2925
|
+
sig { returns(T::Array[::RBI::Node]) }
|
2926
|
+
def nodes; end
|
2927
|
+
|
2928
|
+
# source://rbi//lib/rbi/printer.rb#233
|
2929
|
+
sig { override.returns(T::Boolean) }
|
2930
|
+
def oneline?; end
|
2931
|
+
|
2932
|
+
# source://rbi//lib/rbi/rewriters/sort_nodes.rb#119
|
2933
|
+
sig { void }
|
2934
|
+
def sort_nodes!; end
|
2935
|
+
|
2936
|
+
private
|
2937
|
+
|
2938
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#150
|
2939
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Node) }
|
2940
|
+
def create_node(node); end
|
2941
|
+
|
2942
|
+
# source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#145
|
2943
|
+
sig { returns(T::Hash[::String, ::RBI::Node]) }
|
2944
|
+
def nodes_cache; end
|
2945
|
+
end
|
2946
|
+
|
2947
|
+
# source://rbi//lib/rbi/model.rb#1398
|
2948
|
+
class RBI::TypeMember < ::RBI::NodeWithComments
|
2949
|
+
include ::RBI::Indexable
|
2950
|
+
|
2951
|
+
# source://rbi//lib/rbi/model.rb#1413
|
2952
|
+
sig do
|
2953
|
+
params(
|
2954
|
+
name: ::String,
|
2955
|
+
value: ::String,
|
2956
|
+
loc: T.nilable(::RBI::Loc),
|
2957
|
+
comments: T::Array[::RBI::Comment],
|
2958
|
+
block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
|
2959
|
+
).void
|
2960
|
+
end
|
2961
|
+
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
2962
|
+
|
2963
|
+
# source://rbi//lib/rbi/printer.rb#812
|
2964
|
+
sig { override.params(v: ::RBI::Printer).void }
|
2965
|
+
def accept_printer(v); end
|
2966
|
+
|
2967
|
+
# source://rbi//lib/rbi/model.rb#1421
|
2968
|
+
sig { returns(::String) }
|
2969
|
+
def fully_qualified_name; end
|
2970
|
+
|
2971
|
+
# source://rbi//lib/rbi/index.rb#183
|
2972
|
+
sig { override.returns(T::Array[::String]) }
|
2973
|
+
def index_ids; end
|
2974
|
+
|
2975
|
+
# source://rbi//lib/rbi/model.rb#1402
|
2976
|
+
sig { returns(::String) }
|
2977
|
+
def name; end
|
2978
|
+
|
2979
|
+
# source://rbi//lib/rbi/model.rb#1428
|
2980
|
+
sig { override.returns(::String) }
|
2981
|
+
def to_s; end
|
2982
|
+
|
2983
|
+
# @return [String]
|
2984
|
+
#
|
2985
|
+
# source://rbi//lib/rbi/model.rb#1402
|
2986
|
+
def value; end
|
2987
|
+
end
|
2988
|
+
|
2989
|
+
# source://rbi//lib/rbi/parser.rb#20
|
2990
|
+
class RBI::UnexpectedParserError < ::StandardError
|
2991
|
+
# source://rbi//lib/rbi/parser.rb#27
|
2992
|
+
sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
|
2993
|
+
def initialize(parent_exception, last_location); end
|
2994
|
+
|
2995
|
+
# source://rbi//lib/rbi/parser.rb#24
|
2996
|
+
sig { returns(::RBI::Loc) }
|
2997
|
+
def last_location; end
|
2998
|
+
|
2999
|
+
# source://rbi//lib/rbi/parser.rb#34
|
3000
|
+
sig { params(io: T.any(::IO, ::StringIO)).void }
|
3001
|
+
def print_debug(io: T.unsafe(nil)); end
|
3002
|
+
end
|
3003
|
+
|
3004
|
+
# source://rbi//lib/rbi/version.rb#5
|
3005
|
+
RBI::VERSION = T.let(T.unsafe(nil), String)
|
3006
|
+
|
3007
|
+
# Visibility
|
3008
|
+
#
|
3009
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
3010
|
+
#
|
3011
|
+
# source://rbi//lib/rbi/model.rb#914
|
3012
|
+
class RBI::Visibility < ::RBI::NodeWithComments
|
3013
|
+
abstract!
|
3014
|
+
|
3015
|
+
# source://rbi//lib/rbi/model.rb#924
|
3016
|
+
sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
|
3017
|
+
def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
|
3018
|
+
|
3019
|
+
# source://rbi//lib/rbi/model.rb#930
|
3020
|
+
sig { params(other: ::RBI::Visibility).returns(T::Boolean) }
|
3021
|
+
def ==(other); end
|
3022
|
+
|
3023
|
+
# source://rbi//lib/rbi/printer.rb#579
|
3024
|
+
sig { override.params(v: ::RBI::Printer).void }
|
3025
|
+
def accept_printer(v); end
|
3026
|
+
|
3027
|
+
# source://rbi//lib/rbi/model.rb#945
|
3028
|
+
sig { returns(T::Boolean) }
|
3029
|
+
def private?; end
|
3030
|
+
|
3031
|
+
# source://rbi//lib/rbi/model.rb#940
|
3032
|
+
sig { returns(T::Boolean) }
|
3033
|
+
def protected?; end
|
3034
|
+
|
3035
|
+
# source://rbi//lib/rbi/model.rb#935
|
3036
|
+
sig { returns(T::Boolean) }
|
3037
|
+
def public?; end
|
3038
|
+
|
3039
|
+
# source://rbi//lib/rbi/model.rb#921
|
3040
|
+
sig { returns(::Symbol) }
|
3041
|
+
def visibility; end
|
3042
|
+
end
|
3043
|
+
|
3044
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52
|
3045
|
+
class RBI::VisibilityGroup < ::RBI::Tree
|
3046
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59
|
3047
|
+
sig { params(visibility: ::RBI::Visibility).void }
|
3048
|
+
def initialize(visibility); end
|
3049
|
+
|
3050
|
+
# source://rbi//lib/rbi/printer.rb#848
|
3051
|
+
sig { override.params(v: ::RBI::Printer).void }
|
3052
|
+
def accept_printer(v); end
|
3053
|
+
|
3054
|
+
# source://rbi//lib/rbi/printer.rb#861
|
3055
|
+
sig { override.returns(T::Boolean) }
|
3056
|
+
def oneline?; end
|
3057
|
+
|
3058
|
+
# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56
|
3059
|
+
sig { returns(::RBI::Visibility) }
|
3060
|
+
def visibility; end
|
3061
|
+
end
|
3062
|
+
|
3063
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
3064
|
+
#
|
3065
|
+
# source://rbi//lib/rbi/visitor.rb#5
|
3066
|
+
class RBI::Visitor
|
3067
|
+
abstract!
|
3068
|
+
|
3069
|
+
# @abstract
|
3070
|
+
#
|
3071
|
+
# source://rbi//lib/rbi/visitor.rb#12
|
3072
|
+
sig { abstract.params(node: T.nilable(::RBI::Node)).void }
|
3073
|
+
def visit(node); end
|
3074
|
+
|
3075
|
+
# source://rbi//lib/rbi/visitor.rb#15
|
3076
|
+
sig { params(nodes: T::Array[::RBI::Node]).void }
|
3077
|
+
def visit_all(nodes); end
|
3078
|
+
end
|