activerecord-ejection_seat 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/Gemfile +11 -3
  4. data/Gemfile.lock +99 -35
  5. data/README.md +4 -0
  6. data/Rakefile +14 -2
  7. data/lib/activerecord-ejection_seat/ejectable.rb +2 -1
  8. data/lib/activerecord-ejection_seat/props_builder.rb +44 -0
  9. data/lib/activerecord-ejection_seat/version.rb +2 -1
  10. data/lib/activerecord-ejection_seat.rb +3 -1
  11. data/sorbet/config +3 -0
  12. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  13. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  14. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  15. data/sorbet/rbi/gems/activemodel@7.0.4.rbi +8 -0
  16. data/sorbet/rbi/gems/activerecord@7.0.4.rbi +11 -0
  17. data/sorbet/rbi/gems/activesupport@7.0.4.rbi +93 -0
  18. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  19. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1064 -0
  21. data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
  22. data/sorbet/rbi/gems/io-console@0.6.0.rbi +8 -0
  23. data/sorbet/rbi/gems/irb@1.6.2.rbi +342 -0
  24. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  25. data/sorbet/rbi/gems/language_server-protocol@3.17.0.2.rbi +8 -0
  26. data/sorbet/rbi/gems/minitest@5.16.3.rbi +8 -0
  27. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  28. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  29. data/sorbet/rbi/gems/parser@3.1.3.0.rbi +6878 -0
  30. data/sorbet/rbi/gems/prettier_print@1.1.0.rbi +8 -0
  31. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +397 -0
  32. data/sorbet/rbi/gems/rake@13.0.6.rbi +2946 -0
  33. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  34. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3126 -0
  35. data/sorbet/rbi/gems/reline@0.3.2.rbi +8 -0
  36. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4660 -0
  37. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10588 -0
  38. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +7817 -0
  39. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +4994 -0
  40. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1477 -0
  41. data/sorbet/rbi/gems/rspec@3.12.0.rbi +10 -0
  42. data/sorbet/rbi/gems/rubocop-ast@1.24.0.rbi +6790 -0
  43. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +354 -0
  44. data/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi +7650 -0
  45. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +1014 -0
  46. data/sorbet/rbi/gems/rubocop@1.41.0.rbi +52148 -0
  47. data/sorbet/rbi/gems/ruby-lsp@0.3.7.rbi +13 -0
  48. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1212 -0
  49. data/sorbet/rbi/gems/sorbet-struct-comparable@1.3.0.rbi +16 -0
  50. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  51. data/sorbet/rbi/gems/sqlite3@1.5.4.rbi +1600 -0
  52. data/sorbet/rbi/gems/syntax_tree@4.3.0.rbi +8 -0
  53. data/sorbet/rbi/gems/tapioca@0.10.4.rbi +3032 -0
  54. data/sorbet/rbi/gems/thor@1.2.1.rbi +3950 -0
  55. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
  56. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +46 -0
  57. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4265 -0
  58. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2498 -0
  59. data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +391 -0
  60. data/sorbet/rbi/gems/yard@0.9.28.rbi +17033 -0
  61. data/sorbet/rbi/todo.rbi +9 -0
  62. data/sorbet/tapioca/config.yml +2 -0
  63. data/sorbet/tapioca/require.rb +4 -0
  64. metadata +71 -4
  65. data/activerecord-ejection_seat.gemspec +0 -39
@@ -0,0 +1,4265 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `unparser` gem.
5
+ # Please instead update this file by running `bin/tapioca gem unparser`.
6
+
7
+ # Library namespace
8
+ module Unparser
9
+ class << self
10
+ # Construct a parser buffer from string
11
+ #
12
+ # @param source [String]
13
+ # @return [Parser::Source::Buffer]
14
+ #
15
+ # source://unparser//lib/unparser.rb#147
16
+ def buffer(source, identification = T.unsafe(nil)); end
17
+
18
+ # Parse string into AST
19
+ #
20
+ # @param source [String]
21
+ # @return [Parser::AST::Node, nil]
22
+ #
23
+ # source://unparser//lib/unparser.rb#105
24
+ def parse(source); end
25
+
26
+ # Parse string into either syntax error or AST
27
+ #
28
+ # @param source [String]
29
+ # @return [Either<Parser::SyntaxError, (Parser::ASTNode, nil)>]
30
+ #
31
+ # source://unparser//lib/unparser.rb#114
32
+ def parse_either(source); end
33
+
34
+ # Parse string into AST, with comments
35
+ #
36
+ # @param source [String]
37
+ # @return [Parser::AST::Node]
38
+ #
39
+ # source://unparser//lib/unparser.rb#125
40
+ def parse_with_comments(source); end
41
+
42
+ # Parser instance that produces AST unparser understands
43
+ #
44
+ # @api private
45
+ # @return [Parser::Base]
46
+ #
47
+ # source://unparser//lib/unparser.rb#134
48
+ def parser; end
49
+
50
+ # Unparse an AST (and, optionally, comments) into a string
51
+ #
52
+ # @api public
53
+ # @param node [Parser::AST::Node, nil]
54
+ # @param comment_array [Array]
55
+ # @raise InvalidNodeError
56
+ # if the node passed is invalid
57
+ # @return [String]
58
+ #
59
+ # source://unparser//lib/unparser.rb#60
60
+ def unparse(node, comment_array = T.unsafe(nil)); end
61
+
62
+ # Unparse capturing errors
63
+ #
64
+ # This is mostly useful for writing testing tools against unparser.
65
+ #
66
+ # @param node [Parser::AST::Node, nil]
67
+ # @return [Either<Exception, String>]
68
+ #
69
+ # source://unparser//lib/unparser.rb#96
70
+ def unparse_either(node); end
71
+
72
+ # Unparse with validation
73
+ #
74
+ # @param node [Parser::AST::Node, nil]
75
+ # @param comment_array [Array]
76
+ # @return [Either<Validation,String>]
77
+ #
78
+ # source://unparser//lib/unparser.rb#78
79
+ def unparse_validate(node, comment_array = T.unsafe(nil)); end
80
+ end
81
+ end
82
+
83
+ # Namespace for AST processing tools
84
+ module Unparser::AST
85
+ class << self
86
+ # Return local variables that get assigned in scope
87
+ #
88
+ # @api private
89
+ # @param node [Parser::AST::Node]
90
+ # @return [Set<Symbol>]
91
+ #
92
+ # source://unparser//lib/unparser/ast.rb#57
93
+ def local_variable_assignments(node); end
94
+
95
+ # Return local variables read
96
+ #
97
+ # @api private
98
+ # @param node [Parser::AST::Node]
99
+ # @return [Set<Symbol>]
100
+ #
101
+ # source://unparser//lib/unparser/ast.rb#72
102
+ def local_variable_reads(node); end
103
+
104
+ # Test for local variable inherited scope reset
105
+ #
106
+ # @api private
107
+ # @param node [Parser::AST::Node]
108
+ # @return [Boolean]
109
+ #
110
+ # source://unparser//lib/unparser/ast.rb#33
111
+ def not_close_scope?(node); end
112
+
113
+ # Test for local variable scope reset
114
+ #
115
+ # @api private
116
+ # @param node [Parser::AST::Node]
117
+ # @return [Boolean]
118
+ #
119
+ # source://unparser//lib/unparser/ast.rb#45
120
+ def not_reset_scope?(node); end
121
+ end
122
+ end
123
+
124
+ # Nodes that assign a local variable
125
+ #
126
+ # source://unparser//lib/unparser/ast.rb#14
127
+ Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set)
128
+
129
+ # source://unparser//lib/unparser/ast.rb#11
130
+ Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array)
131
+
132
+ # AST enumerator
133
+ class Unparser::AST::Enumerator
134
+ include ::Enumerable
135
+ include ::Unparser::Equalizer::Methods
136
+ include ::Unparser::Adamantium
137
+ include ::Unparser::Adamantium::InstanceMethods
138
+ extend ::Unparser::Adamantium::ModuleMethods
139
+ extend ::Unparser::Adamantium::ClassMethods
140
+
141
+ # Return each node
142
+ #
143
+ # @api private
144
+ # @return [Enumerator<Parser::AST::Node>] if no block given
145
+ # @return [self] otherwise
146
+ #
147
+ # source://unparser//lib/unparser/ast.rb#106
148
+ def each(&block); end
149
+
150
+ # Return nodes selected by type
151
+ #
152
+ # @api private
153
+ # @param type [Symbol]
154
+ # @return [Enumerable<Parser::AST::Node>]
155
+ #
156
+ # source://unparser//lib/unparser/ast.rb#130
157
+ def type(type); end
158
+
159
+ # Return nodes selected by types
160
+ #
161
+ # @api private
162
+ # @param types [Enumerable<Symbol>]
163
+ # @return [Enumerable<Parser::AST::Node>]
164
+ #
165
+ # source://unparser//lib/unparser/ast.rb#118
166
+ def types(types); end
167
+
168
+ class << self
169
+ # Return new instance
170
+ #
171
+ # @api private
172
+ # @param node [Parser::AST::Node]
173
+ # @param controller [#call(node)]
174
+ # @return [Enumerator]
175
+ #
176
+ # source://unparser//lib/unparser/ast.rb#92
177
+ def new(node, controller = T.unsafe(nil)); end
178
+
179
+ private
180
+
181
+ # Return frozne set of objects
182
+ #
183
+ # @api private
184
+ # @param enumerable [Enumerable]
185
+ # @return [Set]
186
+ #
187
+ # source://unparser//lib/unparser/ast.rb#142
188
+ def set(enumerable); end
189
+
190
+ # Return nodes of type
191
+ #
192
+ # @api private
193
+ # @param node [Parser::AST::Node]
194
+ # @param type [Symbol]
195
+ # @return [Enumerable<Parser::AST::Node]] Enumerable<Parser::AST::Node]
196
+ #
197
+ # source://unparser//lib/unparser/ast.rb#156
198
+ def type(node, type); end
199
+ end
200
+ end
201
+
202
+ # source://unparser//lib/unparser/ast.rb#6
203
+ Unparser::AST::FIRST_CHILD = T.let(T.unsafe(nil), Proc)
204
+
205
+ # source://unparser//lib/unparser/ast.rb#10
206
+ Unparser::AST::INHERIT_NODES = T.let(T.unsafe(nil), Array)
207
+
208
+ # Calculated local variable scope for a given node
209
+ class Unparser::AST::LocalVariableScope
210
+ include ::Unparser::Equalizer::Methods
211
+ include ::Unparser::Adamantium
212
+ include ::Unparser::Adamantium::InstanceMethods
213
+ include ::Enumerable
214
+ extend ::Unparser::Adamantium::ModuleMethods
215
+ extend ::Unparser::Adamantium::ClassMethods
216
+
217
+ # Initialize object
218
+ #
219
+ # @api private
220
+ # @param node [Parser::AST::Node]
221
+ # @return [undefined]
222
+ #
223
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#18
224
+ def initialize(node); end
225
+
226
+ # Test if local variable was first at given assignment
227
+ #
228
+ # @api private
229
+ # @param node [Parser::AST::Node]
230
+ # @return [Boolean]
231
+ #
232
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#35
233
+ def first_assignment?(node); end
234
+
235
+ # Test if local variables where first assigned in body and read by conditional
236
+ #
237
+ # @api private
238
+ # @param body [Parser::AST::Node]
239
+ # @param condition [Parser::AST::Node]
240
+ # @return [Boolean]
241
+ #
242
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#64
243
+ def first_assignment_in?(left, right); end
244
+
245
+ # Test if local variable is defined for given node
246
+ #
247
+ # @api private
248
+ # @param node [Parser::AST::Node]
249
+ # @param name [Symbol]
250
+ # @return [Boolean]
251
+ #
252
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#51
253
+ def local_variable_defined_for_node?(node, name); end
254
+
255
+ private
256
+
257
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#76
258
+ def match(needle); end
259
+ end
260
+
261
+ # Local variable scope enumerator
262
+ class Unparser::AST::LocalVariableScopeEnumerator
263
+ include ::Enumerable
264
+
265
+ # Initialize object
266
+ #
267
+ # @api private
268
+ # @return [undefined]
269
+ #
270
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#94
271
+ def initialize; end
272
+
273
+ # Enumerate local variable scope scope
274
+ #
275
+ # @api private
276
+ # @return [self] if block given
277
+ # @return [Enumerator<Array<Symbol>>] ]
278
+ # otherwise
279
+ #
280
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#121
281
+ def each(node, &block); end
282
+
283
+ private
284
+
285
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#127
286
+ def current; end
287
+
288
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#156
289
+ def define(name); end
290
+
291
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#141
292
+ def enter(node); end
293
+
294
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#152
295
+ def leave(node); end
296
+
297
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#168
298
+ def pop; end
299
+
300
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#164
301
+ def push_inherit; end
302
+
303
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#160
304
+ def push_reset; end
305
+
306
+ # @yield [node, current.dup, before]
307
+ #
308
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#131
309
+ def visit(node, &block); end
310
+
311
+ class << self
312
+ # Enumerate each node with its local variable scope
313
+ #
314
+ # @api private
315
+ # @param node [Parser::AST::Node]
316
+ # @return [self]
317
+ #
318
+ # source://unparser//lib/unparser/ast/local_variable_scope.rb#106
319
+ def each(node, &block); end
320
+ end
321
+ end
322
+
323
+ # source://unparser//lib/unparser/ast.rb#9
324
+ Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array)
325
+
326
+ # source://unparser//lib/unparser/ast.rb#7
327
+ Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc)
328
+
329
+ # Controlled AST walker walking the AST in deeth first search with pre order
330
+ class Unparser::AST::Walker
331
+ include ::Unparser::Equalizer::Methods
332
+
333
+ # Call walker with node
334
+ #
335
+ # @api private
336
+ # @param node [Parser::AST::Node]
337
+ # @return [undefined]
338
+ #
339
+ # source://unparser//lib/unparser/ast.rb#188
340
+ def call(node); end
341
+
342
+ class << self
343
+ # Call ast walker
344
+ #
345
+ # @api private
346
+ # @param node [Parser::AST::Node]
347
+ # @return [self]
348
+ #
349
+ # source://unparser//lib/unparser/ast.rb#175
350
+ def call(node, controller = T.unsafe(nil), &block); end
351
+ end
352
+ end
353
+
354
+ # Module to allow class and methods to be abstract
355
+ #
356
+ # Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type.
357
+ module Unparser::AbstractType
358
+ mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations
359
+
360
+ class << self
361
+ private
362
+
363
+ # Define the new method on the abstract type
364
+ #
365
+ # Ensures that the instance cannot be of the abstract type
366
+ # and must be a descendant.
367
+ #
368
+ # @api private
369
+ # @param abstract_class [Class]
370
+ # @return [undefined]
371
+ #
372
+ # source://unparser//lib/unparser/abstract_type.rb#35
373
+ def create_new_method(abstract_class); end
374
+
375
+ # Hook called when module is included
376
+ #
377
+ # @api private
378
+ # @param descendant [Module] the module or class including AbstractType
379
+ # @return [undefined]
380
+ #
381
+ # source://unparser//lib/unparser/abstract_type.rb#17
382
+ def included(descendant); end
383
+ end
384
+ end
385
+
386
+ module Unparser::AbstractType::AbstractMethodDeclarations
387
+ # Create abstract instance methods
388
+ #
389
+ # @api public
390
+ # @example
391
+ # class Foo
392
+ # include AbstractType
393
+ #
394
+ # # Create an abstract instance method
395
+ # abstract_method :some_method
396
+ # end
397
+ # @param names [Array<#to_s>]
398
+ # @return [self]
399
+ #
400
+ # source://unparser//lib/unparser/abstract_type.rb#64
401
+ def abstract_method(*names); end
402
+
403
+ # Create abstract singleton methods
404
+ #
405
+ # @api private
406
+ # @example
407
+ # class Foo
408
+ # include AbstractType
409
+ #
410
+ # # Create an abstract instance method
411
+ # abstract_singleton_method :some_method
412
+ # end
413
+ # @param names [Array<#to_s>]
414
+ # @return [self]
415
+ #
416
+ # source://unparser//lib/unparser/abstract_type.rb#84
417
+ def abstract_singleton_method(*names); end
418
+
419
+ private
420
+
421
+ # Create abstract instance method
422
+ #
423
+ # @api private
424
+ # @param name [#to_s] the name of the method to create
425
+ # @return [undefined]
426
+ #
427
+ # source://unparser//lib/unparser/abstract_type.rb#113
428
+ def create_abstract_instance_method(name); end
429
+
430
+ # Create abstract singleton method
431
+ #
432
+ # @api private
433
+ # @param name [#to_s] the name of the method to create
434
+ # @return [undefined]
435
+ #
436
+ # source://unparser//lib/unparser/abstract_type.rb#99
437
+ def create_abstract_singleton_method(name); end
438
+ end
439
+
440
+ # Allows objects to be made immutable
441
+ #
442
+ # Original code before vendoring and reduction from: https://github.com/dkubb/adamantium.
443
+ module Unparser::Adamantium
444
+ include ::Unparser::Adamantium::InstanceMethods
445
+
446
+ mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods
447
+ mixes_in_class_methods ::Unparser::Adamantium::ClassMethods
448
+
449
+ class << self
450
+ private
451
+
452
+ # ModuleMethods
453
+ #
454
+ # source://unparser//lib/unparser/adamantium.rb#141
455
+ def included(descendant); end
456
+ end
457
+ end
458
+
459
+ # Methods mixed in to adamantium classes
460
+ module Unparser::Adamantium::ClassMethods
461
+ # Instantiate a new frozen object
462
+ #
463
+ # @api public
464
+ # @return [Object]
465
+ #
466
+ # source://unparser//lib/unparser/adamantium.rb#77
467
+ def new(*_arg0); end
468
+ end
469
+
470
+ module Unparser::Adamantium::InstanceMethods
471
+ # A noop #dup for immutable objects
472
+ #
473
+ # @api public
474
+ # @return [self]
475
+ #
476
+ # source://unparser//lib/unparser/adamantium.rb#14
477
+ def dup; end
478
+
479
+ # Freeze the object
480
+ #
481
+ # @api public
482
+ # @return [Object]
483
+ #
484
+ # source://unparser//lib/unparser/adamantium.rb#23
485
+ def freeze; end
486
+
487
+ private
488
+
489
+ # source://unparser//lib/unparser/adamantium.rb#30
490
+ def memoized_method_cache; end
491
+ end
492
+
493
+ # Storage for memoized methods
494
+ class Unparser::Adamantium::Memory
495
+ # Initialize the memory storage for memoized methods
496
+ #
497
+ # @api private
498
+ # @return [undefined]
499
+ #
500
+ # source://unparser//lib/unparser/adamantium.rb#44
501
+ def initialize(values); end
502
+
503
+ # Fetch the value from memory, or evaluate if it does not exist
504
+ #
505
+ # @api public
506
+ # @param name [Symbol]
507
+ # @yieldreturn [Object] the value to memoize
508
+ #
509
+ # source://unparser//lib/unparser/adamantium.rb#58
510
+ def fetch(name); end
511
+ end
512
+
513
+ # Build the memoized method
514
+ class Unparser::Adamantium::MethodBuilder
515
+ # Initialize an object to build a memoized method
516
+ #
517
+ # @api private
518
+ # @param descendant [Module]
519
+ # @param method_name [Symbol]
520
+ # @return [undefined]
521
+ #
522
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#47
523
+ def initialize(descendant, method_name); end
524
+
525
+ # Build a new memoized method
526
+ #
527
+ # @api public
528
+ # @example
529
+ # method_builder.call # => creates new method
530
+ # @return [UnboundMethod]
531
+ #
532
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#63
533
+ def call; end
534
+
535
+ private
536
+
537
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#72
538
+ def assert_arity(arity); end
539
+
540
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#83
541
+ def create_memoized_method; end
542
+
543
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#78
544
+ def remove_original_method; end
545
+
546
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#97
547
+ def set_method_visibility; end
548
+
549
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#101
550
+ def visibility; end
551
+ end
552
+
553
+ # Raised when a block is passed to a memoized method
554
+ class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError
555
+ # Initialize a block not allowed exception
556
+ #
557
+ # @api private
558
+ # @param descendant [Module]
559
+ # @param method [Symbol]
560
+ # @return [BlockNotAllowedError] a new instance of BlockNotAllowedError
561
+ #
562
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#33
563
+ def initialize(descendant, method); end
564
+ end
565
+
566
+ # Raised when the method arity is invalid
567
+ class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError
568
+ # Initialize an invalid arity exception
569
+ #
570
+ # @api private
571
+ # @param descendant [Module]
572
+ # @param method [Symbol]
573
+ # @param arity [Integer]
574
+ # @return [InvalidArityError] a new instance of InvalidArityError
575
+ #
576
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#18
577
+ def initialize(descendant, method, arity); end
578
+ end
579
+
580
+ # Methods mixed in to adamantium modules
581
+ module Unparser::Adamantium::ModuleMethods
582
+ # Memoize a list of methods
583
+ #
584
+ # @api public
585
+ # @param methods [Array<#to_s>] a list of methods to memoize
586
+ # @return [self]
587
+ #
588
+ # source://unparser//lib/unparser/adamantium.rb#94
589
+ def memoize(*methods); end
590
+
591
+ # Test if method is memoized
592
+ #
593
+ # @param name [Symbol]
594
+ # @return [Bool]
595
+ #
596
+ # source://unparser//lib/unparser/adamantium.rb#104
597
+ def memoized?(method_name); end
598
+
599
+ # Return unmemoized instance method
600
+ #
601
+ # @api public
602
+ # @param name [Symbol]
603
+ # @raise [NameError] raised if the method is unknown
604
+ # @return [UnboundMethod] the memoized method
605
+ #
606
+ # source://unparser//lib/unparser/adamantium.rb#119
607
+ def unmemoized_instance_method(method_name); end
608
+
609
+ private
610
+
611
+ # source://unparser//lib/unparser/adamantium.rb#127
612
+ def memoize_method(method_name); end
613
+
614
+ # source://unparser//lib/unparser/adamantium.rb#135
615
+ def memoized_methods; end
616
+ end
617
+
618
+ # Original code before vendoring and reduction from: https://github.com/mbj/anima.
619
+ class Unparser::Anima < ::Module
620
+ include ::Unparser::Equalizer::Methods
621
+ include ::Unparser::Adamantium
622
+ include ::Unparser::Adamantium::InstanceMethods
623
+ extend ::Unparser::Adamantium::ModuleMethods
624
+ extend ::Unparser::Adamantium::ClassMethods
625
+
626
+ # Initialize object
627
+ #
628
+ #
629
+ # @return [undefined]
630
+ #
631
+ # source://unparser//lib/unparser/anima.rb#18
632
+ def initialize(*names); end
633
+
634
+ # Return new anima with attributes added
635
+ #
636
+ # @example
637
+ # anima = Anima.new(:foo)
638
+ # anima.add(:bar) # equals Anima.new(:foo, :bar)
639
+ # @return [Anima]
640
+ #
641
+ # source://unparser//lib/unparser/anima.rb#31
642
+ def add(*names); end
643
+
644
+ # Return attribute names
645
+ #
646
+ # @return [Enumerable<Symbol>]
647
+ #
648
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
649
+ def attribute_names(&block); end
650
+
651
+ # Return names
652
+ #
653
+ # @return [AttributeSet]
654
+ #
655
+ # source://unparser//lib/unparser/anima.rb#11
656
+ def attributes; end
657
+
658
+ # Return attributes hash for instance
659
+ #
660
+ # @param object [Object]
661
+ # @return [Hash]
662
+ #
663
+ # source://unparser//lib/unparser/anima.rb#52
664
+ def attributes_hash(object); end
665
+
666
+ # Initialize instance
667
+ #
668
+ # @param object [Object]
669
+ # @param attribute_hash [Hash]
670
+ # @return [self]
671
+ #
672
+ # source://unparser//lib/unparser/anima.rb#73
673
+ def initialize_instance(object, attribute_hash); end
674
+
675
+ # Return new anima with attributes removed
676
+ #
677
+ # @example
678
+ # anima = Anima.new(:foo, :bar)
679
+ # anima.remove(:bar) # equals Anima.new(:foo)
680
+ # @return [Anima]
681
+ #
682
+ # source://unparser//lib/unparser/anima.rb#43
683
+ def remove(*names); end
684
+
685
+ private
686
+
687
+ # Fail unless keys in +attribute_hash+ matches #attribute_names
688
+ #
689
+ # @param klass [Class] the class being initialized
690
+ # @param attribute_hash [Hash] the attributes to initialize +object+ with
691
+ # @raise [Error]
692
+ # @return [undefined]
693
+ #
694
+ # source://unparser//lib/unparser/anima.rb#164
695
+ def assert_known_attributes(klass, attribute_hash); end
696
+
697
+ # Infect the instance with anima
698
+ #
699
+ # @param scope [Class, Module]
700
+ # @return [undefined]
701
+ #
702
+ # source://unparser//lib/unparser/anima.rb#137
703
+ def included(descendant); end
704
+
705
+ # Return new instance
706
+ #
707
+ # @param attributes [Enumerable<Symbol>]
708
+ # @return [Anima]
709
+ #
710
+ # source://unparser//lib/unparser/anima.rb#180
711
+ def new(attributes); end
712
+ end
713
+
714
+ # An attribute
715
+ class Unparser::Anima::Attribute
716
+ include ::Unparser::Equalizer::Methods
717
+ include ::Unparser::Adamantium
718
+ include ::Unparser::Adamantium::InstanceMethods
719
+ extend ::Unparser::Adamantium::ModuleMethods
720
+ extend ::Unparser::Adamantium::ClassMethods
721
+
722
+ # Initialize attribute
723
+ #
724
+ # @param name [Symbol]
725
+ # @return [Attribute] a new instance of Attribute
726
+ #
727
+ # source://unparser//lib/unparser/anima/attribute.rb#12
728
+ def initialize(name); end
729
+
730
+ # Get attribute value from object
731
+ #
732
+ # @param object [Object]
733
+ # @return [Object]
734
+ #
735
+ # source://unparser//lib/unparser/anima/attribute.rb#42
736
+ def get(object); end
737
+
738
+ # Return instance variable name
739
+ #
740
+ # @return [Symbol]
741
+ #
742
+ # source://unparser//lib/unparser/anima/attribute.rb#25
743
+ def instance_variable_name; end
744
+
745
+ # Load attribute
746
+ #
747
+ # @param object [Object]
748
+ # @param attributes [Hash]
749
+ # @return [self]
750
+ #
751
+ # source://unparser//lib/unparser/anima/attribute.rb#33
752
+ def load(object, attributes); end
753
+
754
+ # Return attribute name
755
+ #
756
+ # @return [Symbol]
757
+ #
758
+ # source://unparser//lib/unparser/anima/attribute.rb#20
759
+ def name; end
760
+
761
+ # Set attribute value in object
762
+ #
763
+ # @param object [Object]
764
+ # @param value [Object]
765
+ # @return [self]
766
+ #
767
+ # source://unparser//lib/unparser/anima/attribute.rb#52
768
+ def set(object, value); end
769
+ end
770
+
771
+ # Abstract base class for anima errors
772
+ class Unparser::Anima::Error < ::RuntimeError
773
+ # Initialize object
774
+ #
775
+ # @param klass [Class] the class being initialized
776
+ # @param missing [Enumerable<Symbol>]
777
+ # @param unknown [Enumerable<Symbol>]
778
+ # @return [undefined]
779
+ #
780
+ # source://unparser//lib/unparser/anima/error.rb#18
781
+ def initialize(klass, missing, unknown); end
782
+ end
783
+
784
+ # source://unparser//lib/unparser/anima/error.rb#7
785
+ Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String)
786
+
787
+ # Static instance methods for anima infected classes
788
+ module Unparser::Anima::InstanceMethods
789
+ # Initialize an anima infected object
790
+ #
791
+ #
792
+ # @param attributes [#to_h] a hash that matches anima defined attributes
793
+ # @return [undefined]
794
+ #
795
+ # source://unparser//lib/unparser/anima.rb#91
796
+ def initialize(attributes); end
797
+
798
+ # Return a hash representation of an anima infected object
799
+ #
800
+ # @api public
801
+ # @example
802
+ # anima.to_h # => { :foo => : bar }
803
+ # @return [Hash]
804
+ #
805
+ # source://unparser//lib/unparser/anima.rb#104
806
+ def to_h; end
807
+
808
+ # Return updated instance
809
+ #
810
+ # @api public
811
+ # @example
812
+ # klass = Class.new do
813
+ # include Anima.new(:foo, :bar)
814
+ # end
815
+ #
816
+ # foo = klass.new(:foo => 1, :bar => 2)
817
+ # updated = foo.with(:foo => 3)
818
+ # updated.foo # => 3
819
+ # updated.bar # => 2
820
+ # @param attributes [Hash]
821
+ # @return [Anima]
822
+ #
823
+ # source://unparser//lib/unparser/anima.rb#125
824
+ def with(attributes); end
825
+ end
826
+
827
+ # Buffer used to emit into
828
+ class Unparser::Buffer
829
+ # Initialize object
830
+ #
831
+ # @api private
832
+ # @return [undefined]
833
+ #
834
+ # source://unparser//lib/unparser/buffer.rb#16
835
+ def initialize; end
836
+
837
+ # Append string
838
+ #
839
+ # @api private
840
+ # @param string [String]
841
+ # @return [self]
842
+ #
843
+ # source://unparser//lib/unparser/buffer.rb#29
844
+ def append(string); end
845
+
846
+ # Append a string without an indentation prefix
847
+ #
848
+ # @api private
849
+ # @param string [String]
850
+ # @return [self]
851
+ #
852
+ # source://unparser//lib/unparser/buffer.rb#45
853
+ def append_without_prefix(string); end
854
+
855
+ # Capture the content written to the buffer within the block
856
+ #
857
+ # @api private
858
+ # @return [String]
859
+ #
860
+ # source://unparser//lib/unparser/buffer.rb#116
861
+ def capture_content; end
862
+
863
+ # Return content of buffer
864
+ #
865
+ # @api private
866
+ # @return [String]
867
+ #
868
+ # source://unparser//lib/unparser/buffer.rb#106
869
+ def content; end
870
+
871
+ # Test for a fresh line
872
+ #
873
+ # @api private
874
+ # @return [Boolean]
875
+ #
876
+ # source://unparser//lib/unparser/buffer.rb#96
877
+ def fresh_line?; end
878
+
879
+ # Increase indent
880
+ #
881
+ # @api private
882
+ # @return [self]
883
+ #
884
+ # source://unparser//lib/unparser/buffer.rb#56
885
+ def indent; end
886
+
887
+ # Write newline
888
+ #
889
+ # @api private
890
+ # @return [self]
891
+ #
892
+ # source://unparser//lib/unparser/buffer.rb#78
893
+ def nl; end
894
+
895
+ # source://unparser//lib/unparser/buffer.rb#83
896
+ def root_indent; end
897
+
898
+ # Decrease indent
899
+ #
900
+ # @api private
901
+ # @return [self]
902
+ #
903
+ # source://unparser//lib/unparser/buffer.rb#67
904
+ def unindent; end
905
+
906
+ # Write raw fragment to buffer
907
+ #
908
+ # Does not do indentation logic.
909
+ #
910
+ # @param fragment [String]
911
+ # @return [self]
912
+ #
913
+ # source://unparser//lib/unparser/buffer.rb#129
914
+ def write(fragment); end
915
+
916
+ private
917
+
918
+ # source://unparser//lib/unparser/buffer.rb#138
919
+ def prefix; end
920
+ end
921
+
922
+ # source://unparser//lib/unparser/buffer.rb#136
923
+ Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String)
924
+
925
+ # source://unparser//lib/unparser/buffer.rb#8
926
+ Unparser::Buffer::NL = T.let(T.unsafe(nil), String)
927
+
928
+ # Unparser specific AST builder defaulting to modern AST format
929
+ class Unparser::Builder < ::Parser::Builders::Default
930
+ # @return [Builder] a new instance of Builder
931
+ #
932
+ # source://unparser//lib/unparser.rb#26
933
+ def initialize; end
934
+ end
935
+
936
+ # Unparser CLI implementation
937
+ class Unparser::CLI
938
+ # Initialize object
939
+ #
940
+ # @api private
941
+ # @param arguments [Array<String>]
942
+ # @return [undefined]
943
+ #
944
+ # source://unparser//lib/unparser/cli.rb#74
945
+ def initialize(arguments); end
946
+
947
+ # Add options
948
+ #
949
+ #
950
+ # @api private
951
+ # @param builder [OptionParser]
952
+ # @return [undefined]
953
+ #
954
+ # source://unparser//lib/unparser/cli.rb#102
955
+ def add_options(builder); end
956
+
957
+ # Return exit status
958
+ #
959
+ # @api private
960
+ # @return [Integer]
961
+ #
962
+ # source://unparser//lib/unparser/cli.rb#132
963
+ def exit_status; end
964
+
965
+ private
966
+
967
+ # source://unparser//lib/unparser/cli.rb#155
968
+ def effective_targets; end
969
+
970
+ # source://unparser//lib/unparser/cli.rb#143
971
+ def process_target(target); end
972
+
973
+ # source://unparser//lib/unparser/cli.rb#170
974
+ def targets(file_name); end
975
+
976
+ class << self
977
+ # Run CLI
978
+ #
979
+ # @api private
980
+ # @param arguments [Array<String>]
981
+ # @return [Integer] the exit status
982
+ #
983
+ # source://unparser//lib/unparser/cli.rb#63
984
+ def run(*arguments); end
985
+ end
986
+ end
987
+
988
+ # source://unparser//lib/unparser/cli.rb#8
989
+ Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer)
990
+
991
+ # source://unparser//lib/unparser/cli.rb#7
992
+ Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer)
993
+
994
+ class Unparser::CLI::Target
995
+ include ::Unparser::AbstractType
996
+ extend ::Unparser::AbstractType::AbstractMethodDeclarations
997
+
998
+ class << self
999
+ # source://unparser//lib/unparser/abstract_type.rb#36
1000
+ def new(*args, &block); end
1001
+ end
1002
+ end
1003
+
1004
+ # Path target
1005
+ class Unparser::CLI::Target::Path < ::Unparser::CLI::Target
1006
+ include ::Unparser::Equalizer::Methods
1007
+
1008
+ # Literal for this target
1009
+ #
1010
+ # @return [Validation]
1011
+ #
1012
+ # source://unparser//lib/unparser/cli.rb#27
1013
+ def literal_validation; end
1014
+
1015
+ # Validation for this target
1016
+ #
1017
+ # @return [Validation]
1018
+ #
1019
+ # source://unparser//lib/unparser/cli.rb#20
1020
+ def validation; end
1021
+ end
1022
+
1023
+ # String target
1024
+ class Unparser::CLI::Target::String
1025
+ include ::Unparser::Equalizer::Methods
1026
+
1027
+ # Literal for this target
1028
+ #
1029
+ # @return [Validation]
1030
+ #
1031
+ # source://unparser//lib/unparser/cli.rb#46
1032
+ def literal_validation; end
1033
+
1034
+ # Validation for this target
1035
+ #
1036
+ # @return [Validation]
1037
+ #
1038
+ # source://unparser//lib/unparser/cli.rb#39
1039
+ def validation; end
1040
+ end
1041
+
1042
+ # Class to colorize strings
1043
+ class Unparser::Color
1044
+ include ::Unparser::Equalizer::Methods
1045
+ include ::Unparser::Adamantium
1046
+ include ::Unparser::Adamantium::InstanceMethods
1047
+ extend ::Unparser::Adamantium::ModuleMethods
1048
+ extend ::Unparser::Adamantium::ClassMethods
1049
+
1050
+ # Format text with color
1051
+ #
1052
+ # @param text [String]
1053
+ # @return [String]
1054
+ #
1055
+ # source://unparser//lib/unparser/color.rb#13
1056
+ def format(text); end
1057
+ end
1058
+
1059
+ # source://unparser//lib/unparser/color.rb#36
1060
+ Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color)
1061
+
1062
+ # source://unparser//lib/unparser/color.rb#17
1063
+ Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped)
1064
+
1065
+ # source://unparser//lib/unparser/color.rb#35
1066
+ Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color)
1067
+
1068
+ # Holds the comments that remain to be emitted
1069
+ class Unparser::Comments
1070
+ # Initialize object
1071
+ #
1072
+ # @api private
1073
+ # @param comments [Array]
1074
+ # @return [undefined]
1075
+ #
1076
+ # source://unparser//lib/unparser/comments.rb#30
1077
+ def initialize(comments); end
1078
+
1079
+ # Consume part or all of the node
1080
+ #
1081
+ # @api private
1082
+ # @param node [Parser::AST::Node]
1083
+ # @param source_part [Symbol]
1084
+ # @return [undefined]
1085
+ #
1086
+ # source://unparser//lib/unparser/comments.rb#44
1087
+ def consume(node, source_part = T.unsafe(nil)); end
1088
+
1089
+ # Proxy to singleton
1090
+ #
1091
+ # NOTICE:
1092
+ # Delegating to stateless helpers is a pattern I saw many times in our code.
1093
+ # Maybe we should make another helper module? include SingletonDelegator.new(:source_range) ?
1094
+ #
1095
+ # @api private
1096
+ # @return [undefined]
1097
+ #
1098
+ # source://unparser//lib/unparser/comments.rb#18
1099
+ def source_range(*arguments); end
1100
+
1101
+ # Take all remaining comments
1102
+ #
1103
+ # @api private
1104
+ # @return [Array]
1105
+ #
1106
+ # source://unparser//lib/unparser/comments.rb#68
1107
+ def take_all; end
1108
+
1109
+ # Take comments appear in the source before the specified part of the node
1110
+ #
1111
+ # @api private
1112
+ # @param node [Parser::AST::Node]
1113
+ # @param source_part [Symbol]
1114
+ # @return [Array]
1115
+ #
1116
+ # source://unparser//lib/unparser/comments.rb#81
1117
+ def take_before(node, source_part); end
1118
+
1119
+ # Take end-of-line comments
1120
+ #
1121
+ # @api private
1122
+ # @return [Array]
1123
+ #
1124
+ # source://unparser//lib/unparser/comments.rb#55
1125
+ def take_eol_comments; end
1126
+
1127
+ private
1128
+
1129
+ # source://unparser//lib/unparser/comments.rb#119
1130
+ def take_up_to_line(line); end
1131
+
1132
+ # source://unparser//lib/unparser/comments.rb#114
1133
+ def take_while; end
1134
+
1135
+ # source://unparser//lib/unparser/comments.rb#123
1136
+ def unshift_documents(comments); end
1137
+
1138
+ class << self
1139
+ # Return source location part
1140
+ #
1141
+ # FIXME: This method should not be needed. It does to much inline signalling.
1142
+ #
1143
+ # :reek:ManualDispatch
1144
+ #
1145
+ # @api private
1146
+ # @param node [Parser::AST::Node]
1147
+ # @param part [Symbol]
1148
+ # @return [Parser::Source::Range] if present
1149
+ # @return [nil] otherwise
1150
+ #
1151
+ # source://unparser//lib/unparser/comments.rb#107
1152
+ def source_range(node, part); end
1153
+ end
1154
+ end
1155
+
1156
+ # A mixin to define a composition
1157
+ #
1158
+ # Original code before vendoring and reduction from: https://github.com/mbj/concord.
1159
+ class Unparser::Concord < ::Module
1160
+ include ::Unparser::Equalizer::Methods
1161
+ include ::Unparser::Adamantium
1162
+ include ::Unparser::Adamantium::InstanceMethods
1163
+ extend ::Unparser::Adamantium::ModuleMethods
1164
+ extend ::Unparser::Adamantium::ClassMethods
1165
+
1166
+ # Initialize object
1167
+ #
1168
+ #
1169
+ # @api private
1170
+ # @return [undefined]
1171
+ #
1172
+ # source://unparser//lib/unparser/concord.rb#30
1173
+ def initialize(*names); end
1174
+
1175
+ # Return names
1176
+ #
1177
+ # @api private
1178
+ # @return [Enumerable<Symbol>]
1179
+ #
1180
+ # source://unparser//lib/unparser/concord.rb#19
1181
+ def names; end
1182
+
1183
+ private
1184
+
1185
+ # Define equalizer
1186
+ #
1187
+ # @api private
1188
+ # @return [undefined]
1189
+ #
1190
+ # source://unparser//lib/unparser/concord.rb#48
1191
+ def define_equalizer; end
1192
+
1193
+ # Define initialize method
1194
+ #
1195
+ # @api private
1196
+ # @return [undefined]
1197
+ #
1198
+ # source://unparser//lib/unparser/concord.rb#72
1199
+ def define_initialize; end
1200
+
1201
+ # Define readers
1202
+ #
1203
+ # @api private
1204
+ # @return [undefined]
1205
+ #
1206
+ # source://unparser//lib/unparser/concord.rb#58
1207
+ def define_readers; end
1208
+
1209
+ # Return instance variable names
1210
+ #
1211
+ # @api private
1212
+ # @return [String]
1213
+ #
1214
+ # source://unparser//lib/unparser/concord.rb#92
1215
+ def instance_variable_names; end
1216
+ end
1217
+
1218
+ # The maximum number of objects the hosting class is composed of
1219
+ #
1220
+ # source://unparser//lib/unparser/concord.rb#11
1221
+ Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer)
1222
+
1223
+ # Mixin for public attribute readers
1224
+ class Unparser::Concord::Public < ::Unparser::Concord
1225
+ # Hook called when module is included
1226
+ #
1227
+ # @api private
1228
+ # @param descendant [Class, Module]
1229
+ # @return [undefined]
1230
+ #
1231
+ # source://unparser//lib/unparser/concord.rb#107
1232
+ def included(descendant); end
1233
+ end
1234
+
1235
+ # All unparser constants maybe included in other libraries.
1236
+ module Unparser::Constants; end
1237
+
1238
+ # All binary operators of the ruby language
1239
+ #
1240
+ # source://unparser//lib/unparser/constants.rb#13
1241
+ Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set)
1242
+
1243
+ # source://unparser//lib/unparser/constants.rb#63
1244
+ Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set)
1245
+
1246
+ # source://unparser//lib/unparser/constants.rb#45
1247
+ Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String)
1248
+
1249
+ # source://unparser//lib/unparser/constants.rb#44
1250
+ Unparser::Constants::K_AND = T.let(T.unsafe(nil), String)
1251
+
1252
+ # source://unparser//lib/unparser/constants.rb#23
1253
+ Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String)
1254
+
1255
+ # source://unparser//lib/unparser/constants.rb#37
1256
+ Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String)
1257
+
1258
+ # source://unparser//lib/unparser/constants.rb#24
1259
+ Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String)
1260
+
1261
+ # source://unparser//lib/unparser/constants.rb#25
1262
+ Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String)
1263
+
1264
+ # source://unparser//lib/unparser/constants.rb#21
1265
+ Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String)
1266
+
1267
+ # source://unparser//lib/unparser/constants.rb#28
1268
+ Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String)
1269
+
1270
+ # source://unparser//lib/unparser/constants.rb#33
1271
+ Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String)
1272
+
1273
+ # Keywords
1274
+ #
1275
+ # source://unparser//lib/unparser/constants.rb#20
1276
+ Unparser::Constants::K_DO = T.let(T.unsafe(nil), String)
1277
+
1278
+ # source://unparser//lib/unparser/constants.rb#59
1279
+ Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String)
1280
+
1281
+ # source://unparser//lib/unparser/constants.rb#46
1282
+ Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String)
1283
+
1284
+ # source://unparser//lib/unparser/constants.rb#47
1285
+ Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String)
1286
+
1287
+ # source://unparser//lib/unparser/constants.rb#58
1288
+ Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String)
1289
+
1290
+ # source://unparser//lib/unparser/constants.rb#22
1291
+ Unparser::Constants::K_END = T.let(T.unsafe(nil), String)
1292
+
1293
+ # source://unparser//lib/unparser/constants.rb#27
1294
+ Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String)
1295
+
1296
+ # source://unparser//lib/unparser/constants.rb#41
1297
+ Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String)
1298
+
1299
+ # source://unparser//lib/unparser/constants.rb#60
1300
+ Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String)
1301
+
1302
+ # source://unparser//lib/unparser/constants.rb#48
1303
+ Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String)
1304
+
1305
+ # source://unparser//lib/unparser/constants.rb#43
1306
+ Unparser::Constants::K_IF = T.let(T.unsafe(nil), String)
1307
+
1308
+ # source://unparser//lib/unparser/constants.rb#51
1309
+ Unparser::Constants::K_IN = T.let(T.unsafe(nil), String)
1310
+
1311
+ # source://unparser//lib/unparser/constants.rb#29
1312
+ Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String)
1313
+
1314
+ # source://unparser//lib/unparser/constants.rb#40
1315
+ Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String)
1316
+
1317
+ # source://unparser//lib/unparser/constants.rb#49
1318
+ Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String)
1319
+
1320
+ # source://unparser//lib/unparser/constants.rb#50
1321
+ Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String)
1322
+
1323
+ # source://unparser//lib/unparser/constants.rb#52
1324
+ Unparser::Constants::K_OR = T.let(T.unsafe(nil), String)
1325
+
1326
+ # source://unparser//lib/unparser/constants.rb#35
1327
+ Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String)
1328
+
1329
+ # source://unparser//lib/unparser/constants.rb#34
1330
+ Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String)
1331
+
1332
+ # source://unparser//lib/unparser/constants.rb#39
1333
+ Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String)
1334
+
1335
+ # source://unparser//lib/unparser/constants.rb#30
1336
+ Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String)
1337
+
1338
+ # source://unparser//lib/unparser/constants.rb#38
1339
+ Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String)
1340
+
1341
+ # source://unparser//lib/unparser/constants.rb#31
1342
+ Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String)
1343
+
1344
+ # source://unparser//lib/unparser/constants.rb#26
1345
+ Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String)
1346
+
1347
+ # source://unparser//lib/unparser/constants.rb#36
1348
+ Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String)
1349
+
1350
+ # source://unparser//lib/unparser/constants.rb#61
1351
+ Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String)
1352
+
1353
+ # source://unparser//lib/unparser/constants.rb#42
1354
+ Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String)
1355
+
1356
+ # source://unparser//lib/unparser/constants.rb#32
1357
+ Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String)
1358
+
1359
+ # source://unparser//lib/unparser/constants.rb#53
1360
+ Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String)
1361
+
1362
+ # source://unparser//lib/unparser/constants.rb#56
1363
+ Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String)
1364
+
1365
+ # source://unparser//lib/unparser/constants.rb#54
1366
+ Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String)
1367
+
1368
+ # source://unparser//lib/unparser/constants.rb#55
1369
+ Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String)
1370
+
1371
+ # source://unparser//lib/unparser/constants.rb#57
1372
+ Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String)
1373
+
1374
+ # All unary operators of the ruby language
1375
+ #
1376
+ # source://unparser//lib/unparser/constants.rb#8
1377
+ Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set)
1378
+
1379
+ # DSL to help defining emitters
1380
+ module Unparser::DSL
1381
+ private
1382
+
1383
+ # source://unparser//lib/unparser/dsl.rb#32
1384
+ def children(*names); end
1385
+
1386
+ # source://unparser//lib/unparser/dsl.rb#17
1387
+ def define_child(name, index); end
1388
+
1389
+ # source://unparser//lib/unparser/dsl.rb#24
1390
+ def define_group(name, range); end
1391
+
1392
+ # source://unparser//lib/unparser/dsl.rb#9
1393
+ def define_remaining_children(names); end
1394
+ end
1395
+
1396
+ # Class to create diffs from source code
1397
+ class Unparser::Diff
1398
+ include ::Unparser::Equalizer::Methods
1399
+ include ::Unparser::Adamantium
1400
+ include ::Unparser::Adamantium::InstanceMethods
1401
+ extend ::Unparser::Adamantium::ModuleMethods
1402
+ extend ::Unparser::Adamantium::ClassMethods
1403
+
1404
+ # Colorized unified source diff between old and new
1405
+ #
1406
+ # @return [String] if there is a diff
1407
+ # @return [nil] otherwise
1408
+ #
1409
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1410
+ def colorized_diff(&block); end
1411
+
1412
+ # Unified source diff between old and new
1413
+ #
1414
+ # @return [String] if there is exactly one diff
1415
+ # @return [nil] otherwise
1416
+ #
1417
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1418
+ def diff(&block); end
1419
+
1420
+ private
1421
+
1422
+ # source://unparser//lib/unparser/diff.rb#62
1423
+ def diffs; end
1424
+
1425
+ # source://unparser//lib/unparser/diff.rb#66
1426
+ def hunks; end
1427
+
1428
+ # source://unparser//lib/unparser/diff.rb#81
1429
+ def max_length; end
1430
+
1431
+ # source://unparser//lib/unparser/diff.rb#72
1432
+ def minimized_hunk; end
1433
+
1434
+ class << self
1435
+ # Build new object from source strings
1436
+ #
1437
+ # @param old [String]
1438
+ # @param new [String]
1439
+ # @return [Diff]
1440
+ #
1441
+ # source://unparser//lib/unparser/diff.rb#46
1442
+ def build(old, new); end
1443
+
1444
+ private
1445
+
1446
+ # source://unparser//lib/unparser/diff.rb#85
1447
+ def colorize_line(line); end
1448
+
1449
+ # Break up source into lines
1450
+ #
1451
+ # @param source [String]
1452
+ # @return [Array<String>]
1453
+ #
1454
+ # source://unparser//lib/unparser/diff.rb#55
1455
+ def lines(source); end
1456
+ end
1457
+ end
1458
+
1459
+ # source://unparser//lib/unparser/diff.rb#8
1460
+ Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String)
1461
+
1462
+ # source://unparser//lib/unparser/diff.rb#9
1463
+ Unparser::Diff::DELETION = T.let(T.unsafe(nil), String)
1464
+
1465
+ # source://unparser//lib/unparser/diff.rb#10
1466
+ Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String)
1467
+
1468
+ # source://unparser//lib/unparser.rb#34
1469
+ Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
1470
+
1471
+ # source://unparser//lib/unparser.rb#33
1472
+ Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String)
1473
+
1474
+ # RequireBLock
1475
+ class Unparser::Either
1476
+ include ::Unparser::RequireBlock
1477
+ include ::Unparser::Equalizer::Methods
1478
+ include ::Unparser::Adamantium
1479
+ include ::Unparser::Adamantium::InstanceMethods
1480
+ extend ::Unparser::Adamantium::ModuleMethods
1481
+ extend ::Unparser::Adamantium::ClassMethods
1482
+
1483
+ # Test for left constructor
1484
+ #
1485
+ # @return [Boolean]
1486
+ #
1487
+ # source://unparser//lib/unparser/either.rb#42
1488
+ def left?; end
1489
+
1490
+ # Test for right constructor
1491
+ #
1492
+ # @return [Boolean]
1493
+ #
1494
+ # source://unparser//lib/unparser/either.rb#49
1495
+ def right?; end
1496
+
1497
+ class << self
1498
+ # Execute block and wrap error in left
1499
+ #
1500
+ # @param exception [Class<Exception>]
1501
+ # @return [Either<Exception, Object>]
1502
+ #
1503
+ # source://unparser//lib/unparser/either.rb#33
1504
+ def wrap_error(*exceptions); end
1505
+ end
1506
+ end
1507
+
1508
+ class Unparser::Either::Left < ::Unparser::Either
1509
+ # Evaluate applicative block
1510
+ #
1511
+ # @return [Either::Left<Object>]
1512
+ #
1513
+ # source://unparser//lib/unparser/either.rb#64
1514
+ def bind(&block); end
1515
+
1516
+ # Evaluate left side of branch
1517
+ #
1518
+ # @param left [#call]
1519
+ # @param _right [#call]
1520
+ #
1521
+ # source://unparser//lib/unparser/either.rb#98
1522
+ def either(left, _right); end
1523
+
1524
+ # Evaluate functor block
1525
+ #
1526
+ # @return [Either::Left<Object>]
1527
+ #
1528
+ # source://unparser//lib/unparser/either.rb#57
1529
+ def fmap(&block); end
1530
+
1531
+ # Unwrap value from left
1532
+ #
1533
+ # @return [Object]
1534
+ #
1535
+ # source://unparser//lib/unparser/either.rb#71
1536
+ def from_left; end
1537
+
1538
+ # Unwrap value from right
1539
+ #
1540
+ # @return [Object]
1541
+ #
1542
+ # source://unparser//lib/unparser/either.rb#79
1543
+ def from_right; end
1544
+
1545
+ # Map over left value
1546
+ #
1547
+ # @return [Either::Right<Object>]
1548
+ #
1549
+ # source://unparser//lib/unparser/either.rb#90
1550
+ def lmap; end
1551
+ end
1552
+
1553
+ # Left
1554
+ class Unparser::Either::Right < ::Unparser::Either
1555
+ # Evaluate applicative block
1556
+ #
1557
+ # @return [Either<Object>]
1558
+ # @yield [value]
1559
+ #
1560
+ # source://unparser//lib/unparser/either.rb#114
1561
+ def bind; end
1562
+
1563
+ # Evaluate right side of branch
1564
+ #
1565
+ # @param _left [#call]
1566
+ # @param right [#call]
1567
+ #
1568
+ # source://unparser//lib/unparser/either.rb#148
1569
+ def either(_left, right); end
1570
+
1571
+ # Evaluate functor block
1572
+ #
1573
+ # @return [Either::Right<Object>]
1574
+ #
1575
+ # source://unparser//lib/unparser/either.rb#107
1576
+ def fmap; end
1577
+
1578
+ # Unwrap value from left
1579
+ #
1580
+ # @return [Object]
1581
+ #
1582
+ # source://unparser//lib/unparser/either.rb#122
1583
+ def from_left; end
1584
+
1585
+ # Unwrap value from right
1586
+ #
1587
+ # @return [Object]
1588
+ #
1589
+ # source://unparser//lib/unparser/either.rb#133
1590
+ def from_right; end
1591
+
1592
+ # Map over left value
1593
+ #
1594
+ # @return [Either::Right<Object>]
1595
+ #
1596
+ # source://unparser//lib/unparser/either.rb#140
1597
+ def lmap(&block); end
1598
+ end
1599
+
1600
+ # Emitter base class
1601
+ class Unparser::Emitter
1602
+ include ::Unparser::NodeHelpers
1603
+ include ::Unparser::Generation
1604
+ include ::Unparser::Constants
1605
+ include ::Unparser::AbstractType
1606
+ include ::Unparser::Adamantium
1607
+ include ::Unparser::Adamantium::InstanceMethods
1608
+ include ::Unparser::Anima::InstanceMethods
1609
+ include ::Unparser::Equalizer::Methods
1610
+ extend ::Unparser::AbstractType::AbstractMethodDeclarations
1611
+ extend ::Unparser::Adamantium::ModuleMethods
1612
+ extend ::Unparser::Adamantium::ClassMethods
1613
+ extend ::Unparser::DSL
1614
+
1615
+ # source://unparser//lib/unparser/anima.rb#146
1616
+ def buffer; end
1617
+
1618
+ # source://unparser//lib/unparser/anima.rb#146
1619
+ def comments; end
1620
+
1621
+ # Dispatch node write as statement
1622
+ #
1623
+ # @api private
1624
+ # @return [undefined]
1625
+ #
1626
+ # source://unparser//lib/unparser/abstract_type.rb#114
1627
+ def dispatch(*_arg0); end
1628
+
1629
+ # source://unparser//lib/unparser/emitter.rb#59
1630
+ def emit_mlhs; end
1631
+
1632
+ # source://unparser//lib/unparser/anima.rb#146
1633
+ def local_variable_scope; end
1634
+
1635
+ # source://unparser//lib/unparser/anima.rb#146
1636
+ def node; end
1637
+
1638
+ # LocalVariableRoot
1639
+ #
1640
+ # source://unparser//lib/unparser/emitter.rb#38
1641
+ def node_type; end
1642
+
1643
+ class << self
1644
+ # source://unparser//lib/unparser/anima.rb#140
1645
+ def anima; end
1646
+
1647
+ # Return emitter
1648
+ #
1649
+ #
1650
+ # @api private
1651
+ # @return [Emitter]
1652
+ #
1653
+ # source://unparser//lib/unparser/emitter.rb#70
1654
+ def emitter(buffer:, comments:, node:, local_variable_scope:); end
1655
+
1656
+ # source://unparser//lib/unparser/abstract_type.rb#36
1657
+ def new(*args, &block); end
1658
+
1659
+ private
1660
+
1661
+ # Register emitter for type
1662
+ #
1663
+ # @api private
1664
+ # @param types [Symbol]
1665
+ # @return [undefined]
1666
+ #
1667
+ # source://unparser//lib/unparser/emitter.rb#50
1668
+ def handle(*types); end
1669
+ end
1670
+ end
1671
+
1672
+ # Emitter for alias nodes
1673
+ class Unparser::Emitter::Alias < ::Unparser::Emitter
1674
+ private
1675
+
1676
+ # source://unparser//lib/unparser/emitter/alias.rb#14
1677
+ def dispatch; end
1678
+
1679
+ # source://unparser//lib/unparser/dsl.rb#11
1680
+ def remaining_children; end
1681
+
1682
+ # source://unparser//lib/unparser/dsl.rb#18
1683
+ def source; end
1684
+
1685
+ # source://unparser//lib/unparser/dsl.rb#18
1686
+ def target; end
1687
+ end
1688
+
1689
+ # Arguments emitter
1690
+ class Unparser::Emitter::Args < ::Unparser::Emitter
1691
+ # source://unparser//lib/unparser/emitter/args.rb#7
1692
+ def emit_block_arguments; end
1693
+
1694
+ # source://unparser//lib/unparser/emitter/args.rb#15
1695
+ def emit_def_arguments; end
1696
+
1697
+ # source://unparser//lib/unparser/emitter/args.rb#19
1698
+ def emit_lambda_arguments; end
1699
+
1700
+ private
1701
+
1702
+ # source://unparser//lib/unparser/emitter/args.rb#26
1703
+ def emit_shadowargs; end
1704
+
1705
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1706
+ def normal_arguments(&block); end
1707
+
1708
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1709
+ def shadowargs(&block); end
1710
+ end
1711
+
1712
+ # Argument emitter
1713
+ class Unparser::Emitter::Argument < ::Unparser::Emitter
1714
+ private
1715
+
1716
+ # source://unparser//lib/unparser/emitter/argument.rb#89
1717
+ def dispatch; end
1718
+
1719
+ # source://unparser//lib/unparser/dsl.rb#18
1720
+ def name; end
1721
+
1722
+ # source://unparser//lib/unparser/dsl.rb#11
1723
+ def remaining_children; end
1724
+ end
1725
+
1726
+ # Array literal emitter
1727
+ class Unparser::Emitter::Array < ::Unparser::Emitter
1728
+ # source://unparser//lib/unparser/emitter/array.rb#9
1729
+ def emit_heredoc_reminders; end
1730
+
1731
+ private
1732
+
1733
+ # source://unparser//lib/unparser/emitter/array.rb#15
1734
+ def dispatch; end
1735
+
1736
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1737
+ def emitters(&block); end
1738
+ end
1739
+
1740
+ # Emitter for array patterns
1741
+ class Unparser::Emitter::ArrayPattern < ::Unparser::Emitter
1742
+ private
1743
+
1744
+ # source://unparser//lib/unparser/emitter/array_pattern.rb#13
1745
+ def dispatch; end
1746
+
1747
+ # source://unparser//lib/unparser/emitter/array_pattern.rb#20
1748
+ def emit_member(node); end
1749
+ end
1750
+
1751
+ # Base class for assignment emitters
1752
+ class Unparser::Emitter::Assignment < ::Unparser::Emitter
1753
+ # source://unparser//lib/unparser/emitter/assignment.rb#14
1754
+ def emit_heredoc_reminders; end
1755
+
1756
+ # source://unparser//lib/unparser/abstract_type.rb#114
1757
+ def emit_left(*_arg0); end
1758
+
1759
+ # source://unparser//lib/unparser/emitter/assignment.rb#10
1760
+ def symbol_name; end
1761
+
1762
+ private
1763
+
1764
+ # source://unparser//lib/unparser/emitter/assignment.rb#22
1765
+ def dispatch; end
1766
+
1767
+ # source://unparser//lib/unparser/emitter/assignment.rb#27
1768
+ def emit_right; end
1769
+ end
1770
+
1771
+ # source://unparser//lib/unparser/emitter/assignment.rb#8
1772
+ Unparser::Emitter::Assignment::BINARY_OPERATOR = T.let(T.unsafe(nil), Array)
1773
+
1774
+ # Constant assignment emitter
1775
+ class Unparser::Emitter::Assignment::Constant < ::Unparser::Emitter::Assignment
1776
+ private
1777
+
1778
+ # source://unparser//lib/unparser/dsl.rb#18
1779
+ def base; end
1780
+
1781
+ # source://unparser//lib/unparser/emitter/assignment.rb#65
1782
+ def emit_left; end
1783
+
1784
+ # source://unparser//lib/unparser/dsl.rb#18
1785
+ def name; end
1786
+
1787
+ # source://unparser//lib/unparser/dsl.rb#11
1788
+ def remaining_children; end
1789
+
1790
+ # source://unparser//lib/unparser/dsl.rb#18
1791
+ def right; end
1792
+ end
1793
+
1794
+ # Variable assignment emitter
1795
+ class Unparser::Emitter::Assignment::Variable < ::Unparser::Emitter::Assignment
1796
+ private
1797
+
1798
+ # source://unparser//lib/unparser/emitter/assignment.rb#50
1799
+ def emit_left; end
1800
+
1801
+ # source://unparser//lib/unparser/dsl.rb#18
1802
+ def name; end
1803
+
1804
+ # source://unparser//lib/unparser/dsl.rb#11
1805
+ def remaining_children; end
1806
+
1807
+ # source://unparser//lib/unparser/dsl.rb#18
1808
+ def right; end
1809
+ end
1810
+
1811
+ # Emitter for begin nodes
1812
+ class Unparser::Emitter::Begin < ::Unparser::Emitter
1813
+ # source://unparser//lib/unparser/emitter/begin.rb#11
1814
+ def emit_heredoc_reminders; end
1815
+
1816
+ private
1817
+
1818
+ # source://unparser//lib/unparser/dsl.rb#18
1819
+ def body; end
1820
+
1821
+ # source://unparser//lib/unparser/emitter/begin.rb#19
1822
+ def dispatch; end
1823
+
1824
+ # source://unparser//lib/unparser/dsl.rb#11
1825
+ def remaining_children; end
1826
+ end
1827
+
1828
+ # Non send binary operator / keyword emitter
1829
+ class Unparser::Emitter::Binary < ::Unparser::Emitter
1830
+ private
1831
+
1832
+ # source://unparser//lib/unparser/emitter/binary.rb#11
1833
+ def dispatch; end
1834
+
1835
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1836
+ def writer(&block); end
1837
+ end
1838
+
1839
+ # Base class for and and or op-assign
1840
+ class Unparser::Emitter::BinaryAssign < ::Unparser::Emitter
1841
+ # source://unparser//lib/unparser/emitter/op_assign.rb#17
1842
+ def emit_heredoc_reminders; end
1843
+
1844
+ private
1845
+
1846
+ # source://unparser//lib/unparser/emitter/op_assign.rb#24
1847
+ def dispatch; end
1848
+
1849
+ # source://unparser//lib/unparser/dsl.rb#18
1850
+ def expression; end
1851
+
1852
+ # source://unparser//lib/unparser/dsl.rb#11
1853
+ def remaining_children; end
1854
+
1855
+ # source://unparser//lib/unparser/dsl.rb#18
1856
+ def target; end
1857
+ end
1858
+
1859
+ # source://unparser//lib/unparser/emitter/op_assign.rb#10
1860
+ Unparser::Emitter::BinaryAssign::MAP = T.let(T.unsafe(nil), Hash)
1861
+
1862
+ # Block emitter
1863
+ class Unparser::Emitter::Block < ::Unparser::Emitter
1864
+ private
1865
+
1866
+ # source://unparser//lib/unparser/dsl.rb#18
1867
+ def arguments; end
1868
+
1869
+ # source://unparser//lib/unparser/dsl.rb#18
1870
+ def body; end
1871
+
1872
+ # source://unparser//lib/unparser/emitter/block.rb#14
1873
+ def dispatch; end
1874
+
1875
+ # source://unparser//lib/unparser/emitter/block.rb#75
1876
+ def emit_block_arguments; end
1877
+
1878
+ # source://unparser//lib/unparser/emitter/block.rb#67
1879
+ def emit_lambda_arguments; end
1880
+
1881
+ # source://unparser//lib/unparser/emitter/block.rb#61
1882
+ def emit_send_target; end
1883
+
1884
+ # source://unparser//lib/unparser/emitter/block.rb#49
1885
+ def emit_target; end
1886
+
1887
+ # @return [Boolean]
1888
+ #
1889
+ # source://unparser//lib/unparser/emitter/block.rb#24
1890
+ def need_do?; end
1891
+
1892
+ # @return [Boolean]
1893
+ #
1894
+ # source://unparser//lib/unparser/emitter/block.rb#71
1895
+ def numblock?; end
1896
+
1897
+ # source://unparser//lib/unparser/dsl.rb#11
1898
+ def remaining_children; end
1899
+
1900
+ # source://unparser//lib/unparser/dsl.rb#18
1901
+ def target; end
1902
+
1903
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1904
+ def target_writer(&block); end
1905
+
1906
+ # source://unparser//lib/unparser/emitter/block.rb#36
1907
+ def write_close; end
1908
+
1909
+ # source://unparser//lib/unparser/emitter/block.rb#28
1910
+ def write_open; end
1911
+ end
1912
+
1913
+ # Block pass node emitter
1914
+ class Unparser::Emitter::BlockPass < ::Unparser::Emitter
1915
+ private
1916
+
1917
+ # source://unparser//lib/unparser/emitter/argument.rb#128
1918
+ def dispatch; end
1919
+
1920
+ # source://unparser//lib/unparser/dsl.rb#18
1921
+ def name; end
1922
+
1923
+ # source://unparser//lib/unparser/dsl.rb#11
1924
+ def remaining_children; end
1925
+ end
1926
+
1927
+ # Emitter for toplevel constant reference nodes
1928
+ class Unparser::Emitter::CBase < ::Unparser::Emitter
1929
+ private
1930
+
1931
+ # Perform dispatch
1932
+ #
1933
+ # @api private
1934
+ # @return [undefined]
1935
+ #
1936
+ # source://unparser//lib/unparser/emitter/cbase.rb#17
1937
+ def dispatch; end
1938
+ end
1939
+
1940
+ # Emitter for case nodes
1941
+ class Unparser::Emitter::Case < ::Unparser::Emitter
1942
+ private
1943
+
1944
+ # source://unparser//lib/unparser/dsl.rb#18
1945
+ def condition; end
1946
+
1947
+ # source://unparser//lib/unparser/emitter/case.rb#14
1948
+ def dispatch; end
1949
+
1950
+ # source://unparser//lib/unparser/emitter/case.rb#35
1951
+ def emit_condition; end
1952
+
1953
+ # source://unparser//lib/unparser/emitter/case.rb#22
1954
+ def emit_else; end
1955
+
1956
+ # source://unparser//lib/unparser/emitter/case.rb#30
1957
+ def emit_whens; end
1958
+
1959
+ # source://unparser//lib/unparser/dsl.rb#11
1960
+ def remaining_children; end
1961
+
1962
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1963
+ def whens(&block); end
1964
+ end
1965
+
1966
+ # Emitter for case guards
1967
+ class Unparser::Emitter::CaseGuard < ::Unparser::Emitter
1968
+ private
1969
+
1970
+ # source://unparser//lib/unparser/dsl.rb#18
1971
+ def condition; end
1972
+
1973
+ # source://unparser//lib/unparser/emitter/case_guard.rb#19
1974
+ def dispatch; end
1975
+
1976
+ # source://unparser//lib/unparser/dsl.rb#11
1977
+ def remaining_children; end
1978
+ end
1979
+
1980
+ # source://unparser//lib/unparser/emitter/case_guard.rb#10
1981
+ Unparser::Emitter::CaseGuard::MAP = T.let(T.unsafe(nil), Hash)
1982
+
1983
+ # Emitter for case matches
1984
+ class Unparser::Emitter::CaseMatch < ::Unparser::Emitter
1985
+ private
1986
+
1987
+ # source://unparser//lib/unparser/emitter/case_match.rb#20
1988
+ def dispatch; end
1989
+
1990
+ # source://unparser//lib/unparser/emitter/case_match.rb#16
1991
+ def else_branch; end
1992
+
1993
+ # source://unparser//lib/unparser/emitter/case_match.rb#30
1994
+ def emit_else_branch; end
1995
+
1996
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
1997
+ def patterns(&block); end
1998
+
1999
+ # source://unparser//lib/unparser/dsl.rb#11
2000
+ def remaining_children; end
2001
+
2002
+ # source://unparser//lib/unparser/dsl.rb#18
2003
+ def target; end
2004
+ end
2005
+
2006
+ # Emitter for class nodes
2007
+ class Unparser::Emitter::Class < ::Unparser::Emitter
2008
+ include ::Unparser::Emitter::LocalVariableRoot
2009
+
2010
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
2011
+ def local_variable_scope(&block); end
2012
+
2013
+ private
2014
+
2015
+ # source://unparser//lib/unparser/dsl.rb#18
2016
+ def body; end
2017
+
2018
+ # source://unparser//lib/unparser/emitter/class.rb#15
2019
+ def dispatch; end
2020
+
2021
+ # source://unparser//lib/unparser/emitter/class.rb#23
2022
+ def emit_superclass; end
2023
+
2024
+ # source://unparser//lib/unparser/dsl.rb#18
2025
+ def name; end
2026
+
2027
+ # source://unparser//lib/unparser/dsl.rb#11
2028
+ def remaining_children; end
2029
+
2030
+ # source://unparser//lib/unparser/dsl.rb#18
2031
+ def superclass; end
2032
+ end
2033
+
2034
+ # Emitter for constant access
2035
+ class Unparser::Emitter::Const < ::Unparser::Emitter
2036
+ private
2037
+
2038
+ # source://unparser//lib/unparser/emitter/variable.rb#28
2039
+ def dispatch; end
2040
+
2041
+ # source://unparser//lib/unparser/emitter/variable.rb#33
2042
+ def emit_scope; end
2043
+
2044
+ # source://unparser//lib/unparser/dsl.rb#18
2045
+ def name; end
2046
+
2047
+ # source://unparser//lib/unparser/dsl.rb#11
2048
+ def remaining_children; end
2049
+
2050
+ # source://unparser//lib/unparser/dsl.rb#18
2051
+ def scope; end
2052
+ end
2053
+
2054
+ # Emitter for const pattern node
2055
+ class Unparser::Emitter::ConstPattern < ::Unparser::Emitter
2056
+ private
2057
+
2058
+ # source://unparser//lib/unparser/dsl.rb#18
2059
+ def const; end
2060
+
2061
+ # source://unparser//lib/unparser/emitter/const_pattern.rb#14
2062
+ def dispatch; end
2063
+
2064
+ # source://unparser//lib/unparser/dsl.rb#18
2065
+ def pattern; end
2066
+
2067
+ # source://unparser//lib/unparser/dsl.rb#11
2068
+ def remaining_children; end
2069
+ end
2070
+
2071
+ # Dynamic string emitter
2072
+ class Unparser::Emitter::DStr < ::Unparser::Emitter
2073
+ # source://unparser//lib/unparser/emitter/dstr.rb#10
2074
+ def emit_heredoc_reminders; end
2075
+
2076
+ private
2077
+
2078
+ # source://unparser//lib/unparser/emitter/dstr.rb#16
2079
+ def dispatch; end
2080
+ end
2081
+
2082
+ # Dynamic symbol literal emitter
2083
+ class Unparser::Emitter::DSym < ::Unparser::Emitter
2084
+ private
2085
+
2086
+ # source://unparser//lib/unparser/emitter/dsym.rb#11
2087
+ def dispatch; end
2088
+
2089
+ # source://unparser//lib/unparser/emitter/dsym.rb#34
2090
+ def emit_begin_child(component); end
2091
+
2092
+ # source://unparser//lib/unparser/emitter/dsym.rb#24
2093
+ def emit_str_child(value); end
2094
+ end
2095
+
2096
+ # Emitter for def node
2097
+ class Unparser::Emitter::Def < ::Unparser::Emitter
2098
+ include ::Unparser::Emitter::LocalVariableRoot
2099
+
2100
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
2101
+ def local_variable_scope(&block); end
2102
+
2103
+ private
2104
+
2105
+ # source://unparser//lib/unparser/abstract_type.rb#114
2106
+ def body(*_arg0); end
2107
+
2108
+ # source://unparser//lib/unparser/emitter/def.rb#17
2109
+ def dispatch; end
2110
+
2111
+ # source://unparser//lib/unparser/emitter/def.rb#25
2112
+ def emit_arguments; end
2113
+
2114
+ # source://unparser//lib/unparser/abstract_type.rb#114
2115
+ def emit_name(*_arg0); end
2116
+ end
2117
+
2118
+ # Instance def emitter
2119
+ class Unparser::Emitter::Def::Instance < ::Unparser::Emitter::Def
2120
+ private
2121
+
2122
+ # source://unparser//lib/unparser/dsl.rb#18
2123
+ def arguments; end
2124
+
2125
+ # source://unparser//lib/unparser/dsl.rb#18
2126
+ def body; end
2127
+
2128
+ # source://unparser//lib/unparser/emitter/def.rb#41
2129
+ def emit_name; end
2130
+
2131
+ # source://unparser//lib/unparser/dsl.rb#18
2132
+ def name; end
2133
+
2134
+ # source://unparser//lib/unparser/dsl.rb#11
2135
+ def remaining_children; end
2136
+ end
2137
+
2138
+ # Emitter for defines on singleton
2139
+ class Unparser::Emitter::Def::Singleton < ::Unparser::Emitter::Def
2140
+ private
2141
+
2142
+ # source://unparser//lib/unparser/dsl.rb#18
2143
+ def arguments; end
2144
+
2145
+ # source://unparser//lib/unparser/dsl.rb#18
2146
+ def body; end
2147
+
2148
+ # source://unparser//lib/unparser/emitter/def.rb#56
2149
+ def emit_name; end
2150
+
2151
+ # source://unparser//lib/unparser/dsl.rb#18
2152
+ def name; end
2153
+
2154
+ # source://unparser//lib/unparser/dsl.rb#11
2155
+ def remaining_children; end
2156
+
2157
+ # source://unparser//lib/unparser/dsl.rb#18
2158
+ def subject; end
2159
+
2160
+ # @return [Boolean]
2161
+ #
2162
+ # source://unparser//lib/unparser/emitter/def.rb#63
2163
+ def subject_without_parens?; end
2164
+ end
2165
+
2166
+ # Emitter for defined? nodes
2167
+ class Unparser::Emitter::Defined < ::Unparser::Emitter
2168
+ private
2169
+
2170
+ # source://unparser//lib/unparser/emitter/defined.rb#13
2171
+ def dispatch; end
2172
+
2173
+ # source://unparser//lib/unparser/dsl.rb#11
2174
+ def remaining_children; end
2175
+
2176
+ # source://unparser//lib/unparser/dsl.rb#18
2177
+ def subject; end
2178
+ end
2179
+
2180
+ # Emitter for in pattern nodes
2181
+ class Unparser::Emitter::FindPattern < ::Unparser::Emitter
2182
+ private
2183
+
2184
+ # source://unparser//lib/unparser/emitter/find_pattern.rb#11
2185
+ def dispatch; end
2186
+ end
2187
+
2188
+ # Emitter for flip flops
2189
+ class Unparser::Emitter::FlipFlop < ::Unparser::Emitter
2190
+ # source://unparser//lib/unparser/emitter/flipflop.rb#17
2191
+ def symbol_name; end
2192
+
2193
+ private
2194
+
2195
+ # source://unparser//lib/unparser/emitter/flipflop.rb#27
2196
+ def dispatch; end
2197
+
2198
+ # source://unparser//lib/unparser/dsl.rb#18
2199
+ def left; end
2200
+
2201
+ # source://unparser//lib/unparser/dsl.rb#11
2202
+ def remaining_children; end
2203
+
2204
+ # source://unparser//lib/unparser/dsl.rb#18
2205
+ def right; end
2206
+ end
2207
+
2208
+ # source://unparser//lib/unparser/emitter/flipflop.rb#7
2209
+ Unparser::Emitter::FlipFlop::MAP = T.let(T.unsafe(nil), Hash)
2210
+
2211
+ # source://unparser//lib/unparser/emitter/flipflop.rb#12
2212
+ Unparser::Emitter::FlipFlop::SYMBOLS = T.let(T.unsafe(nil), Hash)
2213
+
2214
+ # Emiter for float literals
2215
+ class Unparser::Emitter::Float < ::Unparser::Emitter
2216
+ private
2217
+
2218
+ # source://unparser//lib/unparser/emitter/float.rb#16
2219
+ def dispatch; end
2220
+
2221
+ # source://unparser//lib/unparser/dsl.rb#11
2222
+ def remaining_children; end
2223
+
2224
+ # source://unparser//lib/unparser/dsl.rb#18
2225
+ def value; end
2226
+ end
2227
+
2228
+ # source://unparser//lib/unparser/emitter/float.rb#11
2229
+ Unparser::Emitter::Float::INFINITY = T.let(T.unsafe(nil), Float)
2230
+
2231
+ # source://unparser//lib/unparser/emitter/float.rb#12
2232
+ Unparser::Emitter::Float::NEG_INFINITY = T.let(T.unsafe(nil), Float)
2233
+
2234
+ # Emitter control flow modifiers
2235
+ class Unparser::Emitter::FlowModifier < ::Unparser::Emitter
2236
+ # source://unparser//lib/unparser/emitter/flow_modifier.rb#17
2237
+ def emit_heredoc_reminders; end
2238
+
2239
+ private
2240
+
2241
+ # source://unparser//lib/unparser/emitter/flow_modifier.rb#25
2242
+ def dispatch; end
2243
+
2244
+ # source://unparser//lib/unparser/emitter/flow_modifier.rb#36
2245
+ def emit_arguments; end
2246
+ end
2247
+
2248
+ # source://unparser//lib/unparser/emitter/flow_modifier.rb#7
2249
+ Unparser::Emitter::FlowModifier::MAP = T.let(T.unsafe(nil), Hash)
2250
+
2251
+ # Emitter for for nodes
2252
+ class Unparser::Emitter::For < ::Unparser::Emitter
2253
+ private
2254
+
2255
+ # source://unparser//lib/unparser/dsl.rb#18
2256
+ def assignment; end
2257
+
2258
+ # source://unparser//lib/unparser/dsl.rb#18
2259
+ def body; end
2260
+
2261
+ # source://unparser//lib/unparser/dsl.rb#18
2262
+ def condition; end
2263
+
2264
+ # source://unparser//lib/unparser/emitter/for.rb#13
2265
+ def dispatch; end
2266
+
2267
+ # source://unparser//lib/unparser/emitter/for.rb#20
2268
+ def emit_condition; end
2269
+
2270
+ # source://unparser//lib/unparser/dsl.rb#11
2271
+ def remaining_children; end
2272
+ end
2273
+
2274
+ # Emitter for Hash literals
2275
+ class Unparser::Emitter::Hash < ::Unparser::Emitter
2276
+ # source://unparser//lib/unparser/emitter/hash.rb#17
2277
+ def emit_heredoc_reminders; end
2278
+
2279
+ # source://unparser//lib/unparser/emitter/hash.rb#9
2280
+ def emit_last_argument_hash; end
2281
+
2282
+ private
2283
+
2284
+ # source://unparser//lib/unparser/emitter/hash.rb#23
2285
+ def dispatch; end
2286
+
2287
+ # source://unparser//lib/unparser/emitter/hash.rb#39
2288
+ def emit_hash_body; end
2289
+
2290
+ # source://unparser//lib/unparser/emitter/hash.rb#35
2291
+ def emit_heredoc_reminder_member(node); end
2292
+ end
2293
+
2294
+ # Emitter for hash patterns
2295
+ class Unparser::Emitter::HashPattern < ::Unparser::Emitter
2296
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#10
2297
+ def emit_const_pattern; end
2298
+
2299
+ private
2300
+
2301
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#18
2302
+ def dispatch; end
2303
+
2304
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#24
2305
+ def emit_hash_body; end
2306
+
2307
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#41
2308
+ def emit_match_var(node); end
2309
+
2310
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#28
2311
+ def emit_member(node); end
2312
+
2313
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#46
2314
+ def emit_pair(node); end
2315
+
2316
+ # source://unparser//lib/unparser/emitter/hash_pattern.rb#62
2317
+ def write_symbol_body(symbol); end
2318
+ end
2319
+
2320
+ # Base class for pre and postexe emitters
2321
+ class Unparser::Emitter::Hookexe < ::Unparser::Emitter
2322
+ private
2323
+
2324
+ # source://unparser//lib/unparser/dsl.rb#18
2325
+ def body; end
2326
+
2327
+ # source://unparser//lib/unparser/emitter/hookexe.rb#19
2328
+ def dispatch; end
2329
+
2330
+ # source://unparser//lib/unparser/dsl.rb#11
2331
+ def remaining_children; end
2332
+ end
2333
+
2334
+ # source://unparser//lib/unparser/emitter/hookexe.rb#8
2335
+ Unparser::Emitter::Hookexe::MAP = T.let(T.unsafe(nil), Hash)
2336
+
2337
+ # Emitter if nodes
2338
+ class Unparser::Emitter::If < ::Unparser::Emitter
2339
+ # source://unparser//lib/unparser/emitter/if.rb#11
2340
+ def emit_ternary; end
2341
+
2342
+ private
2343
+
2344
+ # source://unparser//lib/unparser/dsl.rb#18
2345
+ def condition; end
2346
+
2347
+ # source://unparser//lib/unparser/emitter/if.rb#21
2348
+ def dispatch; end
2349
+
2350
+ # source://unparser//lib/unparser/dsl.rb#18
2351
+ def else_branch; end
2352
+
2353
+ # source://unparser//lib/unparser/emitter/if.rb#59
2354
+ def emit_condition; end
2355
+
2356
+ # source://unparser//lib/unparser/emitter/if.rb#71
2357
+ def emit_else_branch; end
2358
+
2359
+ # source://unparser//lib/unparser/emitter/if.rb#63
2360
+ def emit_if_branch; end
2361
+
2362
+ # source://unparser//lib/unparser/emitter/if.rb#43
2363
+ def emit_normal; end
2364
+
2365
+ # source://unparser//lib/unparser/emitter/if.rb#37
2366
+ def emit_postcondition; end
2367
+
2368
+ # source://unparser//lib/unparser/dsl.rb#18
2369
+ def if_branch; end
2370
+
2371
+ # source://unparser//lib/unparser/emitter/if.rb#55
2372
+ def keyword; end
2373
+
2374
+ # @return [Boolean]
2375
+ #
2376
+ # source://unparser//lib/unparser/emitter/if.rb#29
2377
+ def postcondition?; end
2378
+
2379
+ # source://unparser//lib/unparser/dsl.rb#11
2380
+ def remaining_children; end
2381
+
2382
+ # @return [Boolean]
2383
+ #
2384
+ # source://unparser//lib/unparser/emitter/if.rb#51
2385
+ def unless?; end
2386
+ end
2387
+
2388
+ # Emitter for in pattern nodes
2389
+ class Unparser::Emitter::InMatch < ::Unparser::Emitter
2390
+ private
2391
+
2392
+ # source://unparser//lib/unparser/emitter/in_match.rb#14
2393
+ def dispatch; end
2394
+
2395
+ # source://unparser//lib/unparser/dsl.rb#18
2396
+ def pattern; end
2397
+
2398
+ # source://unparser//lib/unparser/dsl.rb#11
2399
+ def remaining_children; end
2400
+
2401
+ # source://unparser//lib/unparser/dsl.rb#18
2402
+ def target; end
2403
+ end
2404
+
2405
+ # Emitter for in pattern nodes
2406
+ class Unparser::Emitter::InPattern < ::Unparser::Emitter
2407
+ private
2408
+
2409
+ # source://unparser//lib/unparser/dsl.rb#18
2410
+ def branch; end
2411
+
2412
+ # source://unparser//lib/unparser/emitter/in_pattern.rb#14
2413
+ def dispatch; end
2414
+
2415
+ # source://unparser//lib/unparser/dsl.rb#18
2416
+ def else_branch; end
2417
+
2418
+ # source://unparser//lib/unparser/dsl.rb#11
2419
+ def remaining_children; end
2420
+
2421
+ # source://unparser//lib/unparser/dsl.rb#18
2422
+ def target; end
2423
+
2424
+ # source://unparser//lib/unparser/dsl.rb#18
2425
+ def unless_guard; end
2426
+ end
2427
+
2428
+ # Emitter for send to index references
2429
+ class Unparser::Emitter::Index < ::Unparser::Emitter
2430
+ private
2431
+
2432
+ # source://unparser//lib/unparser/emitter/index.rb#10
2433
+ def dispatch; end
2434
+
2435
+ # source://unparser//lib/unparser/emitter/index.rb#15
2436
+ def emit_receiver; end
2437
+ end
2438
+
2439
+ # Emitter for assign to index nodes
2440
+ class Unparser::Emitter::Index::Assign < ::Unparser::Emitter::Index
2441
+ # source://unparser//lib/unparser/emitter/index.rb#47
2442
+ def dispatch; end
2443
+
2444
+ # source://unparser//lib/unparser/emitter/index.rb#43
2445
+ def emit_heredoc_reminders; end
2446
+
2447
+ # source://unparser//lib/unparser/emitter/index.rb#54
2448
+ def emit_mlhs; end
2449
+
2450
+ private
2451
+
2452
+ # source://unparser//lib/unparser/emitter/index.rb#61
2453
+ def emit_operation(indices); end
2454
+ end
2455
+
2456
+ # source://unparser//lib/unparser/emitter/index.rb#39
2457
+ Unparser::Emitter::Index::Assign::NO_VALUE_PARENT = T.let(T.unsafe(nil), Set)
2458
+
2459
+ # source://unparser//lib/unparser/emitter/index.rb#38
2460
+ Unparser::Emitter::Index::Assign::VALUE_RANGE = T.let(T.unsafe(nil), Range)
2461
+
2462
+ class Unparser::Emitter::Index::Reference < ::Unparser::Emitter::Index
2463
+ private
2464
+
2465
+ # source://unparser//lib/unparser/emitter/index.rb#26
2466
+ def emit_operation; end
2467
+
2468
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
2469
+ def indices(&block); end
2470
+ end
2471
+
2472
+ # Emitter for explicit begins
2473
+ class Unparser::Emitter::KWBegin < ::Unparser::Emitter
2474
+ private
2475
+
2476
+ # source://unparser//lib/unparser/emitter/kwbegin.rb#11
2477
+ def dispatch; end
2478
+
2479
+ # source://unparser//lib/unparser/emitter/kwbegin.rb#25
2480
+ def emit_multiple_body; end
2481
+ end
2482
+
2483
+ # Optional keyword argument emitter
2484
+ class Unparser::Emitter::KeywordOptional < ::Unparser::Emitter
2485
+ private
2486
+
2487
+ # source://unparser//lib/unparser/emitter/argument.rb#46
2488
+ def dispatch; end
2489
+
2490
+ # source://unparser//lib/unparser/dsl.rb#18
2491
+ def name; end
2492
+
2493
+ # source://unparser//lib/unparser/dsl.rb#11
2494
+ def remaining_children; end
2495
+
2496
+ # source://unparser//lib/unparser/dsl.rb#18
2497
+ def value; end
2498
+ end
2499
+
2500
+ # Emitter for splats
2501
+ class Unparser::Emitter::KwSplat < ::Unparser::Emitter
2502
+ private
2503
+
2504
+ # source://unparser//lib/unparser/emitter/splat.rb#13
2505
+ def dispatch; end
2506
+
2507
+ # source://unparser//lib/unparser/dsl.rb#11
2508
+ def remaining_children; end
2509
+
2510
+ # source://unparser//lib/unparser/dsl.rb#18
2511
+ def subject; end
2512
+ end
2513
+
2514
+ # Keyword argument emitter
2515
+ class Unparser::Emitter::Kwarg < ::Unparser::Emitter
2516
+ private
2517
+
2518
+ # source://unparser//lib/unparser/emitter/argument.rb#61
2519
+ def dispatch; end
2520
+
2521
+ # source://unparser//lib/unparser/dsl.rb#18
2522
+ def name; end
2523
+
2524
+ # source://unparser//lib/unparser/dsl.rb#11
2525
+ def remaining_children; end
2526
+ end
2527
+
2528
+ class Unparser::Emitter::Kwargs < ::Unparser::Emitter
2529
+ # source://unparser//lib/unparser/emitter/kwargs.rb#8
2530
+ def dispatch; end
2531
+ end
2532
+
2533
+ # Emitter for lambda nodes
2534
+ class Unparser::Emitter::Lambda < ::Unparser::Emitter
2535
+ private
2536
+
2537
+ # source://unparser//lib/unparser/emitter/lambda.rb#11
2538
+ def dispatch; end
2539
+ end
2540
+
2541
+ module Unparser::Emitter::LocalVariableRoot
2542
+ # Return local variable root
2543
+ #
2544
+ # @api private
2545
+ # @return [Parser::AST::Node]
2546
+ #
2547
+ # source://unparser//lib/unparser/emitter.rb#27
2548
+ def local_variable_scope; end
2549
+
2550
+ class << self
2551
+ # @private
2552
+ #
2553
+ # source://unparser//lib/unparser/emitter.rb#31
2554
+ def included(descendant); end
2555
+ end
2556
+ end
2557
+
2558
+ # Emitter for multiple assignment nodes
2559
+ class Unparser::Emitter::MASGN < ::Unparser::Emitter
2560
+ private
2561
+
2562
+ # source://unparser//lib/unparser/emitter/masgn.rb#13
2563
+ def dispatch; end
2564
+
2565
+ # source://unparser//lib/unparser/dsl.rb#11
2566
+ def remaining_children; end
2567
+
2568
+ # source://unparser//lib/unparser/dsl.rb#18
2569
+ def source; end
2570
+
2571
+ # source://unparser//lib/unparser/dsl.rb#18
2572
+ def target; end
2573
+ end
2574
+
2575
+ # Emitter for multiple assignment left hand side
2576
+ class Unparser::Emitter::MLHS < ::Unparser::Emitter
2577
+ private
2578
+
2579
+ # source://unparser//lib/unparser/emitter/mlhs.rb#15
2580
+ def dispatch; end
2581
+
2582
+ # source://unparser//lib/unparser/emitter/mlhs.rb#31
2583
+ def emit_many; end
2584
+
2585
+ # source://unparser//lib/unparser/emitter/mlhs.rb#23
2586
+ def emit_one_child_mlhs; end
2587
+ end
2588
+
2589
+ # source://unparser//lib/unparser/emitter/mlhs.rb#9
2590
+ Unparser::Emitter::MLHS::NO_COMMA = T.let(T.unsafe(nil), Array)
2591
+
2592
+ # Base class for special match node emitters
2593
+ class Unparser::Emitter::Match < ::Unparser::Emitter; end
2594
+
2595
+ # Emitter for match current line
2596
+ class Unparser::Emitter::Match::CurrentLine < ::Unparser::Emitter::Match
2597
+ private
2598
+
2599
+ # source://unparser//lib/unparser/emitter/match.rb#32
2600
+ def dispatch; end
2601
+
2602
+ # source://unparser//lib/unparser/dsl.rb#18
2603
+ def regexp; end
2604
+
2605
+ # source://unparser//lib/unparser/dsl.rb#11
2606
+ def remaining_children; end
2607
+ end
2608
+
2609
+ # Emitter for match with local variable assignment
2610
+ class Unparser::Emitter::Match::Lvasgn < ::Unparser::Emitter::Match
2611
+ private
2612
+
2613
+ # source://unparser//lib/unparser/emitter/match.rb#16
2614
+ def dispatch; end
2615
+
2616
+ # source://unparser//lib/unparser/dsl.rb#18
2617
+ def lvasgn; end
2618
+
2619
+ # source://unparser//lib/unparser/dsl.rb#18
2620
+ def regexp; end
2621
+
2622
+ # source://unparser//lib/unparser/dsl.rb#11
2623
+ def remaining_children; end
2624
+ end
2625
+
2626
+ # Emitter for in pattern nodes
2627
+ class Unparser::Emitter::MatchAlt < ::Unparser::Emitter
2628
+ private
2629
+
2630
+ # source://unparser//lib/unparser/emitter/match_alt.rb#14
2631
+ def dispatch; end
2632
+
2633
+ # source://unparser//lib/unparser/dsl.rb#18
2634
+ def left; end
2635
+
2636
+ # source://unparser//lib/unparser/dsl.rb#11
2637
+ def remaining_children; end
2638
+
2639
+ # source://unparser//lib/unparser/dsl.rb#18
2640
+ def right; end
2641
+ end
2642
+
2643
+ # Emitter for in pattern nodes
2644
+ class Unparser::Emitter::MatchAs < ::Unparser::Emitter
2645
+ private
2646
+
2647
+ # source://unparser//lib/unparser/emitter/match_as.rb#14
2648
+ def dispatch; end
2649
+
2650
+ # source://unparser//lib/unparser/dsl.rb#18
2651
+ def left; end
2652
+
2653
+ # source://unparser//lib/unparser/dsl.rb#11
2654
+ def remaining_children; end
2655
+
2656
+ # source://unparser//lib/unparser/dsl.rb#18
2657
+ def right; end
2658
+ end
2659
+
2660
+ # Emitter for in pattern nodes
2661
+ class Unparser::Emitter::MatchPattern < ::Unparser::Emitter
2662
+ private
2663
+
2664
+ # source://unparser//lib/unparser/emitter/match_pattern.rb#23
2665
+ def dispatch; end
2666
+
2667
+ # source://unparser//lib/unparser/dsl.rb#18
2668
+ def pattern; end
2669
+
2670
+ # source://unparser//lib/unparser/dsl.rb#11
2671
+ def remaining_children; end
2672
+
2673
+ # source://unparser//lib/unparser/dsl.rb#18
2674
+ def target; end
2675
+ end
2676
+
2677
+ # Modern ast format emits `match_pattern`
2678
+ # node on single line pre 3.0, but 3.0+ uses `match_pattern_p`
2679
+ #
2680
+ # source://unparser//lib/unparser/emitter/match_pattern.rb#14
2681
+ Unparser::Emitter::MatchPattern::SYMBOL = T.let(T.unsafe(nil), String)
2682
+
2683
+ class Unparser::Emitter::MatchPatternP < ::Unparser::Emitter
2684
+ private
2685
+
2686
+ # source://unparser//lib/unparser/emitter/match_pattern_p.rb#13
2687
+ def dispatch; end
2688
+
2689
+ # source://unparser//lib/unparser/dsl.rb#18
2690
+ def pattern; end
2691
+
2692
+ # source://unparser//lib/unparser/dsl.rb#11
2693
+ def remaining_children; end
2694
+
2695
+ # source://unparser//lib/unparser/dsl.rb#18
2696
+ def target; end
2697
+ end
2698
+
2699
+ # Emiter for match rest nodes
2700
+ class Unparser::Emitter::MatchRest < ::Unparser::Emitter
2701
+ # source://unparser//lib/unparser/emitter/match_rest.rb#11
2702
+ def dispatch; end
2703
+
2704
+ # source://unparser//lib/unparser/emitter/match_rest.rb#16
2705
+ def emit_array_pattern; end
2706
+
2707
+ # source://unparser//lib/unparser/emitter/match_rest.rb#21
2708
+ def emit_hash_pattern; end
2709
+
2710
+ private
2711
+
2712
+ # source://unparser//lib/unparser/emitter/match_rest.rb#28
2713
+ def emit_match_var; end
2714
+
2715
+ # source://unparser//lib/unparser/dsl.rb#18
2716
+ def match_var; end
2717
+
2718
+ # source://unparser//lib/unparser/dsl.rb#11
2719
+ def remaining_children; end
2720
+ end
2721
+
2722
+ # Emitter for in pattern nodes
2723
+ class Unparser::Emitter::MatchVar < ::Unparser::Emitter
2724
+ private
2725
+
2726
+ # source://unparser//lib/unparser/emitter/match_var.rb#14
2727
+ def dispatch; end
2728
+
2729
+ # source://unparser//lib/unparser/dsl.rb#18
2730
+ def name; end
2731
+
2732
+ # source://unparser//lib/unparser/dsl.rb#11
2733
+ def remaining_children; end
2734
+ end
2735
+
2736
+ # Emitter for module nodes
2737
+ class Unparser::Emitter::Module < ::Unparser::Emitter
2738
+ include ::Unparser::Emitter::LocalVariableRoot
2739
+
2740
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
2741
+ def local_variable_scope(&block); end
2742
+
2743
+ private
2744
+
2745
+ # source://unparser//lib/unparser/dsl.rb#18
2746
+ def body; end
2747
+
2748
+ # source://unparser//lib/unparser/emitter/module.rb#15
2749
+ def dispatch; end
2750
+
2751
+ # source://unparser//lib/unparser/dsl.rb#18
2752
+ def name; end
2753
+
2754
+ # source://unparser//lib/unparser/dsl.rb#11
2755
+ def remaining_children; end
2756
+ end
2757
+
2758
+ # Emitter for block and kwrestarg arguments
2759
+ class Unparser::Emitter::Morearg < ::Unparser::Emitter
2760
+ private
2761
+
2762
+ # source://unparser//lib/unparser/emitter/argument.rb#18
2763
+ def dispatch; end
2764
+
2765
+ # source://unparser//lib/unparser/dsl.rb#18
2766
+ def name; end
2767
+
2768
+ # source://unparser//lib/unparser/dsl.rb#11
2769
+ def remaining_children; end
2770
+ end
2771
+
2772
+ # source://unparser//lib/unparser/emitter/argument.rb#7
2773
+ Unparser::Emitter::Morearg::MAP = T.let(T.unsafe(nil), Hash)
2774
+
2775
+ # source://unparser//lib/unparser/emitter.rb#18
2776
+ Unparser::Emitter::NO_INDENT = T.let(T.unsafe(nil), Array)
2777
+
2778
+ # Emitter for nth_ref nodes (regexp captures)
2779
+ class Unparser::Emitter::NthRef < ::Unparser::Emitter
2780
+ private
2781
+
2782
+ # source://unparser//lib/unparser/emitter/variable.rb#50
2783
+ def dispatch; end
2784
+
2785
+ # source://unparser//lib/unparser/dsl.rb#18
2786
+ def name; end
2787
+
2788
+ # source://unparser//lib/unparser/dsl.rb#11
2789
+ def remaining_children; end
2790
+ end
2791
+
2792
+ # source://unparser//lib/unparser/emitter/variable.rb#43
2793
+ Unparser::Emitter::NthRef::PREFIX = T.let(T.unsafe(nil), String)
2794
+
2795
+ # Emitter for op assign
2796
+ class Unparser::Emitter::OpAssign < ::Unparser::Emitter
2797
+ private
2798
+
2799
+ # source://unparser//lib/unparser/emitter/op_assign.rb#40
2800
+ def dispatch; end
2801
+
2802
+ # source://unparser//lib/unparser/emitter/op_assign.rb#46
2803
+ def emit_operator; end
2804
+
2805
+ # source://unparser//lib/unparser/dsl.rb#18
2806
+ def operator; end
2807
+
2808
+ # source://unparser//lib/unparser/dsl.rb#11
2809
+ def remaining_children; end
2810
+
2811
+ # source://unparser//lib/unparser/dsl.rb#18
2812
+ def target; end
2813
+
2814
+ # source://unparser//lib/unparser/dsl.rb#18
2815
+ def value; end
2816
+ end
2817
+
2818
+ # Optional argument emitter
2819
+ class Unparser::Emitter::Optarg < ::Unparser::Emitter
2820
+ private
2821
+
2822
+ # source://unparser//lib/unparser/emitter/argument.rb#32
2823
+ def dispatch; end
2824
+
2825
+ # source://unparser//lib/unparser/dsl.rb#18
2826
+ def name; end
2827
+
2828
+ # source://unparser//lib/unparser/dsl.rb#11
2829
+ def remaining_children; end
2830
+
2831
+ # source://unparser//lib/unparser/dsl.rb#18
2832
+ def value; end
2833
+ end
2834
+
2835
+ # Emitter for key value pairs in hash literals or kwargs
2836
+ class Unparser::Emitter::Pair < ::Unparser::Emitter
2837
+ private
2838
+
2839
+ # @return [Boolean]
2840
+ #
2841
+ # source://unparser//lib/unparser/emitter/pair.rb#28
2842
+ def colon?(key); end
2843
+
2844
+ # source://unparser//lib/unparser/emitter/pair.rb#17
2845
+ def dispatch; end
2846
+
2847
+ # source://unparser//lib/unparser/dsl.rb#18
2848
+ def key; end
2849
+
2850
+ # source://unparser//lib/unparser/dsl.rb#11
2851
+ def remaining_children; end
2852
+
2853
+ # source://unparser//lib/unparser/dsl.rb#18
2854
+ def value; end
2855
+ end
2856
+
2857
+ # source://unparser//lib/unparser/emitter/pair.rb#7
2858
+ Unparser::Emitter::Pair::BAREWORD = T.let(T.unsafe(nil), Regexp)
2859
+
2860
+ # Emitter for pin nodes
2861
+ class Unparser::Emitter::Pin < ::Unparser::Emitter
2862
+ private
2863
+
2864
+ # source://unparser//lib/unparser/emitter/pin.rb#13
2865
+ def dispatch; end
2866
+
2867
+ # source://unparser//lib/unparser/dsl.rb#11
2868
+ def remaining_children; end
2869
+
2870
+ # source://unparser//lib/unparser/dsl.rb#18
2871
+ def target; end
2872
+ end
2873
+
2874
+ # Emitter for postconditions
2875
+ class Unparser::Emitter::Post < ::Unparser::Emitter
2876
+ private
2877
+
2878
+ # source://unparser//lib/unparser/dsl.rb#18
2879
+ def body; end
2880
+
2881
+ # source://unparser//lib/unparser/dsl.rb#18
2882
+ def condition; end
2883
+
2884
+ # source://unparser//lib/unparser/emitter/repetition.rb#19
2885
+ def dispatch; end
2886
+
2887
+ # source://unparser//lib/unparser/dsl.rb#11
2888
+ def remaining_children; end
2889
+ end
2890
+
2891
+ # source://unparser//lib/unparser/emitter/repetition.rb#10
2892
+ Unparser::Emitter::Post::MAP = T.let(T.unsafe(nil), Hash)
2893
+
2894
+ # Base class for primitive emitters
2895
+ class Unparser::Emitter::Primitive < ::Unparser::Emitter
2896
+ private
2897
+
2898
+ # source://unparser//lib/unparser/dsl.rb#11
2899
+ def remaining_children; end
2900
+
2901
+ # source://unparser//lib/unparser/dsl.rb#18
2902
+ def value; end
2903
+ end
2904
+
2905
+ # Emitter for complex literals
2906
+ class Unparser::Emitter::Primitive::Complex < ::Unparser::Emitter::Primitive
2907
+ private
2908
+
2909
+ # source://unparser//lib/unparser/emitter/primitive.rb#39
2910
+ def dispatch; end
2911
+
2912
+ # source://unparser//lib/unparser/emitter/primitive.rb#44
2913
+ def emit_imaginary; end
2914
+
2915
+ # source://unparser//lib/unparser/emitter/primitive.rb#48
2916
+ def imaginary_node; end
2917
+ end
2918
+
2919
+ # source://unparser//lib/unparser/emitter/primitive.rb#30
2920
+ Unparser::Emitter::Primitive::Complex::MAP = T.let(T.unsafe(nil), Hash)
2921
+
2922
+ # source://unparser//lib/unparser/emitter/primitive.rb#28
2923
+ Unparser::Emitter::Primitive::Complex::RATIONAL_FORMAT = T.let(T.unsafe(nil), String)
2924
+
2925
+ # Emitter for primitives based on Object#inspect
2926
+ class Unparser::Emitter::Primitive::Inspect < ::Unparser::Emitter::Primitive
2927
+ private
2928
+
2929
+ # source://unparser//lib/unparser/emitter/primitive.rb#17
2930
+ def dispatch; end
2931
+ end
2932
+
2933
+ # Emiter for numeric literals
2934
+ class Unparser::Emitter::Primitive::Numeric < ::Unparser::Emitter::Primitive
2935
+ private
2936
+
2937
+ # source://unparser//lib/unparser/emitter/primitive.rb#86
2938
+ def dispatch; end
2939
+ end
2940
+
2941
+ # Emitter for rational literals
2942
+ class Unparser::Emitter::Primitive::Rational < ::Unparser::Emitter::Primitive
2943
+ private
2944
+
2945
+ # source://unparser//lib/unparser/emitter/primitive.rb#65
2946
+ def dispatch; end
2947
+
2948
+ # source://unparser//lib/unparser/emitter/primitive.rb#73
2949
+ def write_rational(value); end
2950
+ end
2951
+
2952
+ # source://unparser//lib/unparser/emitter/primitive.rb#60
2953
+ Unparser::Emitter::Primitive::Rational::RATIONAL_FORMAT = T.let(T.unsafe(nil), String)
2954
+
2955
+ # Progarg emitter
2956
+ class Unparser::Emitter::Procarg < ::Unparser::Emitter
2957
+ private
2958
+
2959
+ # source://unparser//lib/unparser/emitter/argument.rb#103
2960
+ def dispatch; end
2961
+
2962
+ # @return [Boolean]
2963
+ #
2964
+ # source://unparser//lib/unparser/emitter/argument.rb#113
2965
+ def needs_parens?; end
2966
+ end
2967
+
2968
+ # source://unparser//lib/unparser/emitter/argument.rb#99
2969
+ Unparser::Emitter::Procarg::PARENS = T.let(T.unsafe(nil), Array)
2970
+
2971
+ # Registry for node emitters
2972
+ #
2973
+ # source://unparser//lib/unparser/emitter.rb#16
2974
+ Unparser::Emitter::REGISTRY = T.let(T.unsafe(nil), Hash)
2975
+
2976
+ # Range emitters
2977
+ class Unparser::Emitter::Range < ::Unparser::Emitter
2978
+ # source://unparser//lib/unparser/emitter/range.rb#17
2979
+ def symbol_name; end
2980
+
2981
+ private
2982
+
2983
+ # source://unparser//lib/unparser/dsl.rb#18
2984
+ def begin_node; end
2985
+
2986
+ # source://unparser//lib/unparser/emitter/range.rb#27
2987
+ def dispatch; end
2988
+
2989
+ # source://unparser//lib/unparser/dsl.rb#18
2990
+ def end_node; end
2991
+
2992
+ # source://unparser//lib/unparser/dsl.rb#11
2993
+ def remaining_children; end
2994
+ end
2995
+
2996
+ # source://unparser//lib/unparser/emitter/range.rb#12
2997
+ Unparser::Emitter::Range::SYMBOLS = T.let(T.unsafe(nil), Hash)
2998
+
2999
+ # source://unparser//lib/unparser/emitter/range.rb#7
3000
+ Unparser::Emitter::Range::TOKENS = T.let(T.unsafe(nil), Hash)
3001
+
3002
+ # Emitter for regexp literals
3003
+ class Unparser::Emitter::Regexp < ::Unparser::Emitter
3004
+ private
3005
+
3006
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3007
+ def body(&block); end
3008
+
3009
+ # source://unparser//lib/unparser/emitter/regexp.rb#13
3010
+ def dispatch; end
3011
+
3012
+ # source://unparser//lib/unparser/emitter/regexp.rb#24
3013
+ def emit_body(node); end
3014
+
3015
+ # source://unparser//lib/unparser/emitter/regexp.rb#20
3016
+ def emit_options; end
3017
+ end
3018
+
3019
+ # Emitter for while and until nodes
3020
+ class Unparser::Emitter::Repetition < ::Unparser::Emitter
3021
+ private
3022
+
3023
+ # source://unparser//lib/unparser/dsl.rb#18
3024
+ def body; end
3025
+
3026
+ # source://unparser//lib/unparser/dsl.rb#18
3027
+ def condition; end
3028
+
3029
+ # source://unparser//lib/unparser/emitter/repetition.rb#39
3030
+ def dispatch; end
3031
+
3032
+ # source://unparser//lib/unparser/emitter/repetition.rb#51
3033
+ def emit_keyword; end
3034
+
3035
+ # source://unparser//lib/unparser/emitter/repetition.rb#55
3036
+ def emit_normal; end
3037
+
3038
+ # source://unparser//lib/unparser/emitter/repetition.rb#66
3039
+ def emit_postcontrol; end
3040
+
3041
+ # @return [Boolean]
3042
+ #
3043
+ # source://unparser//lib/unparser/emitter/repetition.rb#47
3044
+ def postcontrol?; end
3045
+
3046
+ # source://unparser//lib/unparser/dsl.rb#11
3047
+ def remaining_children; end
3048
+ end
3049
+
3050
+ # source://unparser//lib/unparser/emitter/repetition.rb#28
3051
+ Unparser::Emitter::Repetition::MAP = T.let(T.unsafe(nil), Hash)
3052
+
3053
+ # Emitter for rescue nodes
3054
+ class Unparser::Emitter::Rescue < ::Unparser::Emitter
3055
+ private
3056
+
3057
+ # source://unparser//lib/unparser/emitter/rescue.rb#11
3058
+ def dispatch; end
3059
+ end
3060
+
3061
+ # Rest argument emitter
3062
+ class Unparser::Emitter::Restarg < ::Unparser::Emitter
3063
+ private
3064
+
3065
+ # source://unparser//lib/unparser/emitter/argument.rb#75
3066
+ def dispatch; end
3067
+
3068
+ # source://unparser//lib/unparser/dsl.rb#18
3069
+ def name; end
3070
+
3071
+ # source://unparser//lib/unparser/dsl.rb#11
3072
+ def remaining_children; end
3073
+ end
3074
+
3075
+ # Root emitter a special case
3076
+ class Unparser::Emitter::Root < ::Unparser::Emitter
3077
+ include ::Unparser::Emitter::LocalVariableRoot
3078
+
3079
+ # source://unparser//lib/unparser/concord.rb#60
3080
+ def buffer; end
3081
+
3082
+ # source://unparser//lib/unparser/concord.rb#60
3083
+ def comments; end
3084
+
3085
+ # source://unparser//lib/unparser/emitter/root.rb#14
3086
+ def dispatch; end
3087
+
3088
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3089
+ def local_variable_scope(&block); end
3090
+
3091
+ # source://unparser//lib/unparser/concord.rb#60
3092
+ def node; end
3093
+ end
3094
+
3095
+ # source://unparser//lib/unparser/emitter/root.rb#10
3096
+ Unparser::Emitter::Root::END_NL = T.let(T.unsafe(nil), Array)
3097
+
3098
+ # Emitter for sclass nodes
3099
+ class Unparser::Emitter::SClass < ::Unparser::Emitter
3100
+ private
3101
+
3102
+ # source://unparser//lib/unparser/dsl.rb#18
3103
+ def body; end
3104
+
3105
+ # source://unparser//lib/unparser/emitter/class.rb#40
3106
+ def dispatch; end
3107
+
3108
+ # source://unparser//lib/unparser/dsl.rb#18
3109
+ def object; end
3110
+
3111
+ # source://unparser//lib/unparser/dsl.rb#11
3112
+ def remaining_children; end
3113
+ end
3114
+
3115
+ # Emitter for send
3116
+ class Unparser::Emitter::Send < ::Unparser::Emitter
3117
+ # source://unparser//lib/unparser/emitter/send.rb#13
3118
+ def emit_heredoc_reminders; end
3119
+
3120
+ # source://unparser//lib/unparser/emitter/send.rb#9
3121
+ def emit_mlhs; end
3122
+
3123
+ private
3124
+
3125
+ # source://unparser//lib/unparser/emitter/send.rb#19
3126
+ def dispatch; end
3127
+
3128
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3129
+ def writer(&block); end
3130
+ end
3131
+
3132
+ # Emitter for simple nodes that generate a single token
3133
+ class Unparser::Emitter::Simple < ::Unparser::Emitter
3134
+ private
3135
+
3136
+ # source://unparser//lib/unparser/emitter/simple.rb#28
3137
+ def dispatch; end
3138
+ end
3139
+
3140
+ # source://unparser//lib/unparser/emitter/simple.rb#7
3141
+ Unparser::Emitter::Simple::MAP = T.let(T.unsafe(nil), Hash)
3142
+
3143
+ # Emitter for splats
3144
+ class Unparser::Emitter::Splat < ::Unparser::Emitter
3145
+ # source://unparser//lib/unparser/emitter/splat.rb#25
3146
+ def emit_mlhs; end
3147
+
3148
+ private
3149
+
3150
+ # source://unparser//lib/unparser/emitter/splat.rb#32
3151
+ def dispatch; end
3152
+
3153
+ # source://unparser//lib/unparser/dsl.rb#11
3154
+ def remaining_children; end
3155
+
3156
+ # source://unparser//lib/unparser/dsl.rb#18
3157
+ def subject; end
3158
+
3159
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3160
+ def subject_emitter(&block); end
3161
+ end
3162
+
3163
+ # Emitter for super nodes
3164
+ class Unparser::Emitter::Super < ::Unparser::Emitter
3165
+ private
3166
+
3167
+ # source://unparser//lib/unparser/emitter/super.rb#12
3168
+ def dispatch; end
3169
+ end
3170
+
3171
+ # Emitter for undef nodes
3172
+ class Unparser::Emitter::Undef < ::Unparser::Emitter
3173
+ private
3174
+
3175
+ # source://unparser//lib/unparser/emitter/undef.rb#11
3176
+ def dispatch; end
3177
+ end
3178
+
3179
+ # Emitter for various variable accesses
3180
+ class Unparser::Emitter::Variable < ::Unparser::Emitter
3181
+ private
3182
+
3183
+ # source://unparser//lib/unparser/emitter/variable.rb#14
3184
+ def dispatch; end
3185
+
3186
+ # source://unparser//lib/unparser/dsl.rb#18
3187
+ def name; end
3188
+
3189
+ # source://unparser//lib/unparser/dsl.rb#11
3190
+ def remaining_children; end
3191
+ end
3192
+
3193
+ # Emitter for when nodes
3194
+ class Unparser::Emitter::When < ::Unparser::Emitter
3195
+ private
3196
+
3197
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3198
+ def captures(&block); end
3199
+
3200
+ # source://unparser//lib/unparser/emitter/case.rb#51
3201
+ def dispatch; end
3202
+
3203
+ # source://unparser//lib/unparser/emitter/case.rb#57
3204
+ def emit_captures; end
3205
+ end
3206
+
3207
+ # Dynamic execute string literal emitter
3208
+ class Unparser::Emitter::XStr < ::Unparser::Emitter
3209
+ private
3210
+
3211
+ # source://unparser//lib/unparser/emitter/xstr.rb#12
3212
+ def dispatch; end
3213
+
3214
+ # source://unparser//lib/unparser/emitter/xstr.rb#65
3215
+ def emit_begin(component); end
3216
+
3217
+ # source://unparser//lib/unparser/emitter/xstr.rb#24
3218
+ def emit_heredoc; end
3219
+
3220
+ # source://unparser//lib/unparser/emitter/xstr.rb#51
3221
+ def emit_string(value); end
3222
+
3223
+ # source://unparser//lib/unparser/emitter/xstr.rb#39
3224
+ def emit_xstr; end
3225
+
3226
+ # source://unparser//lib/unparser/emitter/xstr.rb#55
3227
+ def escape_xstr(input); end
3228
+
3229
+ # @return [Boolean]
3230
+ #
3231
+ # source://unparser//lib/unparser/emitter/xstr.rb#20
3232
+ def heredoc?; end
3233
+ end
3234
+
3235
+ # Emitter for yield node
3236
+ class Unparser::Emitter::Yield < ::Unparser::Emitter
3237
+ private
3238
+
3239
+ # source://unparser//lib/unparser/emitter/yield.rb#12
3240
+ def dispatch; end
3241
+ end
3242
+
3243
+ # Define equality, equivalence and inspection methods
3244
+ #
3245
+ # Original code before vendoring and reduction from: https://github.com/dkubb/equalizer.
3246
+ class Unparser::Equalizer < ::Module
3247
+ # Initialize an Equalizer with the given keys
3248
+ #
3249
+ # Will use the keys with which it is initialized to define #cmp?,
3250
+ # #hash, and #inspect
3251
+ #
3252
+ #
3253
+ # @api private
3254
+ # @param keys [Array<Symbol>]
3255
+ # @return [undefined]
3256
+ #
3257
+ # source://unparser//lib/unparser/equalizer.rb#20
3258
+ def initialize(*keys); end
3259
+
3260
+ private
3261
+
3262
+ # source://unparser//lib/unparser/equalizer.rb#39
3263
+ def define_cmp_method; end
3264
+
3265
+ # source://unparser//lib/unparser/equalizer.rb#49
3266
+ def define_hash_method; end
3267
+
3268
+ # source://unparser//lib/unparser/equalizer.rb#56
3269
+ def define_inspect_method; end
3270
+
3271
+ # source://unparser//lib/unparser/equalizer.rb#33
3272
+ def define_methods; end
3273
+
3274
+ # source://unparser//lib/unparser/equalizer.rb#29
3275
+ def included(descendant); end
3276
+ end
3277
+
3278
+ # The comparison methods
3279
+ module Unparser::Equalizer::Methods
3280
+ # Compare the object with other object for equivalency
3281
+ #
3282
+ # @api public
3283
+ # @example
3284
+ # object == other # => true or false
3285
+ # @param other [Object] the other object to compare with
3286
+ # @return [Boolean]
3287
+ #
3288
+ # source://unparser//lib/unparser/equalizer.rb#93
3289
+ def ==(other); end
3290
+
3291
+ # Compare the object with other object for equality
3292
+ #
3293
+ # @api public
3294
+ # @example
3295
+ # object.eql?(other) # => true or false
3296
+ # @param other [Object] the other object to compare with
3297
+ # @return [Boolean]
3298
+ #
3299
+ # source://unparser//lib/unparser/equalizer.rb#78
3300
+ def eql?(other); end
3301
+ end
3302
+
3303
+ module Unparser::Generation
3304
+ # source://unparser//lib/unparser/generation.rb#10
3305
+ def emit_heredoc_reminders; end
3306
+
3307
+ # source://unparser//lib/unparser/generation.rb#12
3308
+ def symbol_name; end
3309
+
3310
+ # source://unparser//lib/unparser/generation.rb#14
3311
+ def write_to_buffer; end
3312
+
3313
+ private
3314
+
3315
+ # source://unparser//lib/unparser/generation.rb#247
3316
+ def children; end
3317
+
3318
+ # source://unparser//lib/unparser/generation.rb#239
3319
+ def conditional_parentheses(flag, &block); end
3320
+
3321
+ # source://unparser//lib/unparser/generation.rb#21
3322
+ def delimited(nodes, delimiter = T.unsafe(nil), &block); end
3323
+
3324
+ # source://unparser//lib/unparser/generation.rb#123
3325
+ def emit_body(node, indent: T.unsafe(nil)); end
3326
+
3327
+ # source://unparser//lib/unparser/generation.rb#196
3328
+ def emit_body_ensure_rescue(node); end
3329
+
3330
+ # source://unparser//lib/unparser/generation.rb#145
3331
+ def emit_body_inner(node); end
3332
+
3333
+ # source://unparser//lib/unparser/generation.rb#158
3334
+ def emit_body_member(node); end
3335
+
3336
+ # source://unparser//lib/unparser/generation.rb#180
3337
+ def emit_body_rescue(node); end
3338
+
3339
+ # source://unparser//lib/unparser/generation.rb#77
3340
+ def emit_comments(comments); end
3341
+
3342
+ # source://unparser//lib/unparser/generation.rb#69
3343
+ def emit_comments_before(source_part = T.unsafe(nil)); end
3344
+
3345
+ # source://unparser//lib/unparser/generation.rb#166
3346
+ def emit_ensure(node); end
3347
+
3348
+ # source://unparser//lib/unparser/generation.rb#60
3349
+ def emit_eof_comments; end
3350
+
3351
+ # source://unparser//lib/unparser/generation.rb#54
3352
+ def emit_eol_comments; end
3353
+
3354
+ # source://unparser//lib/unparser/generation.rb#27
3355
+ def emit_join(nodes, emit_node, emit_delimiter); end
3356
+
3357
+ # source://unparser//lib/unparser/generation.rb#115
3358
+ def emit_optional_body(node, indent: T.unsafe(nil)); end
3359
+
3360
+ # source://unparser//lib/unparser/generation.rb#188
3361
+ def emit_optional_body_ensure_rescue(node); end
3362
+
3363
+ # source://unparser//lib/unparser/generation.rb#206
3364
+ def emit_rescue_postcontrol(node); end
3365
+
3366
+ # source://unparser//lib/unparser/generation.rb#212
3367
+ def emit_rescue_regular(node); end
3368
+
3369
+ # source://unparser//lib/unparser/generation.rb#220
3370
+ def emitter(node); end
3371
+
3372
+ # source://unparser//lib/unparser/generation.rb#235
3373
+ def first_child; end
3374
+
3375
+ # source://unparser//lib/unparser/generation.rb#106
3376
+ def indented; end
3377
+
3378
+ # source://unparser//lib/unparser/generation.rb#93
3379
+ def k_end; end
3380
+
3381
+ # source://unparser//lib/unparser/generation.rb#39
3382
+ def nl; end
3383
+
3384
+ # source://unparser//lib/unparser/generation.rb#100
3385
+ def parentheses(open = T.unsafe(nil), close = T.unsafe(nil)); end
3386
+
3387
+ # source://unparser//lib/unparser/generation.rb#224
3388
+ def visit(node); end
3389
+
3390
+ # source://unparser//lib/unparser/generation.rb#228
3391
+ def visit_deep(node); end
3392
+
3393
+ # source://unparser//lib/unparser/generation.rb#44
3394
+ def with_comments; end
3395
+
3396
+ # source://unparser//lib/unparser/generation.rb#89
3397
+ def write(*strings); end
3398
+
3399
+ # source://unparser//lib/unparser/generation.rb#216
3400
+ def writer_with(klass, node); end
3401
+
3402
+ # source://unparser//lib/unparser/generation.rb#50
3403
+ def ws; end
3404
+ end
3405
+
3406
+ # source://unparser//lib/unparser/generation.rb#6
3407
+ Unparser::Generation::EXTRA_NL = T.let(T.unsafe(nil), Array)
3408
+
3409
+ # Error raised when unparser encounters an invalid AST
3410
+ class Unparser::InvalidNodeError < ::RuntimeError
3411
+ # @return [InvalidNodeError] a new instance of InvalidNodeError
3412
+ #
3413
+ # source://unparser//lib/unparser.rb#42
3414
+ def initialize(message, node); end
3415
+
3416
+ # Returns the value of attribute node.
3417
+ #
3418
+ # source://unparser//lib/unparser.rb#40
3419
+ def node; end
3420
+ end
3421
+
3422
+ module Unparser::NodeDetails
3423
+ include ::Unparser::NodeHelpers
3424
+ include ::Unparser::Constants
3425
+
3426
+ private
3427
+
3428
+ # source://unparser//lib/unparser/node_details.rb#17
3429
+ def children; end
3430
+
3431
+ class << self
3432
+ # @private
3433
+ #
3434
+ # source://unparser//lib/unparser/node_details.rb#7
3435
+ def included(descendant); end
3436
+ end
3437
+ end
3438
+
3439
+ class Unparser::NodeDetails::Send
3440
+ include ::Unparser::NodeHelpers
3441
+ include ::Unparser::Constants
3442
+ include ::Unparser::NodeDetails
3443
+ include ::Unparser::Equalizer::Methods
3444
+ include ::Unparser::Adamantium
3445
+ include ::Unparser::Adamantium::InstanceMethods
3446
+ extend ::Unparser::Adamantium::ModuleMethods
3447
+ extend ::Unparser::Adamantium::ClassMethods
3448
+ extend ::Unparser::DSL
3449
+
3450
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3451
+ def arguments(&block); end
3452
+
3453
+ # @return [Boolean]
3454
+ #
3455
+ # source://unparser//lib/unparser/node_details/send.rb#36
3456
+ def arguments?; end
3457
+
3458
+ # @return [Boolean]
3459
+ #
3460
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3461
+ def assignment?(&block); end
3462
+
3463
+ # @return [Boolean]
3464
+ #
3465
+ # source://unparser//lib/unparser/node_details/send.rb#32
3466
+ def assignment_operator?; end
3467
+
3468
+ # @return [Boolean]
3469
+ #
3470
+ # source://unparser//lib/unparser/node_details/send.rb#21
3471
+ def binary_syntax_allowed?; end
3472
+
3473
+ # source://unparser//lib/unparser/node_details/send.rb#40
3474
+ def non_assignment_selector; end
3475
+
3476
+ # source://unparser//lib/unparser/dsl.rb#18
3477
+ def receiver; end
3478
+
3479
+ # source://unparser//lib/unparser/dsl.rb#18
3480
+ def selector; end
3481
+
3482
+ # @return [Boolean]
3483
+ #
3484
+ # source://unparser//lib/unparser/node_details/send.rb#17
3485
+ def selector_binary_operator?; end
3486
+
3487
+ # @return [Boolean]
3488
+ #
3489
+ # source://unparser//lib/unparser/node_details/send.rb#28
3490
+ def selector_unary_operator?; end
3491
+
3492
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3493
+ def string_selector(&block); end
3494
+
3495
+ private
3496
+
3497
+ # source://unparser//lib/unparser/dsl.rb#11
3498
+ def remaining_children; end
3499
+ end
3500
+
3501
+ # source://unparser//lib/unparser/node_details/send.rb#8
3502
+ Unparser::NodeDetails::Send::ASSIGN_SUFFIX = T.let(T.unsafe(nil), String)
3503
+
3504
+ # source://unparser//lib/unparser/node_details/send.rb#9
3505
+ Unparser::NodeDetails::Send::NON_ASSIGN_RANGE = T.let(T.unsafe(nil), Range)
3506
+
3507
+ module Unparser::NodeHelpers
3508
+ # Helper for building nodes
3509
+ #
3510
+ # @api private
3511
+ # @param type [Symbol]
3512
+ # @param children [Array]
3513
+ # @return [Parser::AST::Node]
3514
+ #
3515
+ # source://unparser//lib/unparser/node_helpers.rb#26
3516
+ def n(type, children = T.unsafe(nil)); end
3517
+
3518
+ # @return [Boolean]
3519
+ #
3520
+ # source://unparser//lib/unparser/node_helpers.rb#30
3521
+ def n?(type, node); end
3522
+
3523
+ # Helper for building nodes
3524
+ #
3525
+ # @api private
3526
+ # @param type [Symbol]
3527
+ # @param children [Parser::AST::Node]
3528
+ # @return [Parser::AST::Node]
3529
+ #
3530
+ # source://unparser//lib/unparser/node_helpers.rb#14
3531
+ def s(type, *children); end
3532
+
3533
+ # source://unparser//lib/unparser/node_helpers.rb#71
3534
+ def unwrap_single_begin(node); end
3535
+
3536
+ private
3537
+
3538
+ # source://unparser//lib/unparser/node_helpers.rb#65
3539
+ def n_arg?(node); end
3540
+
3541
+ # source://unparser//lib/unparser/node_helpers.rb#65
3542
+ def n_args?(node); end
3543
+
3544
+ # source://unparser//lib/unparser/node_helpers.rb#65
3545
+ def n_array?(node); end
3546
+
3547
+ # source://unparser//lib/unparser/node_helpers.rb#65
3548
+ def n_array_pattern?(node); end
3549
+
3550
+ # source://unparser//lib/unparser/node_helpers.rb#65
3551
+ def n_begin?(node); end
3552
+
3553
+ # source://unparser//lib/unparser/node_helpers.rb#65
3554
+ def n_block?(node); end
3555
+
3556
+ # source://unparser//lib/unparser/node_helpers.rb#65
3557
+ def n_cbase?(node); end
3558
+
3559
+ # source://unparser//lib/unparser/node_helpers.rb#65
3560
+ def n_const?(node); end
3561
+
3562
+ # source://unparser//lib/unparser/node_helpers.rb#65
3563
+ def n_dstr?(node); end
3564
+
3565
+ # source://unparser//lib/unparser/node_helpers.rb#65
3566
+ def n_empty_else?(node); end
3567
+
3568
+ # source://unparser//lib/unparser/node_helpers.rb#65
3569
+ def n_ensure?(node); end
3570
+
3571
+ # source://unparser//lib/unparser/node_helpers.rb#65
3572
+ def n_hash?(node); end
3573
+
3574
+ # source://unparser//lib/unparser/node_helpers.rb#65
3575
+ def n_hash_pattern?(node); end
3576
+
3577
+ # source://unparser//lib/unparser/node_helpers.rb#65
3578
+ def n_if?(node); end
3579
+
3580
+ # source://unparser//lib/unparser/node_helpers.rb#65
3581
+ def n_in_pattern?(node); end
3582
+
3583
+ # source://unparser//lib/unparser/node_helpers.rb#65
3584
+ def n_int?(node); end
3585
+
3586
+ # source://unparser//lib/unparser/node_helpers.rb#65
3587
+ def n_kwarg?(node); end
3588
+
3589
+ # source://unparser//lib/unparser/node_helpers.rb#65
3590
+ def n_kwargs?(node); end
3591
+
3592
+ # source://unparser//lib/unparser/node_helpers.rb#65
3593
+ def n_kwsplat?(node); end
3594
+
3595
+ # source://unparser//lib/unparser/node_helpers.rb#65
3596
+ def n_lambda?(node); end
3597
+
3598
+ # source://unparser//lib/unparser/node_helpers.rb#65
3599
+ def n_match_rest?(node); end
3600
+
3601
+ # source://unparser//lib/unparser/node_helpers.rb#65
3602
+ def n_pair?(node); end
3603
+
3604
+ # source://unparser//lib/unparser/node_helpers.rb#65
3605
+ def n_rescue?(node); end
3606
+
3607
+ # source://unparser//lib/unparser/node_helpers.rb#65
3608
+ def n_send?(node); end
3609
+
3610
+ # source://unparser//lib/unparser/node_helpers.rb#65
3611
+ def n_shadowarg?(node); end
3612
+
3613
+ # source://unparser//lib/unparser/node_helpers.rb#65
3614
+ def n_splat?(node); end
3615
+
3616
+ # source://unparser//lib/unparser/node_helpers.rb#65
3617
+ def n_str?(node); end
3618
+
3619
+ # source://unparser//lib/unparser/node_helpers.rb#65
3620
+ def n_sym?(node); end
3621
+ end
3622
+
3623
+ module Unparser::RequireBlock
3624
+ private
3625
+
3626
+ # Raise error unless block is provided
3627
+ #
3628
+ # @raise [MissingBlockError] if no block is given
3629
+ # @return [self]
3630
+ #
3631
+ # source://unparser//lib/unparser/either.rb#14
3632
+ def require_block; end
3633
+ end
3634
+
3635
+ class Unparser::UnknownNodeError < ::ArgumentError; end
3636
+
3637
+ # Validation of unparser results
3638
+ class Unparser::Validation
3639
+ include ::Unparser::Anima::InstanceMethods
3640
+ include ::Unparser::Equalizer::Methods
3641
+ include ::Unparser::Adamantium
3642
+ include ::Unparser::Adamantium::InstanceMethods
3643
+ extend ::Unparser::Adamantium::ModuleMethods
3644
+ extend ::Unparser::Adamantium::ClassMethods
3645
+
3646
+ # source://unparser//lib/unparser/anima.rb#146
3647
+ def generated_node; end
3648
+
3649
+ # source://unparser//lib/unparser/anima.rb#146
3650
+ def generated_source; end
3651
+
3652
+ # source://unparser//lib/unparser/anima.rb#146
3653
+ def identification; end
3654
+
3655
+ # source://unparser//lib/unparser/anima.rb#146
3656
+ def original_node; end
3657
+
3658
+ # source://unparser//lib/unparser/anima.rb#146
3659
+ def original_source; end
3660
+
3661
+ # Return error report
3662
+ #
3663
+ # @api private
3664
+ # @return [String]
3665
+ #
3666
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3667
+ def report(&block); end
3668
+
3669
+ # Test if source could be unparsed successfully
3670
+ #
3671
+ # @api private
3672
+ # @return [Boolean]
3673
+ #
3674
+ # source://unparser//lib/unparser/validation.rb#20
3675
+ def success?; end
3676
+
3677
+ private
3678
+
3679
+ # source://unparser//lib/unparser/validation.rb#106
3680
+ def make_report(label, attribute_name); end
3681
+
3682
+ # source://unparser//lib/unparser/validation.rb#118
3683
+ def node_diff_report; end
3684
+
3685
+ # source://unparser//lib/unparser/validation.rb#110
3686
+ def report_exception(exception); end
3687
+
3688
+ class << self
3689
+ # source://unparser//lib/unparser/anima.rb#140
3690
+ def anima; end
3691
+
3692
+ # Create validator from node
3693
+ #
3694
+ # @param original_node [Parser::AST::Node]
3695
+ # @return [Validator]
3696
+ #
3697
+ # source://unparser//lib/unparser/validation.rb#79
3698
+ def from_node(original_node); end
3699
+
3700
+ # Create validator from file
3701
+ #
3702
+ # @param path [Pathname]
3703
+ # @return [Validator]
3704
+ #
3705
+ # source://unparser//lib/unparser/validation.rb#100
3706
+ def from_path(path); end
3707
+
3708
+ # Create validator from string
3709
+ #
3710
+ # @param original_source [String]
3711
+ # @return [Validator]
3712
+ #
3713
+ # source://unparser//lib/unparser/validation.rb#53
3714
+ def from_string(original_source); end
3715
+
3716
+ private
3717
+
3718
+ # source://unparser//lib/unparser/validation.rb#133
3719
+ def const_unit(_value); end
3720
+ end
3721
+ end
3722
+
3723
+ class Unparser::Validation::Literal < ::Unparser::Validation
3724
+ # source://unparser//lib/unparser/validation.rb#141
3725
+ def report; end
3726
+
3727
+ # @return [Boolean]
3728
+ #
3729
+ # source://unparser//lib/unparser/validation.rb#137
3730
+ def success?; end
3731
+
3732
+ private
3733
+
3734
+ # source://unparser//lib/unparser/validation.rb#156
3735
+ def source_diff_report; end
3736
+ end
3737
+
3738
+ module Unparser::Writer
3739
+ include ::Unparser::NodeHelpers
3740
+ include ::Unparser::Generation
3741
+ include ::Unparser::Anima::InstanceMethods
3742
+ include ::Unparser::Equalizer::Methods
3743
+
3744
+ mixes_in_class_methods ::Unparser::DSL
3745
+
3746
+ class << self
3747
+ # @private
3748
+ #
3749
+ # source://unparser//lib/unparser/writer.rb#7
3750
+ def included(descendant); end
3751
+ end
3752
+ end
3753
+
3754
+ class Unparser::Writer::Binary
3755
+ include ::Unparser::Adamantium
3756
+ include ::Unparser::Adamantium::InstanceMethods
3757
+ include ::Unparser::NodeHelpers
3758
+ include ::Unparser::Generation
3759
+ include ::Unparser::Writer
3760
+ include ::Unparser::Anima::InstanceMethods
3761
+ include ::Unparser::Equalizer::Methods
3762
+ extend ::Unparser::Adamantium::ModuleMethods
3763
+ extend ::Unparser::Adamantium::ClassMethods
3764
+ extend ::Unparser::DSL
3765
+
3766
+ # source://unparser//lib/unparser/anima.rb#146
3767
+ def buffer; end
3768
+
3769
+ # source://unparser//lib/unparser/anima.rb#146
3770
+ def comments; end
3771
+
3772
+ # source://unparser//lib/unparser/writer/binary.rb#54
3773
+ def dispatch; end
3774
+
3775
+ # source://unparser//lib/unparser/writer/binary.rb#46
3776
+ def emit_operator; end
3777
+
3778
+ # source://unparser//lib/unparser/anima.rb#146
3779
+ def local_variable_scope; end
3780
+
3781
+ # source://unparser//lib/unparser/anima.rb#146
3782
+ def node; end
3783
+
3784
+ # source://unparser//lib/unparser/writer/binary.rb#50
3785
+ def symbol_name; end
3786
+
3787
+ private
3788
+
3789
+ # source://unparser//lib/unparser/writer/binary.rb#62
3790
+ def effective_symbol; end
3791
+
3792
+ # source://unparser//lib/unparser/writer/binary.rb#74
3793
+ def emit_with(map); end
3794
+
3795
+ # source://unparser//lib/unparser/writer/binary.rb#80
3796
+ def keyword_symbol; end
3797
+
3798
+ # source://unparser//lib/unparser/dsl.rb#18
3799
+ def left; end
3800
+
3801
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3802
+ def left_emitter(&block); end
3803
+
3804
+ # source://unparser//lib/unparser/writer/binary.rb#84
3805
+ def operator_symbol; end
3806
+
3807
+ # source://unparser//lib/unparser/dsl.rb#11
3808
+ def remaining_children; end
3809
+
3810
+ # source://unparser//lib/unparser/dsl.rb#18
3811
+ def right; end
3812
+
3813
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
3814
+ def right_emitter(&block); end
3815
+
3816
+ class << self
3817
+ # source://unparser//lib/unparser/anima.rb#140
3818
+ def anima; end
3819
+ end
3820
+ end
3821
+
3822
+ # source://unparser//lib/unparser/writer/binary.rb#22
3823
+ Unparser::Writer::Binary::KEYWORD_SYMBOLS = T.let(T.unsafe(nil), Hash)
3824
+
3825
+ # source://unparser//lib/unparser/writer/binary.rb#16
3826
+ Unparser::Writer::Binary::KEYWORD_TOKENS = T.let(T.unsafe(nil), Hash)
3827
+
3828
+ # source://unparser//lib/unparser/writer/binary.rb#34
3829
+ Unparser::Writer::Binary::MAP = T.let(T.unsafe(nil), Hash)
3830
+
3831
+ # source://unparser//lib/unparser/writer/binary.rb#42
3832
+ Unparser::Writer::Binary::NEED_KEYWORD = T.let(T.unsafe(nil), Array)
3833
+
3834
+ # source://unparser//lib/unparser/writer/binary.rb#28
3835
+ Unparser::Writer::Binary::OPERATOR_SYMBOLS = T.let(T.unsafe(nil), Hash)
3836
+
3837
+ # source://unparser//lib/unparser/writer/binary.rb#10
3838
+ Unparser::Writer::Binary::OPERATOR_TOKENS = T.let(T.unsafe(nil), Hash)
3839
+
3840
+ class Unparser::Writer::DynamicString
3841
+ include ::Unparser::Adamantium
3842
+ include ::Unparser::Adamantium::InstanceMethods
3843
+ include ::Unparser::NodeHelpers
3844
+ include ::Unparser::Generation
3845
+ include ::Unparser::Writer
3846
+ include ::Unparser::Anima::InstanceMethods
3847
+ include ::Unparser::Equalizer::Methods
3848
+ extend ::Unparser::Adamantium::ModuleMethods
3849
+ extend ::Unparser::Adamantium::ClassMethods
3850
+ extend ::Unparser::DSL
3851
+
3852
+ # source://unparser//lib/unparser/anima.rb#146
3853
+ def buffer; end
3854
+
3855
+ # source://unparser//lib/unparser/anima.rb#146
3856
+ def comments; end
3857
+
3858
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#32
3859
+ def dispatch; end
3860
+
3861
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#25
3862
+ def emit_heredoc_reminder; end
3863
+
3864
+ # source://unparser//lib/unparser/anima.rb#146
3865
+ def local_variable_scope; end
3866
+
3867
+ # source://unparser//lib/unparser/anima.rb#146
3868
+ def node; end
3869
+
3870
+ private
3871
+
3872
+ # @return [Boolean]
3873
+ #
3874
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#171
3875
+ def breakpoint?(child, current); end
3876
+
3877
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#63
3878
+ def classify(node); end
3879
+
3880
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#71
3881
+ def classify_str(node); end
3882
+
3883
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#205
3884
+ def emit_body(children); end
3885
+
3886
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#161
3887
+ def emit_dstr; end
3888
+
3889
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#144
3890
+ def emit_dynamic(child); end
3891
+
3892
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#157
3893
+ def emit_dynamic_component(node); end
3894
+
3895
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#54
3896
+ def emit_heredoc_body; end
3897
+
3898
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#59
3899
+ def emit_heredoc_footer; end
3900
+
3901
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#50
3902
+ def emit_heredoc_header; end
3903
+
3904
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#128
3905
+ def emit_normal_heredoc_body; end
3906
+
3907
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#197
3908
+ def emit_segment(children, index); end
3909
+
3910
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#116
3911
+ def emit_squiggly_heredoc_body; end
3912
+
3913
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#140
3914
+ def escape_dynamic(string); end
3915
+
3916
+ # @return [Boolean]
3917
+ #
3918
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#46
3919
+ def heredoc?; end
3920
+
3921
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#42
3922
+ def heredoc_header; end
3923
+
3924
+ # @return [Boolean]
3925
+ #
3926
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#95
3927
+ def heredoc_pattern?; end
3928
+
3929
+ # @return [Boolean]
3930
+ #
3931
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#105
3932
+ def heredoc_pattern_2?; end
3933
+
3934
+ # @return [Boolean]
3935
+ #
3936
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#99
3937
+ def heredoc_pattern_3?; end
3938
+
3939
+ # @return [Boolean]
3940
+ #
3941
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#111
3942
+ def nl_last_child?; end
3943
+
3944
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#181
3945
+ def segments; end
3946
+
3947
+ # @return [Boolean]
3948
+ #
3949
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#87
3950
+ def str_empty?(node); end
3951
+
3952
+ # @return [Boolean]
3953
+ #
3954
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#83
3955
+ def str_nl?(node); end
3956
+
3957
+ # @return [Boolean]
3958
+ #
3959
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#91
3960
+ def str_ws?(node); end
3961
+
3962
+ class << self
3963
+ # source://unparser//lib/unparser/anima.rb#140
3964
+ def anima; end
3965
+ end
3966
+ end
3967
+
3968
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#21
3969
+ Unparser::Writer::DynamicString::FLAT_INTERPOLATION = T.let(T.unsafe(nil), Set)
3970
+
3971
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#8
3972
+ Unparser::Writer::DynamicString::PATTERNS_2 = T.let(T.unsafe(nil), Array)
3973
+
3974
+ # source://unparser//lib/unparser/writer/dynamic_string.rb#14
3975
+ Unparser::Writer::DynamicString::PATTERNS_3 = T.let(T.unsafe(nil), Array)
3976
+
3977
+ # Writer for rescue bodies
3978
+ class Unparser::Writer::Resbody
3979
+ include ::Unparser::NodeHelpers
3980
+ include ::Unparser::Generation
3981
+ include ::Unparser::Writer
3982
+ include ::Unparser::Anima::InstanceMethods
3983
+ include ::Unparser::Equalizer::Methods
3984
+ extend ::Unparser::DSL
3985
+
3986
+ # source://unparser//lib/unparser/anima.rb#146
3987
+ def buffer; end
3988
+
3989
+ # source://unparser//lib/unparser/anima.rb#146
3990
+ def comments; end
3991
+
3992
+ # source://unparser//lib/unparser/writer/resbody.rb#11
3993
+ def emit_postcontrol; end
3994
+
3995
+ # source://unparser//lib/unparser/writer/resbody.rb#16
3996
+ def emit_regular; end
3997
+
3998
+ # source://unparser//lib/unparser/anima.rb#146
3999
+ def local_variable_scope; end
4000
+
4001
+ # source://unparser//lib/unparser/anima.rb#146
4002
+ def node; end
4003
+
4004
+ private
4005
+
4006
+ # source://unparser//lib/unparser/dsl.rb#18
4007
+ def assignment; end
4008
+
4009
+ # source://unparser//lib/unparser/dsl.rb#18
4010
+ def body; end
4011
+
4012
+ # source://unparser//lib/unparser/writer/resbody.rb#32
4013
+ def emit_assignment; end
4014
+
4015
+ # source://unparser//lib/unparser/writer/resbody.rb#25
4016
+ def emit_exception; end
4017
+
4018
+ # source://unparser//lib/unparser/dsl.rb#18
4019
+ def exception; end
4020
+
4021
+ # source://unparser//lib/unparser/dsl.rb#11
4022
+ def remaining_children; end
4023
+
4024
+ class << self
4025
+ # source://unparser//lib/unparser/anima.rb#140
4026
+ def anima; end
4027
+ end
4028
+ end
4029
+
4030
+ class Unparser::Writer::Rescue
4031
+ include ::Unparser::Adamantium
4032
+ include ::Unparser::Adamantium::InstanceMethods
4033
+ include ::Unparser::NodeHelpers
4034
+ include ::Unparser::Generation
4035
+ include ::Unparser::Writer
4036
+ include ::Unparser::Anima::InstanceMethods
4037
+ include ::Unparser::Equalizer::Methods
4038
+ extend ::Unparser::Adamantium::ModuleMethods
4039
+ extend ::Unparser::Adamantium::ClassMethods
4040
+ extend ::Unparser::DSL
4041
+
4042
+ # source://unparser//lib/unparser/anima.rb#146
4043
+ def buffer; end
4044
+
4045
+ # source://unparser//lib/unparser/anima.rb#146
4046
+ def comments; end
4047
+
4048
+ # source://unparser//lib/unparser/writer/rescue.rb#23
4049
+ def emit_heredoc_reminders; end
4050
+
4051
+ # source://unparser//lib/unparser/writer/rescue.rb#27
4052
+ def emit_postcontrol; end
4053
+
4054
+ # source://unparser//lib/unparser/writer/rescue.rb#12
4055
+ def emit_regular; end
4056
+
4057
+ # source://unparser//lib/unparser/anima.rb#146
4058
+ def local_variable_scope; end
4059
+
4060
+ # source://unparser//lib/unparser/anima.rb#146
4061
+ def node; end
4062
+
4063
+ private
4064
+
4065
+ # source://unparser//lib/unparser/dsl.rb#18
4066
+ def body; end
4067
+
4068
+ # source://unparser//lib/unparser/writer/rescue.rb#34
4069
+ def else_node; end
4070
+
4071
+ # source://unparser//lib/unparser/writer/rescue.rb#38
4072
+ def emit_rescue_body(node); end
4073
+
4074
+ # source://unparser//lib/unparser/dsl.rb#11
4075
+ def remaining_children; end
4076
+
4077
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
4078
+ def rescue_bodies(&block); end
4079
+
4080
+ # source://unparser//lib/unparser/dsl.rb#18
4081
+ def rescue_body; end
4082
+
4083
+ class << self
4084
+ # source://unparser//lib/unparser/anima.rb#140
4085
+ def anima; end
4086
+ end
4087
+ end
4088
+
4089
+ # Writer for send
4090
+ class Unparser::Writer::Send
4091
+ include ::Unparser::NodeHelpers
4092
+ include ::Unparser::Generation
4093
+ include ::Unparser::Constants
4094
+ include ::Unparser::Adamantium
4095
+ include ::Unparser::Adamantium::InstanceMethods
4096
+ include ::Unparser::Writer
4097
+ include ::Unparser::Anima::InstanceMethods
4098
+ include ::Unparser::Equalizer::Methods
4099
+ extend ::Unparser::Adamantium::ModuleMethods
4100
+ extend ::Unparser::Adamantium::ClassMethods
4101
+ extend ::Unparser::DSL
4102
+
4103
+ # source://unparser//lib/unparser/anima.rb#146
4104
+ def buffer; end
4105
+
4106
+ # source://unparser//lib/unparser/anima.rb#146
4107
+ def comments; end
4108
+
4109
+ # source://unparser//lib/unparser/writer/send.rb#21
4110
+ def dispatch; end
4111
+
4112
+ # source://unparser//lib/unparser/writer/send.rb#33
4113
+ def emit_heredoc_reminders; end
4114
+
4115
+ # source://unparser//lib/unparser/writer/send.rb#25
4116
+ def emit_mlhs; end
4117
+
4118
+ # source://unparser//lib/unparser/writer/send.rb#29
4119
+ def emit_selector; end
4120
+
4121
+ # source://unparser//lib/unparser/anima.rb#146
4122
+ def local_variable_scope; end
4123
+
4124
+ # source://unparser//lib/unparser/anima.rb#146
4125
+ def node; end
4126
+
4127
+ private
4128
+
4129
+ # source://unparser//lib/unparser/writer/send.rb#73
4130
+ def arguments; end
4131
+
4132
+ # @return [Boolean]
4133
+ #
4134
+ # source://unparser//lib/unparser/writer/send.rb#85
4135
+ def avoid_clash?; end
4136
+
4137
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
4138
+ def details(&block); end
4139
+
4140
+ # source://unparser//lib/unparser/adamantium/method_builder.rb#87
4141
+ def effective_writer(&block); end
4142
+
4143
+ # source://unparser//lib/unparser/writer/send.rb#45
4144
+ def effective_writer_class; end
4145
+
4146
+ # source://unparser//lib/unparser/writer/send.rb#65
4147
+ def emit_arguments; end
4148
+
4149
+ # source://unparser//lib/unparser/writer/send.rb#81
4150
+ def emit_heredoc_reminder(argument); end
4151
+
4152
+ # source://unparser//lib/unparser/writer/send.rb#77
4153
+ def emit_normal_arguments; end
4154
+
4155
+ # source://unparser//lib/unparser/writer/send.rb#61
4156
+ def emit_operator; end
4157
+
4158
+ # source://unparser//lib/unparser/writer/send.rb#106
4159
+ def emit_send_regular(node); end
4160
+
4161
+ # @return [Boolean]
4162
+ #
4163
+ # source://unparser//lib/unparser/writer/send.rb#89
4164
+ def local_variable_clash?; end
4165
+
4166
+ # @return [Boolean]
4167
+ #
4168
+ # source://unparser//lib/unparser/writer/send.rb#93
4169
+ def parses_as_constant?; end
4170
+
4171
+ # source://unparser//lib/unparser/dsl.rb#18
4172
+ def receiver; end
4173
+
4174
+ # source://unparser//lib/unparser/dsl.rb#11
4175
+ def remaining_children; end
4176
+
4177
+ # source://unparser//lib/unparser/dsl.rb#18
4178
+ def selector; end
4179
+
4180
+ # @return [Boolean]
4181
+ #
4182
+ # source://unparser//lib/unparser/writer/send.rb#57
4183
+ def write_as_attribute_assignment?; end
4184
+
4185
+ class << self
4186
+ # source://unparser//lib/unparser/anima.rb#140
4187
+ def anima; end
4188
+ end
4189
+ end
4190
+
4191
+ # Writer for send as attribute assignment
4192
+ class Unparser::Writer::Send::AttributeAssignment < ::Unparser::Writer::Send
4193
+ # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#10
4194
+ def dispatch; end
4195
+
4196
+ # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#22
4197
+ def emit_send_mlhs; end
4198
+
4199
+ private
4200
+
4201
+ # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#34
4202
+ def emit_attribute; end
4203
+
4204
+ # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#29
4205
+ def emit_receiver; end
4206
+
4207
+ # source://unparser//lib/unparser/dsl.rb#18
4208
+ def first_argument; end
4209
+
4210
+ # source://unparser//lib/unparser/dsl.rb#18
4211
+ def receiver; end
4212
+
4213
+ # source://unparser//lib/unparser/dsl.rb#11
4214
+ def remaining_children; end
4215
+
4216
+ # source://unparser//lib/unparser/dsl.rb#18
4217
+ def selector; end
4218
+ end
4219
+
4220
+ # Writer for binary sends
4221
+ class Unparser::Writer::Send::Binary < ::Unparser::Writer::Send
4222
+ # source://unparser//lib/unparser/writer/send/binary.rb#8
4223
+ def dispatch; end
4224
+
4225
+ private
4226
+
4227
+ # source://unparser//lib/unparser/writer/send/binary.rb#16
4228
+ def emit_operator; end
4229
+
4230
+ # source://unparser//lib/unparser/writer/send/binary.rb#20
4231
+ def emit_right; end
4232
+ end
4233
+
4234
+ # source://unparser//lib/unparser/writer/send.rb#9
4235
+ Unparser::Writer::Send::INDEX_ASSIGN = T.let(T.unsafe(nil), Symbol)
4236
+
4237
+ # source://unparser//lib/unparser/writer/send.rb#10
4238
+ Unparser::Writer::Send::INDEX_REFERENCE = T.let(T.unsafe(nil), Symbol)
4239
+
4240
+ # source://unparser//lib/unparser/writer/send.rb#12
4241
+ Unparser::Writer::Send::OPERATORS = T.let(T.unsafe(nil), Hash)
4242
+
4243
+ # Writer for "regular" receiver.selector(arguments...) case
4244
+ class Unparser::Writer::Send::Regular < ::Unparser::Writer::Send
4245
+ # source://unparser//lib/unparser/writer/send/regular.rb#8
4246
+ def dispatch; end
4247
+
4248
+ # source://unparser//lib/unparser/writer/send/regular.rb#18
4249
+ def emit_arguments_without_heredoc_body; end
4250
+
4251
+ # source://unparser//lib/unparser/writer/send/regular.rb#22
4252
+ def emit_receiver; end
4253
+
4254
+ # source://unparser//lib/unparser/writer/send/regular.rb#14
4255
+ def emit_send_mlhs; end
4256
+ end
4257
+
4258
+ # Writer for unary sends
4259
+ class Unparser::Writer::Send::Unary < ::Unparser::Writer::Send
4260
+ # source://unparser//lib/unparser/writer/send/unary.rb#15
4261
+ def dispatch; end
4262
+ end
4263
+
4264
+ # source://unparser//lib/unparser/writer/send/unary.rb#8
4265
+ Unparser::Writer::Send::Unary::MAP = T.let(T.unsafe(nil), Hash)