prism 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -1
  3. data/Makefile +6 -0
  4. data/README.md +2 -0
  5. data/config.yml +21 -20
  6. data/docs/configuration.md +2 -0
  7. data/docs/javascript.md +90 -0
  8. data/docs/releasing.md +27 -0
  9. data/docs/ruby_api.md +2 -0
  10. data/ext/prism/api_node.c +66 -68
  11. data/ext/prism/extension.c +73 -0
  12. data/ext/prism/extension.h +1 -1
  13. data/include/prism/ast.h +40 -40
  14. data/include/prism/defines.h +9 -0
  15. data/include/prism/enc/pm_encoding.h +1 -0
  16. data/include/prism/node.h +0 -17
  17. data/include/prism/parser.h +1 -0
  18. data/include/prism/prettyprint.h +15 -0
  19. data/include/prism/util/pm_buffer.h +10 -4
  20. data/include/prism/util/pm_constant_pool.h +1 -1
  21. data/include/prism/util/pm_newline_list.h +1 -1
  22. data/include/prism/version.h +3 -3
  23. data/include/prism.h +11 -11
  24. data/lib/prism/compiler.rb +0 -3
  25. data/lib/prism/debug.rb +20 -6
  26. data/lib/prism/desugar_compiler.rb +1 -1
  27. data/lib/prism/dispatcher.rb +0 -14
  28. data/lib/prism/dsl.rb +8 -13
  29. data/lib/prism/ffi.rb +25 -0
  30. data/lib/prism/lex_compat.rb +1 -1
  31. data/lib/prism/mutation_compiler.rb +3 -8
  32. data/lib/prism/node.rb +123 -159
  33. data/lib/prism/node_ext.rb +23 -16
  34. data/lib/prism/parse_result.rb +21 -5
  35. data/lib/prism/pattern.rb +3 -3
  36. data/lib/prism/serialize.rb +901 -305
  37. data/lib/prism/visitor.rb +0 -3
  38. data/prism.gemspec +8 -1
  39. data/rbi/prism.rbi +7261 -0
  40. data/rbi/prism_static.rbi +182 -0
  41. data/sig/prism.rbs +4439 -0
  42. data/sig/prism_static.rbs +110 -0
  43. data/src/enc/pm_unicode.c +1 -1
  44. data/src/node.c +28 -29
  45. data/src/prettyprint.c +7674 -1647
  46. data/src/prism.c +353 -300
  47. data/src/regexp.c +2 -0
  48. data/src/serialize.c +392 -381
  49. data/src/util/pm_buffer.c +47 -12
  50. data/src/util/pm_constant_pool.c +1 -1
  51. data/src/util/pm_newline_list.c +8 -54
  52. metadata +9 -2
data/sig/prism.rbs ADDED
@@ -0,0 +1,4439 @@
1
+ # This file is generated by the templates/template.rb script and should not be
2
+ # modified manually. See templates/sig/prism.rbs.erb
3
+ # if you are looking to modify the template
4
+
5
+ module Prism
6
+ # Represents the use of the `alias` keyword to alias a global variable.
7
+ #
8
+ # alias $foo $bar
9
+ # ^^^^^^^^^^^^^^^
10
+ class AliasGlobalVariableNode < Node
11
+ attr_reader new_name: Node
12
+ attr_reader old_name: Node
13
+ attr_reader keyword_loc: Location
14
+
15
+ def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void
16
+ def accept: (visitor: Visitor) -> void
17
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
18
+ def child_nodes: () -> Array[Node?]
19
+ def deconstruct: () -> Array[Node?]
20
+
21
+ def copy: (**untyped) -> AliasGlobalVariableNode
22
+
23
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
24
+
25
+ def keyword: () -> String
26
+
27
+ def inspect: (inspector: NodeInspector) -> String
28
+ end
29
+ # Represents the use of the `alias` keyword to alias a method.
30
+ #
31
+ # alias foo bar
32
+ # ^^^^^^^^^^^^^
33
+ class AliasMethodNode < Node
34
+ attr_reader new_name: Node
35
+ attr_reader old_name: Node
36
+ attr_reader keyword_loc: Location
37
+
38
+ def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void
39
+ def accept: (visitor: Visitor) -> void
40
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
41
+ def child_nodes: () -> Array[Node?]
42
+ def deconstruct: () -> Array[Node?]
43
+
44
+ def copy: (**untyped) -> AliasMethodNode
45
+
46
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
47
+
48
+ def keyword: () -> String
49
+
50
+ def inspect: (inspector: NodeInspector) -> String
51
+ end
52
+ # Represents an alternation pattern in pattern matching.
53
+ #
54
+ # foo => bar | baz
55
+ # ^^^^^^^^^
56
+ class AlternationPatternNode < Node
57
+ attr_reader left: Node
58
+ attr_reader right: Node
59
+ attr_reader operator_loc: Location
60
+
61
+ def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
62
+ def accept: (visitor: Visitor) -> void
63
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
64
+ def child_nodes: () -> Array[Node?]
65
+ def deconstruct: () -> Array[Node?]
66
+
67
+ def copy: (**untyped) -> AlternationPatternNode
68
+
69
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
70
+
71
+ def operator: () -> String
72
+
73
+ def inspect: (inspector: NodeInspector) -> String
74
+ end
75
+ # Represents the use of the `&&` operator or the `and` keyword.
76
+ #
77
+ # left and right
78
+ # ^^^^^^^^^^^^^^
79
+ class AndNode < Node
80
+ attr_reader left: Node
81
+ attr_reader right: Node
82
+ attr_reader operator_loc: Location
83
+
84
+ def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
85
+ def accept: (visitor: Visitor) -> void
86
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
87
+ def child_nodes: () -> Array[Node?]
88
+ def deconstruct: () -> Array[Node?]
89
+
90
+ def copy: (**untyped) -> AndNode
91
+
92
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
93
+
94
+ def operator: () -> String
95
+
96
+ def inspect: (inspector: NodeInspector) -> String
97
+ end
98
+ # Represents a set of arguments to a method or a keyword.
99
+ #
100
+ # return foo, bar, baz
101
+ # ^^^^^^^^^^^^^
102
+ class ArgumentsNode < Node
103
+ attr_reader arguments: Array[Node]
104
+ attr_reader flags: Integer
105
+
106
+ def initialize: (arguments: Array[Node], flags: Integer, location: Location) -> void
107
+ def accept: (visitor: Visitor) -> void
108
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
109
+ def child_nodes: () -> Array[Node?]
110
+ def deconstruct: () -> Array[Node?]
111
+
112
+ def copy: (**untyped) -> ArgumentsNode
113
+
114
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
115
+
116
+ def keyword_splat?: () -> bool
117
+
118
+ def inspect: (inspector: NodeInspector) -> String
119
+ end
120
+ # Represents an array literal. This can be a regular array using brackets or
121
+ # a special array using % like %w or %i.
122
+ #
123
+ # [1, 2, 3]
124
+ # ^^^^^^^^^
125
+ class ArrayNode < Node
126
+ attr_reader elements: Array[Node]
127
+ attr_reader opening_loc: Location?
128
+ attr_reader closing_loc: Location?
129
+
130
+ def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
131
+ def accept: (visitor: Visitor) -> void
132
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
133
+ def child_nodes: () -> Array[Node?]
134
+ def deconstruct: () -> Array[Node?]
135
+
136
+ def copy: (**untyped) -> ArrayNode
137
+
138
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
139
+
140
+ def opening: () -> String?
141
+
142
+ def closing: () -> String?
143
+
144
+ def inspect: (inspector: NodeInspector) -> String
145
+ end
146
+ # Represents an array pattern in pattern matching.
147
+ #
148
+ # foo in 1, 2
149
+ # ^^^^^^^^^^^
150
+ #
151
+ # foo in [1, 2]
152
+ # ^^^^^^^^^^^^^
153
+ #
154
+ # foo in *1
155
+ # ^^^^^^^^^
156
+ #
157
+ # foo in Bar[]
158
+ # ^^^^^^^^^^^^
159
+ #
160
+ # foo in Bar[1, 2, 3]
161
+ # ^^^^^^^^^^^^^^^^^^^
162
+ class ArrayPatternNode < Node
163
+ attr_reader constant: Node?
164
+ attr_reader requireds: Array[Node]
165
+ attr_reader rest: Node?
166
+ attr_reader posts: Array[Node]
167
+ attr_reader opening_loc: Location?
168
+ attr_reader closing_loc: Location?
169
+
170
+ def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
171
+ def accept: (visitor: Visitor) -> void
172
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
173
+ def child_nodes: () -> Array[Node?]
174
+ def deconstruct: () -> Array[Node?]
175
+
176
+ def copy: (**untyped) -> ArrayPatternNode
177
+
178
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
179
+
180
+ def opening: () -> String?
181
+
182
+ def closing: () -> String?
183
+
184
+ def inspect: (inspector: NodeInspector) -> String
185
+ end
186
+ # Represents a hash key/value pair.
187
+ #
188
+ # { a => b }
189
+ # ^^^^^^
190
+ class AssocNode < Node
191
+ attr_reader key: Node
192
+ attr_reader value: Node?
193
+ attr_reader operator_loc: Location?
194
+
195
+ def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void
196
+ def accept: (visitor: Visitor) -> void
197
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
198
+ def child_nodes: () -> Array[Node?]
199
+ def deconstruct: () -> Array[Node?]
200
+
201
+ def copy: (**untyped) -> AssocNode
202
+
203
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
204
+
205
+ def operator: () -> String?
206
+
207
+ def inspect: (inspector: NodeInspector) -> String
208
+ end
209
+ # Represents a splat in a hash literal.
210
+ #
211
+ # { **foo }
212
+ # ^^^^^
213
+ class AssocSplatNode < Node
214
+ attr_reader value: Node?
215
+ attr_reader operator_loc: Location
216
+
217
+ def initialize: (value: Node?, operator_loc: Location, location: Location) -> void
218
+ def accept: (visitor: Visitor) -> void
219
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
220
+ def child_nodes: () -> Array[Node?]
221
+ def deconstruct: () -> Array[Node?]
222
+
223
+ def copy: (**untyped) -> AssocSplatNode
224
+
225
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
226
+
227
+ def operator: () -> String
228
+
229
+ def inspect: (inspector: NodeInspector) -> String
230
+ end
231
+ # Represents reading a reference to a field in the previous match.
232
+ #
233
+ # $'
234
+ # ^^
235
+ class BackReferenceReadNode < Node
236
+ attr_reader name: Symbol
237
+
238
+ def initialize: (name: Symbol, location: Location) -> void
239
+ def accept: (visitor: Visitor) -> void
240
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
241
+ def child_nodes: () -> Array[Node?]
242
+ def deconstruct: () -> Array[Node?]
243
+
244
+ def copy: (**untyped) -> BackReferenceReadNode
245
+
246
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
247
+
248
+ def inspect: (inspector: NodeInspector) -> String
249
+ end
250
+ # Represents a begin statement.
251
+ #
252
+ # begin
253
+ # foo
254
+ # end
255
+ # ^^^^^
256
+ class BeginNode < Node
257
+ attr_reader begin_keyword_loc: Location?
258
+ attr_reader statements: StatementsNode?
259
+ attr_reader rescue_clause: RescueNode?
260
+ attr_reader else_clause: ElseNode?
261
+ attr_reader ensure_clause: EnsureNode?
262
+ attr_reader end_keyword_loc: Location?
263
+
264
+ def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void
265
+ def accept: (visitor: Visitor) -> void
266
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
267
+ def child_nodes: () -> Array[Node?]
268
+ def deconstruct: () -> Array[Node?]
269
+
270
+ def copy: (**untyped) -> BeginNode
271
+
272
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
273
+
274
+ def begin_keyword: () -> String?
275
+
276
+ def end_keyword: () -> String?
277
+
278
+ def inspect: (inspector: NodeInspector) -> String
279
+ end
280
+ # Represents block method arguments.
281
+ #
282
+ # bar(&args)
283
+ # ^^^^^^^^^^
284
+ class BlockArgumentNode < Node
285
+ attr_reader expression: Node?
286
+ attr_reader operator_loc: Location
287
+
288
+ def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void
289
+ def accept: (visitor: Visitor) -> void
290
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
291
+ def child_nodes: () -> Array[Node?]
292
+ def deconstruct: () -> Array[Node?]
293
+
294
+ def copy: (**untyped) -> BlockArgumentNode
295
+
296
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
297
+
298
+ def operator: () -> String
299
+
300
+ def inspect: (inspector: NodeInspector) -> String
301
+ end
302
+ # Represents a block local variable.
303
+ #
304
+ # a { |; b| }
305
+ # ^
306
+ class BlockLocalVariableNode < Node
307
+ attr_reader name: Symbol
308
+
309
+ def initialize: (name: Symbol, location: Location) -> void
310
+ def accept: (visitor: Visitor) -> void
311
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
312
+ def child_nodes: () -> Array[Node?]
313
+ def deconstruct: () -> Array[Node?]
314
+
315
+ def copy: (**untyped) -> BlockLocalVariableNode
316
+
317
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
318
+
319
+ def inspect: (inspector: NodeInspector) -> String
320
+ end
321
+ # Represents a block of ruby code.
322
+ #
323
+ # [1, 2, 3].each { |i| puts x }
324
+ # ^^^^^^^^^^^^^^
325
+ class BlockNode < Node
326
+ attr_reader locals: Array[Symbol]
327
+ attr_reader parameters: BlockParametersNode?
328
+ attr_reader body: Node?
329
+ attr_reader opening_loc: Location
330
+ attr_reader closing_loc: Location
331
+
332
+ def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
333
+ def accept: (visitor: Visitor) -> void
334
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
335
+ def child_nodes: () -> Array[Node?]
336
+ def deconstruct: () -> Array[Node?]
337
+
338
+ def copy: (**untyped) -> BlockNode
339
+
340
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
341
+
342
+ def opening: () -> String
343
+
344
+ def closing: () -> String
345
+
346
+ def inspect: (inspector: NodeInspector) -> String
347
+ end
348
+ # Represents a block parameter to a method, block, or lambda definition.
349
+ #
350
+ # def a(&b)
351
+ # ^^
352
+ # end
353
+ class BlockParameterNode < Node
354
+ attr_reader name: Symbol?
355
+ attr_reader name_loc: Location?
356
+ attr_reader operator_loc: Location
357
+
358
+ def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
359
+ def accept: (visitor: Visitor) -> void
360
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
361
+ def child_nodes: () -> Array[Node?]
362
+ def deconstruct: () -> Array[Node?]
363
+
364
+ def copy: (**untyped) -> BlockParameterNode
365
+
366
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
367
+
368
+ def operator: () -> String
369
+
370
+ def inspect: (inspector: NodeInspector) -> String
371
+ end
372
+ # Represents a block's parameters declaration.
373
+ #
374
+ # -> (a, b = 1; local) { }
375
+ # ^^^^^^^^^^^^^^^^^
376
+ #
377
+ # foo do |a, b = 1; local|
378
+ # ^^^^^^^^^^^^^^^^^
379
+ # end
380
+ class BlockParametersNode < Node
381
+ attr_reader parameters: ParametersNode?
382
+ attr_reader locals: Array[Node]
383
+ attr_reader opening_loc: Location?
384
+ attr_reader closing_loc: Location?
385
+
386
+ def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
387
+ def accept: (visitor: Visitor) -> void
388
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
389
+ def child_nodes: () -> Array[Node?]
390
+ def deconstruct: () -> Array[Node?]
391
+
392
+ def copy: (**untyped) -> BlockParametersNode
393
+
394
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
395
+
396
+ def opening: () -> String?
397
+
398
+ def closing: () -> String?
399
+
400
+ def inspect: (inspector: NodeInspector) -> String
401
+ end
402
+ # Represents the use of the `break` keyword.
403
+ #
404
+ # break foo
405
+ # ^^^^^^^^^
406
+ class BreakNode < Node
407
+ attr_reader arguments: ArgumentsNode?
408
+ attr_reader keyword_loc: Location
409
+
410
+ def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void
411
+ def accept: (visitor: Visitor) -> void
412
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
413
+ def child_nodes: () -> Array[Node?]
414
+ def deconstruct: () -> Array[Node?]
415
+
416
+ def copy: (**untyped) -> BreakNode
417
+
418
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
419
+
420
+ def keyword: () -> String
421
+
422
+ def inspect: (inspector: NodeInspector) -> String
423
+ end
424
+ # Represents the use of the `&&=` operator on a call.
425
+ #
426
+ # foo.bar &&= value
427
+ # ^^^^^^^^^^^^^^^^^
428
+ class CallAndWriteNode < Node
429
+ attr_reader receiver: Node?
430
+ attr_reader call_operator_loc: Location?
431
+ attr_reader message_loc: Location?
432
+ attr_reader flags: Integer
433
+ attr_reader read_name: Symbol
434
+ attr_reader write_name: Symbol
435
+ attr_reader operator_loc: Location
436
+ attr_reader value: Node
437
+
438
+ def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
439
+ def accept: (visitor: Visitor) -> void
440
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
441
+ def child_nodes: () -> Array[Node?]
442
+ def deconstruct: () -> Array[Node?]
443
+
444
+ def copy: (**untyped) -> CallAndWriteNode
445
+
446
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
447
+
448
+ def call_operator: () -> String?
449
+
450
+ def message: () -> String?
451
+
452
+ def safe_navigation?: () -> bool
453
+
454
+ def variable_call?: () -> bool
455
+
456
+ def operator: () -> String
457
+
458
+ def inspect: (inspector: NodeInspector) -> String
459
+ end
460
+ # Represents a method call, in all of the various forms that can take.
461
+ #
462
+ # foo
463
+ # ^^^
464
+ #
465
+ # foo()
466
+ # ^^^^^
467
+ #
468
+ # +foo
469
+ # ^^^^
470
+ #
471
+ # foo + bar
472
+ # ^^^^^^^^^
473
+ #
474
+ # foo.bar
475
+ # ^^^^^^^
476
+ #
477
+ # foo&.bar
478
+ # ^^^^^^^^
479
+ class CallNode < Node
480
+ attr_reader receiver: Node?
481
+ attr_reader call_operator_loc: Location?
482
+ attr_reader message_loc: Location?
483
+ attr_reader opening_loc: Location?
484
+ attr_reader arguments: ArgumentsNode?
485
+ attr_reader closing_loc: Location?
486
+ attr_reader block: Node?
487
+ attr_reader flags: Integer
488
+ attr_reader name: Symbol
489
+
490
+ def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void
491
+ def accept: (visitor: Visitor) -> void
492
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
493
+ def child_nodes: () -> Array[Node?]
494
+ def deconstruct: () -> Array[Node?]
495
+
496
+ def copy: (**untyped) -> CallNode
497
+
498
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
499
+
500
+ def call_operator: () -> String?
501
+
502
+ def message: () -> String?
503
+
504
+ def opening: () -> String?
505
+
506
+ def closing: () -> String?
507
+
508
+ def safe_navigation?: () -> bool
509
+
510
+ def variable_call?: () -> bool
511
+
512
+ def inspect: (inspector: NodeInspector) -> String
513
+ end
514
+ # Represents the use of an assignment operator on a call.
515
+ #
516
+ # foo.bar += baz
517
+ # ^^^^^^^^^^^^^^
518
+ class CallOperatorWriteNode < Node
519
+ attr_reader receiver: Node?
520
+ attr_reader call_operator_loc: Location?
521
+ attr_reader message_loc: Location?
522
+ attr_reader flags: Integer
523
+ attr_reader read_name: Symbol
524
+ attr_reader write_name: Symbol
525
+ attr_reader operator: Symbol
526
+ attr_reader operator_loc: Location
527
+ attr_reader value: Node
528
+
529
+ def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
530
+ def accept: (visitor: Visitor) -> void
531
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
532
+ def child_nodes: () -> Array[Node?]
533
+ def deconstruct: () -> Array[Node?]
534
+
535
+ def copy: (**untyped) -> CallOperatorWriteNode
536
+
537
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
538
+
539
+ def call_operator: () -> String?
540
+
541
+ def message: () -> String?
542
+
543
+ def safe_navigation?: () -> bool
544
+
545
+ def variable_call?: () -> bool
546
+
547
+ def inspect: (inspector: NodeInspector) -> String
548
+ end
549
+ # Represents the use of the `||=` operator on a call.
550
+ #
551
+ # foo.bar ||= value
552
+ # ^^^^^^^^^^^^^^^^^
553
+ class CallOrWriteNode < Node
554
+ attr_reader receiver: Node?
555
+ attr_reader call_operator_loc: Location?
556
+ attr_reader message_loc: Location?
557
+ attr_reader flags: Integer
558
+ attr_reader read_name: Symbol
559
+ attr_reader write_name: Symbol
560
+ attr_reader operator_loc: Location
561
+ attr_reader value: Node
562
+
563
+ def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
564
+ def accept: (visitor: Visitor) -> void
565
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
566
+ def child_nodes: () -> Array[Node?]
567
+ def deconstruct: () -> Array[Node?]
568
+
569
+ def copy: (**untyped) -> CallOrWriteNode
570
+
571
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
572
+
573
+ def call_operator: () -> String?
574
+
575
+ def message: () -> String?
576
+
577
+ def safe_navigation?: () -> bool
578
+
579
+ def variable_call?: () -> bool
580
+
581
+ def operator: () -> String
582
+
583
+ def inspect: (inspector: NodeInspector) -> String
584
+ end
585
+ # Represents assigning to a local variable in pattern matching.
586
+ #
587
+ # foo => [bar => baz]
588
+ # ^^^^^^^^^^^^
589
+ class CapturePatternNode < Node
590
+ attr_reader value: Node
591
+ attr_reader target: Node
592
+ attr_reader operator_loc: Location
593
+
594
+ def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void
595
+ def accept: (visitor: Visitor) -> void
596
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
597
+ def child_nodes: () -> Array[Node?]
598
+ def deconstruct: () -> Array[Node?]
599
+
600
+ def copy: (**untyped) -> CapturePatternNode
601
+
602
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
603
+
604
+ def operator: () -> String
605
+
606
+ def inspect: (inspector: NodeInspector) -> String
607
+ end
608
+ # Represents the use of a case statement.
609
+ #
610
+ # case true
611
+ # ^^^^^^^^^
612
+ # when false
613
+ # end
614
+ class CaseNode < Node
615
+ attr_reader predicate: Node?
616
+ attr_reader conditions: Array[Node]
617
+ attr_reader consequent: ElseNode?
618
+ attr_reader case_keyword_loc: Location
619
+ attr_reader end_keyword_loc: Location
620
+
621
+ def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void
622
+ def accept: (visitor: Visitor) -> void
623
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
624
+ def child_nodes: () -> Array[Node?]
625
+ def deconstruct: () -> Array[Node?]
626
+
627
+ def copy: (**untyped) -> CaseNode
628
+
629
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
630
+
631
+ def case_keyword: () -> String
632
+
633
+ def end_keyword: () -> String
634
+
635
+ def inspect: (inspector: NodeInspector) -> String
636
+ end
637
+ # Represents a class declaration involving the `class` keyword.
638
+ #
639
+ # class Foo end
640
+ # ^^^^^^^^^^^^^
641
+ class ClassNode < Node
642
+ attr_reader locals: Array[Symbol]
643
+ attr_reader class_keyword_loc: Location
644
+ attr_reader constant_path: Node
645
+ attr_reader inheritance_operator_loc: Location?
646
+ attr_reader superclass: Node?
647
+ attr_reader body: Node?
648
+ attr_reader end_keyword_loc: Location
649
+ attr_reader name: Symbol
650
+
651
+ def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void
652
+ def accept: (visitor: Visitor) -> void
653
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
654
+ def child_nodes: () -> Array[Node?]
655
+ def deconstruct: () -> Array[Node?]
656
+
657
+ def copy: (**untyped) -> ClassNode
658
+
659
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
660
+
661
+ def class_keyword: () -> String
662
+
663
+ def inheritance_operator: () -> String?
664
+
665
+ def end_keyword: () -> String
666
+
667
+ def inspect: (inspector: NodeInspector) -> String
668
+ end
669
+ # Represents the use of the `&&=` operator for assignment to a class variable.
670
+ #
671
+ # @@target &&= value
672
+ # ^^^^^^^^^^^^^^^^
673
+ class ClassVariableAndWriteNode < Node
674
+ attr_reader name: Symbol
675
+ attr_reader name_loc: Location
676
+ attr_reader operator_loc: Location
677
+ attr_reader value: Node
678
+
679
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
680
+ def accept: (visitor: Visitor) -> void
681
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
682
+ def child_nodes: () -> Array[Node?]
683
+ def deconstruct: () -> Array[Node?]
684
+
685
+ def copy: (**untyped) -> ClassVariableAndWriteNode
686
+
687
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
688
+
689
+ def operator: () -> String
690
+
691
+ def inspect: (inspector: NodeInspector) -> String
692
+ end
693
+ # Represents assigning to a class variable using an operator that isn't `=`.
694
+ #
695
+ # @@target += value
696
+ # ^^^^^^^^^^^^^^^^^
697
+ class ClassVariableOperatorWriteNode < Node
698
+ attr_reader name: Symbol
699
+ attr_reader name_loc: Location
700
+ attr_reader operator_loc: Location
701
+ attr_reader value: Node
702
+ attr_reader operator: Symbol
703
+
704
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
705
+ def accept: (visitor: Visitor) -> void
706
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
707
+ def child_nodes: () -> Array[Node?]
708
+ def deconstruct: () -> Array[Node?]
709
+
710
+ def copy: (**untyped) -> ClassVariableOperatorWriteNode
711
+
712
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
713
+
714
+ def inspect: (inspector: NodeInspector) -> String
715
+ end
716
+ # Represents the use of the `||=` operator for assignment to a class variable.
717
+ #
718
+ # @@target ||= value
719
+ # ^^^^^^^^^^^^^^^^^^
720
+ class ClassVariableOrWriteNode < Node
721
+ attr_reader name: Symbol
722
+ attr_reader name_loc: Location
723
+ attr_reader operator_loc: Location
724
+ attr_reader value: Node
725
+
726
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
727
+ def accept: (visitor: Visitor) -> void
728
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
729
+ def child_nodes: () -> Array[Node?]
730
+ def deconstruct: () -> Array[Node?]
731
+
732
+ def copy: (**untyped) -> ClassVariableOrWriteNode
733
+
734
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
735
+
736
+ def operator: () -> String
737
+
738
+ def inspect: (inspector: NodeInspector) -> String
739
+ end
740
+ # Represents referencing a class variable.
741
+ #
742
+ # @@foo
743
+ # ^^^^^
744
+ class ClassVariableReadNode < Node
745
+ attr_reader name: Symbol
746
+
747
+ def initialize: (name: Symbol, location: Location) -> void
748
+ def accept: (visitor: Visitor) -> void
749
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
750
+ def child_nodes: () -> Array[Node?]
751
+ def deconstruct: () -> Array[Node?]
752
+
753
+ def copy: (**untyped) -> ClassVariableReadNode
754
+
755
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
756
+
757
+ def inspect: (inspector: NodeInspector) -> String
758
+ end
759
+ # Represents writing to a class variable in a context that doesn't have an explicit value.
760
+ #
761
+ # @@foo, @@bar = baz
762
+ # ^^^^^ ^^^^^
763
+ class ClassVariableTargetNode < Node
764
+ attr_reader name: Symbol
765
+
766
+ def initialize: (name: Symbol, location: Location) -> void
767
+ def accept: (visitor: Visitor) -> void
768
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
769
+ def child_nodes: () -> Array[Node?]
770
+ def deconstruct: () -> Array[Node?]
771
+
772
+ def copy: (**untyped) -> ClassVariableTargetNode
773
+
774
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
775
+
776
+ def inspect: (inspector: NodeInspector) -> String
777
+ end
778
+ # Represents writing to a class variable.
779
+ #
780
+ # @@foo = 1
781
+ # ^^^^^^^^^
782
+ class ClassVariableWriteNode < Node
783
+ attr_reader name: Symbol
784
+ attr_reader name_loc: Location
785
+ attr_reader value: Node
786
+ attr_reader operator_loc: Location?
787
+
788
+ def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void
789
+ def accept: (visitor: Visitor) -> void
790
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
791
+ def child_nodes: () -> Array[Node?]
792
+ def deconstruct: () -> Array[Node?]
793
+
794
+ def copy: (**untyped) -> ClassVariableWriteNode
795
+
796
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
797
+
798
+ def operator: () -> String?
799
+
800
+ def inspect: (inspector: NodeInspector) -> String
801
+ end
802
+ # Represents the use of the `&&=` operator for assignment to a constant.
803
+ #
804
+ # Target &&= value
805
+ # ^^^^^^^^^^^^^^^^
806
+ class ConstantAndWriteNode < Node
807
+ attr_reader name: Symbol
808
+ attr_reader name_loc: Location
809
+ attr_reader operator_loc: Location
810
+ attr_reader value: Node
811
+
812
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
813
+ def accept: (visitor: Visitor) -> void
814
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
815
+ def child_nodes: () -> Array[Node?]
816
+ def deconstruct: () -> Array[Node?]
817
+
818
+ def copy: (**untyped) -> ConstantAndWriteNode
819
+
820
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
821
+
822
+ def operator: () -> String
823
+
824
+ def inspect: (inspector: NodeInspector) -> String
825
+ end
826
+ # Represents assigning to a constant using an operator that isn't `=`.
827
+ #
828
+ # Target += value
829
+ # ^^^^^^^^^^^^^^^
830
+ class ConstantOperatorWriteNode < Node
831
+ attr_reader name: Symbol
832
+ attr_reader name_loc: Location
833
+ attr_reader operator_loc: Location
834
+ attr_reader value: Node
835
+ attr_reader operator: Symbol
836
+
837
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
838
+ def accept: (visitor: Visitor) -> void
839
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
840
+ def child_nodes: () -> Array[Node?]
841
+ def deconstruct: () -> Array[Node?]
842
+
843
+ def copy: (**untyped) -> ConstantOperatorWriteNode
844
+
845
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
846
+
847
+ def inspect: (inspector: NodeInspector) -> String
848
+ end
849
+ # Represents the use of the `||=` operator for assignment to a constant.
850
+ #
851
+ # Target ||= value
852
+ # ^^^^^^^^^^^^^^^^
853
+ class ConstantOrWriteNode < Node
854
+ attr_reader name: Symbol
855
+ attr_reader name_loc: Location
856
+ attr_reader operator_loc: Location
857
+ attr_reader value: Node
858
+
859
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
860
+ def accept: (visitor: Visitor) -> void
861
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
862
+ def child_nodes: () -> Array[Node?]
863
+ def deconstruct: () -> Array[Node?]
864
+
865
+ def copy: (**untyped) -> ConstantOrWriteNode
866
+
867
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
868
+
869
+ def operator: () -> String
870
+
871
+ def inspect: (inspector: NodeInspector) -> String
872
+ end
873
+ # Represents the use of the `&&=` operator for assignment to a constant path.
874
+ #
875
+ # Parent::Child &&= value
876
+ # ^^^^^^^^^^^^^^^^^^^^^^^
877
+ class ConstantPathAndWriteNode < Node
878
+ attr_reader target: ConstantPathNode
879
+ attr_reader operator_loc: Location
880
+ attr_reader value: Node
881
+
882
+ def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
883
+ def accept: (visitor: Visitor) -> void
884
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
885
+ def child_nodes: () -> Array[Node?]
886
+ def deconstruct: () -> Array[Node?]
887
+
888
+ def copy: (**untyped) -> ConstantPathAndWriteNode
889
+
890
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
891
+
892
+ def operator: () -> String
893
+
894
+ def inspect: (inspector: NodeInspector) -> String
895
+ end
896
+ # Represents accessing a constant through a path of `::` operators.
897
+ #
898
+ # Foo::Bar
899
+ # ^^^^^^^^
900
+ class ConstantPathNode < Node
901
+ attr_reader parent: Node?
902
+ attr_reader child: Node
903
+ attr_reader delimiter_loc: Location
904
+
905
+ def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void
906
+ def accept: (visitor: Visitor) -> void
907
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
908
+ def child_nodes: () -> Array[Node?]
909
+ def deconstruct: () -> Array[Node?]
910
+
911
+ def copy: (**untyped) -> ConstantPathNode
912
+
913
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
914
+
915
+ def delimiter: () -> String
916
+
917
+ def inspect: (inspector: NodeInspector) -> String
918
+ end
919
+ # Represents assigning to a constant path using an operator that isn't `=`.
920
+ #
921
+ # Parent::Child += value
922
+ # ^^^^^^^^^^^^^^^^^^^^^^
923
+ class ConstantPathOperatorWriteNode < Node
924
+ attr_reader target: ConstantPathNode
925
+ attr_reader operator_loc: Location
926
+ attr_reader value: Node
927
+ attr_reader operator: Symbol
928
+
929
+ def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
930
+ def accept: (visitor: Visitor) -> void
931
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
932
+ def child_nodes: () -> Array[Node?]
933
+ def deconstruct: () -> Array[Node?]
934
+
935
+ def copy: (**untyped) -> ConstantPathOperatorWriteNode
936
+
937
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
938
+
939
+ def inspect: (inspector: NodeInspector) -> String
940
+ end
941
+ # Represents the use of the `||=` operator for assignment to a constant path.
942
+ #
943
+ # Parent::Child ||= value
944
+ # ^^^^^^^^^^^^^^^^^^^^^^^
945
+ class ConstantPathOrWriteNode < Node
946
+ attr_reader target: ConstantPathNode
947
+ attr_reader operator_loc: Location
948
+ attr_reader value: Node
949
+
950
+ def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
951
+ def accept: (visitor: Visitor) -> void
952
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
953
+ def child_nodes: () -> Array[Node?]
954
+ def deconstruct: () -> Array[Node?]
955
+
956
+ def copy: (**untyped) -> ConstantPathOrWriteNode
957
+
958
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
959
+
960
+ def operator: () -> String
961
+
962
+ def inspect: (inspector: NodeInspector) -> String
963
+ end
964
+ # Represents writing to a constant path in a context that doesn't have an explicit value.
965
+ #
966
+ # Foo::Foo, Bar::Bar = baz
967
+ # ^^^^^^^^ ^^^^^^^^
968
+ class ConstantPathTargetNode < Node
969
+ attr_reader parent: Node?
970
+ attr_reader child: Node
971
+ attr_reader delimiter_loc: Location
972
+
973
+ def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void
974
+ def accept: (visitor: Visitor) -> void
975
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
976
+ def child_nodes: () -> Array[Node?]
977
+ def deconstruct: () -> Array[Node?]
978
+
979
+ def copy: (**untyped) -> ConstantPathTargetNode
980
+
981
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
982
+
983
+ def delimiter: () -> String
984
+
985
+ def inspect: (inspector: NodeInspector) -> String
986
+ end
987
+ # Represents writing to a constant path.
988
+ #
989
+ # ::Foo = 1
990
+ # ^^^^^^^^^
991
+ #
992
+ # Foo::Bar = 1
993
+ # ^^^^^^^^^^^^
994
+ #
995
+ # ::Foo::Bar = 1
996
+ # ^^^^^^^^^^^^^^
997
+ class ConstantPathWriteNode < Node
998
+ attr_reader target: ConstantPathNode
999
+ attr_reader operator_loc: Location
1000
+ attr_reader value: Node
1001
+
1002
+ def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
1003
+ def accept: (visitor: Visitor) -> void
1004
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1005
+ def child_nodes: () -> Array[Node?]
1006
+ def deconstruct: () -> Array[Node?]
1007
+
1008
+ def copy: (**untyped) -> ConstantPathWriteNode
1009
+
1010
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1011
+
1012
+ def operator: () -> String
1013
+
1014
+ def inspect: (inspector: NodeInspector) -> String
1015
+ end
1016
+ # Represents referencing a constant.
1017
+ #
1018
+ # Foo
1019
+ # ^^^
1020
+ class ConstantReadNode < Node
1021
+ attr_reader name: Symbol
1022
+
1023
+ def initialize: (name: Symbol, location: Location) -> void
1024
+ def accept: (visitor: Visitor) -> void
1025
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1026
+ def child_nodes: () -> Array[Node?]
1027
+ def deconstruct: () -> Array[Node?]
1028
+
1029
+ def copy: (**untyped) -> ConstantReadNode
1030
+
1031
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1032
+
1033
+ def inspect: (inspector: NodeInspector) -> String
1034
+ end
1035
+ # Represents writing to a constant in a context that doesn't have an explicit value.
1036
+ #
1037
+ # Foo, Bar = baz
1038
+ # ^^^ ^^^
1039
+ class ConstantTargetNode < Node
1040
+ attr_reader name: Symbol
1041
+
1042
+ def initialize: (name: Symbol, location: Location) -> void
1043
+ def accept: (visitor: Visitor) -> void
1044
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1045
+ def child_nodes: () -> Array[Node?]
1046
+ def deconstruct: () -> Array[Node?]
1047
+
1048
+ def copy: (**untyped) -> ConstantTargetNode
1049
+
1050
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1051
+
1052
+ def inspect: (inspector: NodeInspector) -> String
1053
+ end
1054
+ # Represents writing to a constant.
1055
+ #
1056
+ # Foo = 1
1057
+ # ^^^^^^^
1058
+ class ConstantWriteNode < Node
1059
+ attr_reader name: Symbol
1060
+ attr_reader name_loc: Location
1061
+ attr_reader value: Node
1062
+ attr_reader operator_loc: Location
1063
+
1064
+ def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
1065
+ def accept: (visitor: Visitor) -> void
1066
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1067
+ def child_nodes: () -> Array[Node?]
1068
+ def deconstruct: () -> Array[Node?]
1069
+
1070
+ def copy: (**untyped) -> ConstantWriteNode
1071
+
1072
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1073
+
1074
+ def operator: () -> String
1075
+
1076
+ def inspect: (inspector: NodeInspector) -> String
1077
+ end
1078
+ # Represents a method definition.
1079
+ #
1080
+ # def method
1081
+ # end
1082
+ # ^^^^^^^^^^
1083
+ class DefNode < Node
1084
+ attr_reader name: Symbol
1085
+ attr_reader name_loc: Location
1086
+ attr_reader receiver: Node?
1087
+ attr_reader parameters: ParametersNode?
1088
+ attr_reader body: Node?
1089
+ attr_reader locals: Array[Symbol]
1090
+ attr_reader def_keyword_loc: Location
1091
+ attr_reader operator_loc: Location?
1092
+ attr_reader lparen_loc: Location?
1093
+ attr_reader rparen_loc: Location?
1094
+ attr_reader equal_loc: Location?
1095
+ attr_reader end_keyword_loc: Location?
1096
+
1097
+ def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
1098
+ def accept: (visitor: Visitor) -> void
1099
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1100
+ def child_nodes: () -> Array[Node?]
1101
+ def deconstruct: () -> Array[Node?]
1102
+
1103
+ def copy: (**untyped) -> DefNode
1104
+
1105
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1106
+
1107
+ def def_keyword: () -> String
1108
+
1109
+ def operator: () -> String?
1110
+
1111
+ def lparen: () -> String?
1112
+
1113
+ def rparen: () -> String?
1114
+
1115
+ def equal: () -> String?
1116
+
1117
+ def end_keyword: () -> String?
1118
+
1119
+ def inspect: (inspector: NodeInspector) -> String
1120
+ end
1121
+ # Represents the use of the `defined?` keyword.
1122
+ #
1123
+ # defined?(a)
1124
+ # ^^^^^^^^^^^
1125
+ class DefinedNode < Node
1126
+ attr_reader lparen_loc: Location?
1127
+ attr_reader value: Node
1128
+ attr_reader rparen_loc: Location?
1129
+ attr_reader keyword_loc: Location
1130
+
1131
+ def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void
1132
+ def accept: (visitor: Visitor) -> void
1133
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1134
+ def child_nodes: () -> Array[Node?]
1135
+ def deconstruct: () -> Array[Node?]
1136
+
1137
+ def copy: (**untyped) -> DefinedNode
1138
+
1139
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1140
+
1141
+ def lparen: () -> String?
1142
+
1143
+ def rparen: () -> String?
1144
+
1145
+ def keyword: () -> String
1146
+
1147
+ def inspect: (inspector: NodeInspector) -> String
1148
+ end
1149
+ # Represents an `else` clause in a `case`, `if`, or `unless` statement.
1150
+ #
1151
+ # if a then b else c end
1152
+ # ^^^^^^^^^^
1153
+ class ElseNode < Node
1154
+ attr_reader else_keyword_loc: Location
1155
+ attr_reader statements: StatementsNode?
1156
+ attr_reader end_keyword_loc: Location?
1157
+
1158
+ def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void
1159
+ def accept: (visitor: Visitor) -> void
1160
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1161
+ def child_nodes: () -> Array[Node?]
1162
+ def deconstruct: () -> Array[Node?]
1163
+
1164
+ def copy: (**untyped) -> ElseNode
1165
+
1166
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1167
+
1168
+ def else_keyword: () -> String
1169
+
1170
+ def end_keyword: () -> String?
1171
+
1172
+ def inspect: (inspector: NodeInspector) -> String
1173
+ end
1174
+ # Represents an interpolated set of statements.
1175
+ #
1176
+ # "foo #{bar}"
1177
+ # ^^^^^^
1178
+ class EmbeddedStatementsNode < Node
1179
+ attr_reader opening_loc: Location
1180
+ attr_reader statements: StatementsNode?
1181
+ attr_reader closing_loc: Location
1182
+
1183
+ def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void
1184
+ def accept: (visitor: Visitor) -> void
1185
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1186
+ def child_nodes: () -> Array[Node?]
1187
+ def deconstruct: () -> Array[Node?]
1188
+
1189
+ def copy: (**untyped) -> EmbeddedStatementsNode
1190
+
1191
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1192
+
1193
+ def opening: () -> String
1194
+
1195
+ def closing: () -> String
1196
+
1197
+ def inspect: (inspector: NodeInspector) -> String
1198
+ end
1199
+ # Represents an interpolated variable.
1200
+ #
1201
+ # "foo #@bar"
1202
+ # ^^^^^
1203
+ class EmbeddedVariableNode < Node
1204
+ attr_reader operator_loc: Location
1205
+ attr_reader variable: Node
1206
+
1207
+ def initialize: (operator_loc: Location, variable: Node, location: Location) -> void
1208
+ def accept: (visitor: Visitor) -> void
1209
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1210
+ def child_nodes: () -> Array[Node?]
1211
+ def deconstruct: () -> Array[Node?]
1212
+
1213
+ def copy: (**untyped) -> EmbeddedVariableNode
1214
+
1215
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1216
+
1217
+ def operator: () -> String
1218
+
1219
+ def inspect: (inspector: NodeInspector) -> String
1220
+ end
1221
+ # Represents an `ensure` clause in a `begin` statement.
1222
+ #
1223
+ # begin
1224
+ # foo
1225
+ # ensure
1226
+ # ^^^^^^
1227
+ # bar
1228
+ # end
1229
+ class EnsureNode < Node
1230
+ attr_reader ensure_keyword_loc: Location
1231
+ attr_reader statements: StatementsNode?
1232
+ attr_reader end_keyword_loc: Location
1233
+
1234
+ def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void
1235
+ def accept: (visitor: Visitor) -> void
1236
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1237
+ def child_nodes: () -> Array[Node?]
1238
+ def deconstruct: () -> Array[Node?]
1239
+
1240
+ def copy: (**untyped) -> EnsureNode
1241
+
1242
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1243
+
1244
+ def ensure_keyword: () -> String
1245
+
1246
+ def end_keyword: () -> String
1247
+
1248
+ def inspect: (inspector: NodeInspector) -> String
1249
+ end
1250
+ # Represents the use of the literal `false` keyword.
1251
+ #
1252
+ # false
1253
+ # ^^^^^
1254
+ class FalseNode < Node
1255
+
1256
+ def initialize: (location: Location) -> void
1257
+ def accept: (visitor: Visitor) -> void
1258
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1259
+ def child_nodes: () -> Array[Node?]
1260
+ def deconstruct: () -> Array[Node?]
1261
+
1262
+ def copy: (**untyped) -> FalseNode
1263
+
1264
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1265
+
1266
+ def inspect: (inspector: NodeInspector) -> String
1267
+ end
1268
+ # Represents a find pattern in pattern matching.
1269
+ #
1270
+ # foo in *bar, baz, *qux
1271
+ # ^^^^^^^^^^^^^^^^^^^^^^
1272
+ #
1273
+ # foo in [*bar, baz, *qux]
1274
+ # ^^^^^^^^^^^^^^^^^^^^^^^^
1275
+ #
1276
+ # foo in Foo(*bar, baz, *qux)
1277
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1278
+ class FindPatternNode < Node
1279
+ attr_reader constant: Node?
1280
+ attr_reader left: Node
1281
+ attr_reader requireds: Array[Node]
1282
+ attr_reader right: Node
1283
+ attr_reader opening_loc: Location?
1284
+ attr_reader closing_loc: Location?
1285
+
1286
+ def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void
1287
+ def accept: (visitor: Visitor) -> void
1288
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1289
+ def child_nodes: () -> Array[Node?]
1290
+ def deconstruct: () -> Array[Node?]
1291
+
1292
+ def copy: (**untyped) -> FindPatternNode
1293
+
1294
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1295
+
1296
+ def opening: () -> String?
1297
+
1298
+ def closing: () -> String?
1299
+
1300
+ def inspect: (inspector: NodeInspector) -> String
1301
+ end
1302
+ # Represents the use of the `..` or `...` operators to create flip flops.
1303
+ #
1304
+ # baz if foo .. bar
1305
+ # ^^^^^^^^^^
1306
+ class FlipFlopNode < Node
1307
+ attr_reader left: Node?
1308
+ attr_reader right: Node?
1309
+ attr_reader operator_loc: Location
1310
+ attr_reader flags: Integer
1311
+
1312
+ def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
1313
+ def accept: (visitor: Visitor) -> void
1314
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1315
+ def child_nodes: () -> Array[Node?]
1316
+ def deconstruct: () -> Array[Node?]
1317
+
1318
+ def copy: (**untyped) -> FlipFlopNode
1319
+
1320
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1321
+
1322
+ def operator: () -> String
1323
+
1324
+ def exclude_end?: () -> bool
1325
+
1326
+ def inspect: (inspector: NodeInspector) -> String
1327
+ end
1328
+ # Represents a floating point number literal.
1329
+ #
1330
+ # 1.0
1331
+ # ^^^
1332
+ class FloatNode < Node
1333
+
1334
+ def initialize: (location: Location) -> void
1335
+ def accept: (visitor: Visitor) -> void
1336
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1337
+ def child_nodes: () -> Array[Node?]
1338
+ def deconstruct: () -> Array[Node?]
1339
+
1340
+ def copy: (**untyped) -> FloatNode
1341
+
1342
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1343
+
1344
+ def inspect: (inspector: NodeInspector) -> String
1345
+ end
1346
+ # Represents the use of the `for` keyword.
1347
+ #
1348
+ # for i in a end
1349
+ # ^^^^^^^^^^^^^^
1350
+ class ForNode < Node
1351
+ attr_reader index: Node
1352
+ attr_reader collection: Node
1353
+ attr_reader statements: StatementsNode?
1354
+ attr_reader for_keyword_loc: Location
1355
+ attr_reader in_keyword_loc: Location
1356
+ attr_reader do_keyword_loc: Location?
1357
+ attr_reader end_keyword_loc: Location
1358
+
1359
+ def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void
1360
+ def accept: (visitor: Visitor) -> void
1361
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1362
+ def child_nodes: () -> Array[Node?]
1363
+ def deconstruct: () -> Array[Node?]
1364
+
1365
+ def copy: (**untyped) -> ForNode
1366
+
1367
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1368
+
1369
+ def for_keyword: () -> String
1370
+
1371
+ def in_keyword: () -> String
1372
+
1373
+ def do_keyword: () -> String?
1374
+
1375
+ def end_keyword: () -> String
1376
+
1377
+ def inspect: (inspector: NodeInspector) -> String
1378
+ end
1379
+ # Represents forwarding all arguments to this method to another method.
1380
+ #
1381
+ # def foo(...)
1382
+ # bar(...)
1383
+ # ^^^^^^^^
1384
+ # end
1385
+ class ForwardingArgumentsNode < Node
1386
+
1387
+ def initialize: (location: Location) -> void
1388
+ def accept: (visitor: Visitor) -> void
1389
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1390
+ def child_nodes: () -> Array[Node?]
1391
+ def deconstruct: () -> Array[Node?]
1392
+
1393
+ def copy: (**untyped) -> ForwardingArgumentsNode
1394
+
1395
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1396
+
1397
+ def inspect: (inspector: NodeInspector) -> String
1398
+ end
1399
+ # Represents the use of the forwarding parameter in a method, block, or lambda declaration.
1400
+ #
1401
+ # def foo(...)
1402
+ # ^^^
1403
+ # end
1404
+ class ForwardingParameterNode < Node
1405
+
1406
+ def initialize: (location: Location) -> void
1407
+ def accept: (visitor: Visitor) -> void
1408
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1409
+ def child_nodes: () -> Array[Node?]
1410
+ def deconstruct: () -> Array[Node?]
1411
+
1412
+ def copy: (**untyped) -> ForwardingParameterNode
1413
+
1414
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1415
+
1416
+ def inspect: (inspector: NodeInspector) -> String
1417
+ end
1418
+ # Represents the use of the `super` keyword without parentheses or arguments.
1419
+ #
1420
+ # super
1421
+ # ^^^^^
1422
+ class ForwardingSuperNode < Node
1423
+ attr_reader block: BlockNode?
1424
+
1425
+ def initialize: (block: BlockNode?, location: Location) -> void
1426
+ def accept: (visitor: Visitor) -> void
1427
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1428
+ def child_nodes: () -> Array[Node?]
1429
+ def deconstruct: () -> Array[Node?]
1430
+
1431
+ def copy: (**untyped) -> ForwardingSuperNode
1432
+
1433
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1434
+
1435
+ def inspect: (inspector: NodeInspector) -> String
1436
+ end
1437
+ # Represents the use of the `&&=` operator for assignment to a global variable.
1438
+ #
1439
+ # $target &&= value
1440
+ # ^^^^^^^^^^^^^^^^^
1441
+ class GlobalVariableAndWriteNode < Node
1442
+ attr_reader name: Symbol
1443
+ attr_reader name_loc: Location
1444
+ attr_reader operator_loc: Location
1445
+ attr_reader value: Node
1446
+
1447
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
1448
+ def accept: (visitor: Visitor) -> void
1449
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1450
+ def child_nodes: () -> Array[Node?]
1451
+ def deconstruct: () -> Array[Node?]
1452
+
1453
+ def copy: (**untyped) -> GlobalVariableAndWriteNode
1454
+
1455
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1456
+
1457
+ def operator: () -> String
1458
+
1459
+ def inspect: (inspector: NodeInspector) -> String
1460
+ end
1461
+ # Represents assigning to a global variable using an operator that isn't `=`.
1462
+ #
1463
+ # $target += value
1464
+ # ^^^^^^^^^^^^^^^^
1465
+ class GlobalVariableOperatorWriteNode < Node
1466
+ attr_reader name: Symbol
1467
+ attr_reader name_loc: Location
1468
+ attr_reader operator_loc: Location
1469
+ attr_reader value: Node
1470
+ attr_reader operator: Symbol
1471
+
1472
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
1473
+ def accept: (visitor: Visitor) -> void
1474
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1475
+ def child_nodes: () -> Array[Node?]
1476
+ def deconstruct: () -> Array[Node?]
1477
+
1478
+ def copy: (**untyped) -> GlobalVariableOperatorWriteNode
1479
+
1480
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1481
+
1482
+ def inspect: (inspector: NodeInspector) -> String
1483
+ end
1484
+ # Represents the use of the `||=` operator for assignment to a global variable.
1485
+ #
1486
+ # $target ||= value
1487
+ # ^^^^^^^^^^^^^^^^^
1488
+ class GlobalVariableOrWriteNode < Node
1489
+ attr_reader name: Symbol
1490
+ attr_reader name_loc: Location
1491
+ attr_reader operator_loc: Location
1492
+ attr_reader value: Node
1493
+
1494
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
1495
+ def accept: (visitor: Visitor) -> void
1496
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1497
+ def child_nodes: () -> Array[Node?]
1498
+ def deconstruct: () -> Array[Node?]
1499
+
1500
+ def copy: (**untyped) -> GlobalVariableOrWriteNode
1501
+
1502
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1503
+
1504
+ def operator: () -> String
1505
+
1506
+ def inspect: (inspector: NodeInspector) -> String
1507
+ end
1508
+ # Represents referencing a global variable.
1509
+ #
1510
+ # $foo
1511
+ # ^^^^
1512
+ class GlobalVariableReadNode < Node
1513
+ attr_reader name: Symbol
1514
+
1515
+ def initialize: (name: Symbol, location: Location) -> void
1516
+ def accept: (visitor: Visitor) -> void
1517
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1518
+ def child_nodes: () -> Array[Node?]
1519
+ def deconstruct: () -> Array[Node?]
1520
+
1521
+ def copy: (**untyped) -> GlobalVariableReadNode
1522
+
1523
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1524
+
1525
+ def inspect: (inspector: NodeInspector) -> String
1526
+ end
1527
+ # Represents writing to a global variable in a context that doesn't have an explicit value.
1528
+ #
1529
+ # $foo, $bar = baz
1530
+ # ^^^^ ^^^^
1531
+ class GlobalVariableTargetNode < Node
1532
+ attr_reader name: Symbol
1533
+
1534
+ def initialize: (name: Symbol, location: Location) -> void
1535
+ def accept: (visitor: Visitor) -> void
1536
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1537
+ def child_nodes: () -> Array[Node?]
1538
+ def deconstruct: () -> Array[Node?]
1539
+
1540
+ def copy: (**untyped) -> GlobalVariableTargetNode
1541
+
1542
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1543
+
1544
+ def inspect: (inspector: NodeInspector) -> String
1545
+ end
1546
+ # Represents writing to a global variable.
1547
+ #
1548
+ # $foo = 1
1549
+ # ^^^^^^^^
1550
+ class GlobalVariableWriteNode < Node
1551
+ attr_reader name: Symbol
1552
+ attr_reader name_loc: Location
1553
+ attr_reader value: Node
1554
+ attr_reader operator_loc: Location
1555
+
1556
+ def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
1557
+ def accept: (visitor: Visitor) -> void
1558
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1559
+ def child_nodes: () -> Array[Node?]
1560
+ def deconstruct: () -> Array[Node?]
1561
+
1562
+ def copy: (**untyped) -> GlobalVariableWriteNode
1563
+
1564
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1565
+
1566
+ def operator: () -> String
1567
+
1568
+ def inspect: (inspector: NodeInspector) -> String
1569
+ end
1570
+ # Represents a hash literal.
1571
+ #
1572
+ # { a => b }
1573
+ # ^^^^^^^^^^
1574
+ class HashNode < Node
1575
+ attr_reader opening_loc: Location
1576
+ attr_reader elements: Array[Node]
1577
+ attr_reader closing_loc: Location
1578
+
1579
+ def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void
1580
+ def accept: (visitor: Visitor) -> void
1581
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1582
+ def child_nodes: () -> Array[Node?]
1583
+ def deconstruct: () -> Array[Node?]
1584
+
1585
+ def copy: (**untyped) -> HashNode
1586
+
1587
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1588
+
1589
+ def opening: () -> String
1590
+
1591
+ def closing: () -> String
1592
+
1593
+ def inspect: (inspector: NodeInspector) -> String
1594
+ end
1595
+ # Represents a hash pattern in pattern matching.
1596
+ #
1597
+ # foo => { a: 1, b: 2 }
1598
+ # ^^^^^^^^^^^^^^
1599
+ #
1600
+ # foo => { a: 1, b: 2, **c }
1601
+ # ^^^^^^^^^^^^^^^^^^^
1602
+ class HashPatternNode < Node
1603
+ attr_reader constant: Node?
1604
+ attr_reader elements: Array[Node]
1605
+ attr_reader rest: Node?
1606
+ attr_reader opening_loc: Location?
1607
+ attr_reader closing_loc: Location?
1608
+
1609
+ def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void
1610
+ def accept: (visitor: Visitor) -> void
1611
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1612
+ def child_nodes: () -> Array[Node?]
1613
+ def deconstruct: () -> Array[Node?]
1614
+
1615
+ def copy: (**untyped) -> HashPatternNode
1616
+
1617
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1618
+
1619
+ def opening: () -> String?
1620
+
1621
+ def closing: () -> String?
1622
+
1623
+ def inspect: (inspector: NodeInspector) -> String
1624
+ end
1625
+ # Represents the use of the `if` keyword, either in the block form or the modifier form.
1626
+ #
1627
+ # bar if foo
1628
+ # ^^^^^^^^^^
1629
+ #
1630
+ # if foo then bar end
1631
+ # ^^^^^^^^^^^^^^^^^^^
1632
+ class IfNode < Node
1633
+ attr_reader if_keyword_loc: Location?
1634
+ attr_reader predicate: Node
1635
+ attr_reader statements: StatementsNode?
1636
+ attr_reader consequent: Node?
1637
+ attr_reader end_keyword_loc: Location?
1638
+
1639
+ def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void
1640
+ def accept: (visitor: Visitor) -> void
1641
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1642
+ def child_nodes: () -> Array[Node?]
1643
+ def deconstruct: () -> Array[Node?]
1644
+
1645
+ def copy: (**untyped) -> IfNode
1646
+
1647
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1648
+
1649
+ def if_keyword: () -> String?
1650
+
1651
+ def end_keyword: () -> String?
1652
+
1653
+ def inspect: (inspector: NodeInspector) -> String
1654
+ end
1655
+ # Represents an imaginary number literal.
1656
+ #
1657
+ # 1.0i
1658
+ # ^^^^
1659
+ class ImaginaryNode < Node
1660
+ attr_reader numeric: Node
1661
+
1662
+ def initialize: (numeric: Node, location: Location) -> void
1663
+ def accept: (visitor: Visitor) -> void
1664
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1665
+ def child_nodes: () -> Array[Node?]
1666
+ def deconstruct: () -> Array[Node?]
1667
+
1668
+ def copy: (**untyped) -> ImaginaryNode
1669
+
1670
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1671
+
1672
+ def inspect: (inspector: NodeInspector) -> String
1673
+ end
1674
+ # Represents a node that is implicitly being added to the tree but doesn't
1675
+ # correspond directly to a node in the source.
1676
+ #
1677
+ # { foo: }
1678
+ # ^^^^
1679
+ #
1680
+ # { Foo: }
1681
+ # ^^^^
1682
+ class ImplicitNode < Node
1683
+ attr_reader value: Node
1684
+
1685
+ def initialize: (value: Node, location: Location) -> void
1686
+ def accept: (visitor: Visitor) -> void
1687
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1688
+ def child_nodes: () -> Array[Node?]
1689
+ def deconstruct: () -> Array[Node?]
1690
+
1691
+ def copy: (**untyped) -> ImplicitNode
1692
+
1693
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1694
+
1695
+ def inspect: (inspector: NodeInspector) -> String
1696
+ end
1697
+ # Represents the use of the `in` keyword in a case statement.
1698
+ #
1699
+ # case a; in b then c end
1700
+ # ^^^^^^^^^^^
1701
+ class InNode < Node
1702
+ attr_reader pattern: Node
1703
+ attr_reader statements: StatementsNode?
1704
+ attr_reader in_loc: Location
1705
+ attr_reader then_loc: Location?
1706
+
1707
+ def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void
1708
+ def accept: (visitor: Visitor) -> void
1709
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1710
+ def child_nodes: () -> Array[Node?]
1711
+ def deconstruct: () -> Array[Node?]
1712
+
1713
+ def copy: (**untyped) -> InNode
1714
+
1715
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1716
+
1717
+ def in: () -> String
1718
+
1719
+ def then: () -> String?
1720
+
1721
+ def inspect: (inspector: NodeInspector) -> String
1722
+ end
1723
+ # Represents the use of the `&&=` operator on a call to the `[]` method.
1724
+ #
1725
+ # foo.bar[baz] &&= value
1726
+ # ^^^^^^^^^^^^^^^^^^^^^^
1727
+ class IndexAndWriteNode < Node
1728
+ attr_reader receiver: Node?
1729
+ attr_reader call_operator_loc: Location?
1730
+ attr_reader opening_loc: Location
1731
+ attr_reader arguments: ArgumentsNode?
1732
+ attr_reader closing_loc: Location
1733
+ attr_reader block: Node?
1734
+ attr_reader flags: Integer
1735
+ attr_reader operator_loc: Location
1736
+ attr_reader value: Node
1737
+
1738
+ def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void
1739
+ def accept: (visitor: Visitor) -> void
1740
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1741
+ def child_nodes: () -> Array[Node?]
1742
+ def deconstruct: () -> Array[Node?]
1743
+
1744
+ def copy: (**untyped) -> IndexAndWriteNode
1745
+
1746
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1747
+
1748
+ def call_operator: () -> String?
1749
+
1750
+ def opening: () -> String
1751
+
1752
+ def closing: () -> String
1753
+
1754
+ def safe_navigation?: () -> bool
1755
+
1756
+ def variable_call?: () -> bool
1757
+
1758
+ def operator: () -> String
1759
+
1760
+ def inspect: (inspector: NodeInspector) -> String
1761
+ end
1762
+ # Represents the use of an assignment operator on a call to `[]`.
1763
+ #
1764
+ # foo.bar[baz] += value
1765
+ # ^^^^^^^^^^^^^^^^^^^^^
1766
+ class IndexOperatorWriteNode < Node
1767
+ attr_reader receiver: Node?
1768
+ attr_reader call_operator_loc: Location?
1769
+ attr_reader opening_loc: Location
1770
+ attr_reader arguments: ArgumentsNode?
1771
+ attr_reader closing_loc: Location
1772
+ attr_reader block: Node?
1773
+ attr_reader flags: Integer
1774
+ attr_reader operator: Symbol
1775
+ attr_reader operator_loc: Location
1776
+ attr_reader value: Node
1777
+
1778
+ def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
1779
+ def accept: (visitor: Visitor) -> void
1780
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1781
+ def child_nodes: () -> Array[Node?]
1782
+ def deconstruct: () -> Array[Node?]
1783
+
1784
+ def copy: (**untyped) -> IndexOperatorWriteNode
1785
+
1786
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1787
+
1788
+ def call_operator: () -> String?
1789
+
1790
+ def opening: () -> String
1791
+
1792
+ def closing: () -> String
1793
+
1794
+ def safe_navigation?: () -> bool
1795
+
1796
+ def variable_call?: () -> bool
1797
+
1798
+ def inspect: (inspector: NodeInspector) -> String
1799
+ end
1800
+ # Represents the use of the `||=` operator on a call to `[]`.
1801
+ #
1802
+ # foo.bar[baz] ||= value
1803
+ # ^^^^^^^^^^^^^^^^^^^^^^
1804
+ class IndexOrWriteNode < Node
1805
+ attr_reader receiver: Node?
1806
+ attr_reader call_operator_loc: Location?
1807
+ attr_reader opening_loc: Location
1808
+ attr_reader arguments: ArgumentsNode?
1809
+ attr_reader closing_loc: Location
1810
+ attr_reader block: Node?
1811
+ attr_reader flags: Integer
1812
+ attr_reader operator_loc: Location
1813
+ attr_reader value: Node
1814
+
1815
+ def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void
1816
+ def accept: (visitor: Visitor) -> void
1817
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1818
+ def child_nodes: () -> Array[Node?]
1819
+ def deconstruct: () -> Array[Node?]
1820
+
1821
+ def copy: (**untyped) -> IndexOrWriteNode
1822
+
1823
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1824
+
1825
+ def call_operator: () -> String?
1826
+
1827
+ def opening: () -> String
1828
+
1829
+ def closing: () -> String
1830
+
1831
+ def safe_navigation?: () -> bool
1832
+
1833
+ def variable_call?: () -> bool
1834
+
1835
+ def operator: () -> String
1836
+
1837
+ def inspect: (inspector: NodeInspector) -> String
1838
+ end
1839
+ # Represents the use of the `&&=` operator for assignment to an instance variable.
1840
+ #
1841
+ # @target &&= value
1842
+ # ^^^^^^^^^^^^^^^^^
1843
+ class InstanceVariableAndWriteNode < Node
1844
+ attr_reader name: Symbol
1845
+ attr_reader name_loc: Location
1846
+ attr_reader operator_loc: Location
1847
+ attr_reader value: Node
1848
+
1849
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
1850
+ def accept: (visitor: Visitor) -> void
1851
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1852
+ def child_nodes: () -> Array[Node?]
1853
+ def deconstruct: () -> Array[Node?]
1854
+
1855
+ def copy: (**untyped) -> InstanceVariableAndWriteNode
1856
+
1857
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1858
+
1859
+ def operator: () -> String
1860
+
1861
+ def inspect: (inspector: NodeInspector) -> String
1862
+ end
1863
+ # Represents assigning to an instance variable using an operator that isn't `=`.
1864
+ #
1865
+ # @target += value
1866
+ # ^^^^^^^^^^^^^^^^
1867
+ class InstanceVariableOperatorWriteNode < Node
1868
+ attr_reader name: Symbol
1869
+ attr_reader name_loc: Location
1870
+ attr_reader operator_loc: Location
1871
+ attr_reader value: Node
1872
+ attr_reader operator: Symbol
1873
+
1874
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
1875
+ def accept: (visitor: Visitor) -> void
1876
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1877
+ def child_nodes: () -> Array[Node?]
1878
+ def deconstruct: () -> Array[Node?]
1879
+
1880
+ def copy: (**untyped) -> InstanceVariableOperatorWriteNode
1881
+
1882
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1883
+
1884
+ def inspect: (inspector: NodeInspector) -> String
1885
+ end
1886
+ # Represents the use of the `||=` operator for assignment to an instance variable.
1887
+ #
1888
+ # @target ||= value
1889
+ # ^^^^^^^^^^^^^^^^^
1890
+ class InstanceVariableOrWriteNode < Node
1891
+ attr_reader name: Symbol
1892
+ attr_reader name_loc: Location
1893
+ attr_reader operator_loc: Location
1894
+ attr_reader value: Node
1895
+
1896
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
1897
+ def accept: (visitor: Visitor) -> void
1898
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1899
+ def child_nodes: () -> Array[Node?]
1900
+ def deconstruct: () -> Array[Node?]
1901
+
1902
+ def copy: (**untyped) -> InstanceVariableOrWriteNode
1903
+
1904
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1905
+
1906
+ def operator: () -> String
1907
+
1908
+ def inspect: (inspector: NodeInspector) -> String
1909
+ end
1910
+ # Represents referencing an instance variable.
1911
+ #
1912
+ # @foo
1913
+ # ^^^^
1914
+ class InstanceVariableReadNode < Node
1915
+ attr_reader name: Symbol
1916
+
1917
+ def initialize: (name: Symbol, location: Location) -> void
1918
+ def accept: (visitor: Visitor) -> void
1919
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1920
+ def child_nodes: () -> Array[Node?]
1921
+ def deconstruct: () -> Array[Node?]
1922
+
1923
+ def copy: (**untyped) -> InstanceVariableReadNode
1924
+
1925
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1926
+
1927
+ def inspect: (inspector: NodeInspector) -> String
1928
+ end
1929
+ # Represents writing to an instance variable in a context that doesn't have an explicit value.
1930
+ #
1931
+ # @foo, @bar = baz
1932
+ # ^^^^ ^^^^
1933
+ class InstanceVariableTargetNode < Node
1934
+ attr_reader name: Symbol
1935
+
1936
+ def initialize: (name: Symbol, location: Location) -> void
1937
+ def accept: (visitor: Visitor) -> void
1938
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1939
+ def child_nodes: () -> Array[Node?]
1940
+ def deconstruct: () -> Array[Node?]
1941
+
1942
+ def copy: (**untyped) -> InstanceVariableTargetNode
1943
+
1944
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1945
+
1946
+ def inspect: (inspector: NodeInspector) -> String
1947
+ end
1948
+ # Represents writing to an instance variable.
1949
+ #
1950
+ # @foo = 1
1951
+ # ^^^^^^^^
1952
+ class InstanceVariableWriteNode < Node
1953
+ attr_reader name: Symbol
1954
+ attr_reader name_loc: Location
1955
+ attr_reader value: Node
1956
+ attr_reader operator_loc: Location
1957
+
1958
+ def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
1959
+ def accept: (visitor: Visitor) -> void
1960
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1961
+ def child_nodes: () -> Array[Node?]
1962
+ def deconstruct: () -> Array[Node?]
1963
+
1964
+ def copy: (**untyped) -> InstanceVariableWriteNode
1965
+
1966
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1967
+
1968
+ def operator: () -> String
1969
+
1970
+ def inspect: (inspector: NodeInspector) -> String
1971
+ end
1972
+ # Represents an integer number literal.
1973
+ #
1974
+ # 1
1975
+ # ^
1976
+ class IntegerNode < Node
1977
+ attr_reader flags: Integer
1978
+
1979
+ def initialize: (flags: Integer, location: Location) -> void
1980
+ def accept: (visitor: Visitor) -> void
1981
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
1982
+ def child_nodes: () -> Array[Node?]
1983
+ def deconstruct: () -> Array[Node?]
1984
+
1985
+ def copy: (**untyped) -> IntegerNode
1986
+
1987
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
1988
+
1989
+ def binary?: () -> bool
1990
+
1991
+ def octal?: () -> bool
1992
+
1993
+ def decimal?: () -> bool
1994
+
1995
+ def hexadecimal?: () -> bool
1996
+
1997
+ def inspect: (inspector: NodeInspector) -> String
1998
+ end
1999
+ # Represents a regular expression literal that contains interpolation that
2000
+ # is being used in the predicate of a conditional to implicitly match
2001
+ # against the last line read by an IO object.
2002
+ #
2003
+ # if /foo #{bar} baz/ then end
2004
+ # ^^^^^^^^^^^^^^^^
2005
+ class InterpolatedMatchLastLineNode < Node
2006
+ attr_reader opening_loc: Location
2007
+ attr_reader parts: Array[Node]
2008
+ attr_reader closing_loc: Location
2009
+ attr_reader flags: Integer
2010
+
2011
+ def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void
2012
+ def accept: (visitor: Visitor) -> void
2013
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2014
+ def child_nodes: () -> Array[Node?]
2015
+ def deconstruct: () -> Array[Node?]
2016
+
2017
+ def copy: (**untyped) -> InterpolatedMatchLastLineNode
2018
+
2019
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2020
+
2021
+ def opening: () -> String
2022
+
2023
+ def closing: () -> String
2024
+
2025
+ def ignore_case?: () -> bool
2026
+
2027
+ def extended?: () -> bool
2028
+
2029
+ def multi_line?: () -> bool
2030
+
2031
+ def once?: () -> bool
2032
+
2033
+ def euc_jp?: () -> bool
2034
+
2035
+ def ascii_8bit?: () -> bool
2036
+
2037
+ def windows_31j?: () -> bool
2038
+
2039
+ def utf_8?: () -> bool
2040
+
2041
+ def inspect: (inspector: NodeInspector) -> String
2042
+ end
2043
+ # Represents a regular expression literal that contains interpolation.
2044
+ #
2045
+ # /foo #{bar} baz/
2046
+ # ^^^^^^^^^^^^^^^^
2047
+ class InterpolatedRegularExpressionNode < Node
2048
+ attr_reader opening_loc: Location
2049
+ attr_reader parts: Array[Node]
2050
+ attr_reader closing_loc: Location
2051
+ attr_reader flags: Integer
2052
+
2053
+ def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void
2054
+ def accept: (visitor: Visitor) -> void
2055
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2056
+ def child_nodes: () -> Array[Node?]
2057
+ def deconstruct: () -> Array[Node?]
2058
+
2059
+ def copy: (**untyped) -> InterpolatedRegularExpressionNode
2060
+
2061
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2062
+
2063
+ def opening: () -> String
2064
+
2065
+ def closing: () -> String
2066
+
2067
+ def ignore_case?: () -> bool
2068
+
2069
+ def extended?: () -> bool
2070
+
2071
+ def multi_line?: () -> bool
2072
+
2073
+ def once?: () -> bool
2074
+
2075
+ def euc_jp?: () -> bool
2076
+
2077
+ def ascii_8bit?: () -> bool
2078
+
2079
+ def windows_31j?: () -> bool
2080
+
2081
+ def utf_8?: () -> bool
2082
+
2083
+ def inspect: (inspector: NodeInspector) -> String
2084
+ end
2085
+ # Represents a string literal that contains interpolation.
2086
+ #
2087
+ # "foo #{bar} baz"
2088
+ # ^^^^^^^^^^^^^^^^
2089
+ class InterpolatedStringNode < Node
2090
+ attr_reader opening_loc: Location?
2091
+ attr_reader parts: Array[Node]
2092
+ attr_reader closing_loc: Location?
2093
+
2094
+ def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void
2095
+ def accept: (visitor: Visitor) -> void
2096
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2097
+ def child_nodes: () -> Array[Node?]
2098
+ def deconstruct: () -> Array[Node?]
2099
+
2100
+ def copy: (**untyped) -> InterpolatedStringNode
2101
+
2102
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2103
+
2104
+ def opening: () -> String?
2105
+
2106
+ def closing: () -> String?
2107
+
2108
+ def inspect: (inspector: NodeInspector) -> String
2109
+ end
2110
+ # Represents a symbol literal that contains interpolation.
2111
+ #
2112
+ # :"foo #{bar} baz"
2113
+ # ^^^^^^^^^^^^^^^^^
2114
+ class InterpolatedSymbolNode < Node
2115
+ attr_reader opening_loc: Location?
2116
+ attr_reader parts: Array[Node]
2117
+ attr_reader closing_loc: Location?
2118
+
2119
+ def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void
2120
+ def accept: (visitor: Visitor) -> void
2121
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2122
+ def child_nodes: () -> Array[Node?]
2123
+ def deconstruct: () -> Array[Node?]
2124
+
2125
+ def copy: (**untyped) -> InterpolatedSymbolNode
2126
+
2127
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2128
+
2129
+ def opening: () -> String?
2130
+
2131
+ def closing: () -> String?
2132
+
2133
+ def inspect: (inspector: NodeInspector) -> String
2134
+ end
2135
+ # Represents an xstring literal that contains interpolation.
2136
+ #
2137
+ # `foo #{bar} baz`
2138
+ # ^^^^^^^^^^^^^^^^
2139
+ class InterpolatedXStringNode < Node
2140
+ attr_reader opening_loc: Location
2141
+ attr_reader parts: Array[Node]
2142
+ attr_reader closing_loc: Location
2143
+
2144
+ def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
2145
+ def accept: (visitor: Visitor) -> void
2146
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2147
+ def child_nodes: () -> Array[Node?]
2148
+ def deconstruct: () -> Array[Node?]
2149
+
2150
+ def copy: (**untyped) -> InterpolatedXStringNode
2151
+
2152
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2153
+
2154
+ def opening: () -> String
2155
+
2156
+ def closing: () -> String
2157
+
2158
+ def inspect: (inspector: NodeInspector) -> String
2159
+ end
2160
+ # Represents a hash literal without opening and closing braces.
2161
+ #
2162
+ # foo(a: b)
2163
+ # ^^^^
2164
+ class KeywordHashNode < Node
2165
+ attr_reader elements: Array[Node]
2166
+
2167
+ def initialize: (elements: Array[Node], location: Location) -> void
2168
+ def accept: (visitor: Visitor) -> void
2169
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2170
+ def child_nodes: () -> Array[Node?]
2171
+ def deconstruct: () -> Array[Node?]
2172
+
2173
+ def copy: (**untyped) -> KeywordHashNode
2174
+
2175
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2176
+
2177
+ def inspect: (inspector: NodeInspector) -> String
2178
+ end
2179
+ # Represents a keyword parameter to a method, block, or lambda definition.
2180
+ #
2181
+ # def a(b:)
2182
+ # ^^
2183
+ # end
2184
+ #
2185
+ # def a(b: 1)
2186
+ # ^^^^
2187
+ # end
2188
+ class KeywordParameterNode < Node
2189
+ attr_reader name: Symbol
2190
+ attr_reader name_loc: Location
2191
+ attr_reader value: Node?
2192
+
2193
+ def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void
2194
+ def accept: (visitor: Visitor) -> void
2195
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2196
+ def child_nodes: () -> Array[Node?]
2197
+ def deconstruct: () -> Array[Node?]
2198
+
2199
+ def copy: (**untyped) -> KeywordParameterNode
2200
+
2201
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2202
+
2203
+ def inspect: (inspector: NodeInspector) -> String
2204
+ end
2205
+ # Represents a keyword rest parameter to a method, block, or lambda definition.
2206
+ #
2207
+ # def a(**b)
2208
+ # ^^^
2209
+ # end
2210
+ class KeywordRestParameterNode < Node
2211
+ attr_reader name: Symbol?
2212
+ attr_reader name_loc: Location?
2213
+ attr_reader operator_loc: Location
2214
+
2215
+ def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
2216
+ def accept: (visitor: Visitor) -> void
2217
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2218
+ def child_nodes: () -> Array[Node?]
2219
+ def deconstruct: () -> Array[Node?]
2220
+
2221
+ def copy: (**untyped) -> KeywordRestParameterNode
2222
+
2223
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2224
+
2225
+ def operator: () -> String
2226
+
2227
+ def inspect: (inspector: NodeInspector) -> String
2228
+ end
2229
+ # Represents using a lambda literal (not the lambda method call).
2230
+ #
2231
+ # ->(value) { value * 2 }
2232
+ # ^^^^^^^^^^^^^^^^^^^^^^^
2233
+ class LambdaNode < Node
2234
+ attr_reader locals: Array[Symbol]
2235
+ attr_reader operator_loc: Location
2236
+ attr_reader opening_loc: Location
2237
+ attr_reader closing_loc: Location
2238
+ attr_reader parameters: BlockParametersNode?
2239
+ attr_reader body: Node?
2240
+
2241
+ def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void
2242
+ def accept: (visitor: Visitor) -> void
2243
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2244
+ def child_nodes: () -> Array[Node?]
2245
+ def deconstruct: () -> Array[Node?]
2246
+
2247
+ def copy: (**untyped) -> LambdaNode
2248
+
2249
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2250
+
2251
+ def operator: () -> String
2252
+
2253
+ def opening: () -> String
2254
+
2255
+ def closing: () -> String
2256
+
2257
+ def inspect: (inspector: NodeInspector) -> String
2258
+ end
2259
+ # Represents the use of the `&&=` operator for assignment to a local variable.
2260
+ #
2261
+ # target &&= value
2262
+ # ^^^^^^^^^^^^^^^^
2263
+ class LocalVariableAndWriteNode < Node
2264
+ attr_reader name_loc: Location
2265
+ attr_reader operator_loc: Location
2266
+ attr_reader value: Node
2267
+ attr_reader name: Symbol
2268
+ attr_reader depth: Integer
2269
+
2270
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
2271
+ def accept: (visitor: Visitor) -> void
2272
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2273
+ def child_nodes: () -> Array[Node?]
2274
+ def deconstruct: () -> Array[Node?]
2275
+
2276
+ def copy: (**untyped) -> LocalVariableAndWriteNode
2277
+
2278
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2279
+
2280
+ def operator: () -> String
2281
+
2282
+ def inspect: (inspector: NodeInspector) -> String
2283
+ end
2284
+ # Represents assigning to a local variable using an operator that isn't `=`.
2285
+ #
2286
+ # target += value
2287
+ # ^^^^^^^^^^^^^^^
2288
+ class LocalVariableOperatorWriteNode < Node
2289
+ attr_reader name_loc: Location
2290
+ attr_reader operator_loc: Location
2291
+ attr_reader value: Node
2292
+ attr_reader name: Symbol
2293
+ attr_reader operator: Symbol
2294
+ attr_reader depth: Integer
2295
+
2296
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void
2297
+ def accept: (visitor: Visitor) -> void
2298
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2299
+ def child_nodes: () -> Array[Node?]
2300
+ def deconstruct: () -> Array[Node?]
2301
+
2302
+ def copy: (**untyped) -> LocalVariableOperatorWriteNode
2303
+
2304
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2305
+
2306
+ def inspect: (inspector: NodeInspector) -> String
2307
+ end
2308
+ # Represents the use of the `||=` operator for assignment to a local variable.
2309
+ #
2310
+ # target ||= value
2311
+ # ^^^^^^^^^^^^^^^^
2312
+ class LocalVariableOrWriteNode < Node
2313
+ attr_reader name_loc: Location
2314
+ attr_reader operator_loc: Location
2315
+ attr_reader value: Node
2316
+ attr_reader name: Symbol
2317
+ attr_reader depth: Integer
2318
+
2319
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
2320
+ def accept: (visitor: Visitor) -> void
2321
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2322
+ def child_nodes: () -> Array[Node?]
2323
+ def deconstruct: () -> Array[Node?]
2324
+
2325
+ def copy: (**untyped) -> LocalVariableOrWriteNode
2326
+
2327
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2328
+
2329
+ def operator: () -> String
2330
+
2331
+ def inspect: (inspector: NodeInspector) -> String
2332
+ end
2333
+ # Represents reading a local variable. Note that this requires that a local
2334
+ # variable of the same name has already been written to in the same scope,
2335
+ # otherwise it is parsed as a method call.
2336
+ #
2337
+ # foo
2338
+ # ^^^
2339
+ class LocalVariableReadNode < Node
2340
+ attr_reader name: Symbol
2341
+ attr_reader depth: Integer
2342
+
2343
+ def initialize: (name: Symbol, depth: Integer, location: Location) -> void
2344
+ def accept: (visitor: Visitor) -> void
2345
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2346
+ def child_nodes: () -> Array[Node?]
2347
+ def deconstruct: () -> Array[Node?]
2348
+
2349
+ def copy: (**untyped) -> LocalVariableReadNode
2350
+
2351
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2352
+
2353
+ def inspect: (inspector: NodeInspector) -> String
2354
+ end
2355
+ # Represents writing to a local variable in a context that doesn't have an explicit value.
2356
+ #
2357
+ # foo, bar = baz
2358
+ # ^^^ ^^^
2359
+ class LocalVariableTargetNode < Node
2360
+ attr_reader name: Symbol
2361
+ attr_reader depth: Integer
2362
+
2363
+ def initialize: (name: Symbol, depth: Integer, location: Location) -> void
2364
+ def accept: (visitor: Visitor) -> void
2365
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2366
+ def child_nodes: () -> Array[Node?]
2367
+ def deconstruct: () -> Array[Node?]
2368
+
2369
+ def copy: (**untyped) -> LocalVariableTargetNode
2370
+
2371
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2372
+
2373
+ def inspect: (inspector: NodeInspector) -> String
2374
+ end
2375
+ # Represents writing to a local variable.
2376
+ #
2377
+ # foo = 1
2378
+ # ^^^^^^^
2379
+ class LocalVariableWriteNode < Node
2380
+ attr_reader name: Symbol
2381
+ attr_reader depth: Integer
2382
+ attr_reader name_loc: Location
2383
+ attr_reader value: Node
2384
+ attr_reader operator_loc: Location
2385
+
2386
+ def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
2387
+ def accept: (visitor: Visitor) -> void
2388
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2389
+ def child_nodes: () -> Array[Node?]
2390
+ def deconstruct: () -> Array[Node?]
2391
+
2392
+ def copy: (**untyped) -> LocalVariableWriteNode
2393
+
2394
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2395
+
2396
+ def operator: () -> String
2397
+
2398
+ def inspect: (inspector: NodeInspector) -> String
2399
+ end
2400
+ # Represents a regular expression literal used in the predicate of a
2401
+ # conditional to implicitly match against the last line read by an IO
2402
+ # object.
2403
+ #
2404
+ # if /foo/i then end
2405
+ # ^^^^^^
2406
+ class MatchLastLineNode < Node
2407
+ attr_reader opening_loc: Location
2408
+ attr_reader content_loc: Location
2409
+ attr_reader closing_loc: Location
2410
+ attr_reader unescaped: String
2411
+ attr_reader flags: Integer
2412
+
2413
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
2414
+ def accept: (visitor: Visitor) -> void
2415
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2416
+ def child_nodes: () -> Array[Node?]
2417
+ def deconstruct: () -> Array[Node?]
2418
+
2419
+ def copy: (**untyped) -> MatchLastLineNode
2420
+
2421
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2422
+
2423
+ def opening: () -> String
2424
+
2425
+ def content: () -> String
2426
+
2427
+ def closing: () -> String
2428
+
2429
+ def ignore_case?: () -> bool
2430
+
2431
+ def extended?: () -> bool
2432
+
2433
+ def multi_line?: () -> bool
2434
+
2435
+ def once?: () -> bool
2436
+
2437
+ def euc_jp?: () -> bool
2438
+
2439
+ def ascii_8bit?: () -> bool
2440
+
2441
+ def windows_31j?: () -> bool
2442
+
2443
+ def utf_8?: () -> bool
2444
+
2445
+ def inspect: (inspector: NodeInspector) -> String
2446
+ end
2447
+ # Represents the use of the modifier `in` operator.
2448
+ #
2449
+ # foo in bar
2450
+ # ^^^^^^^^^^
2451
+ class MatchPredicateNode < Node
2452
+ attr_reader value: Node
2453
+ attr_reader pattern: Node
2454
+ attr_reader operator_loc: Location
2455
+
2456
+ def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
2457
+ def accept: (visitor: Visitor) -> void
2458
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2459
+ def child_nodes: () -> Array[Node?]
2460
+ def deconstruct: () -> Array[Node?]
2461
+
2462
+ def copy: (**untyped) -> MatchPredicateNode
2463
+
2464
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2465
+
2466
+ def operator: () -> String
2467
+
2468
+ def inspect: (inspector: NodeInspector) -> String
2469
+ end
2470
+ # Represents the use of the `=>` operator.
2471
+ #
2472
+ # foo => bar
2473
+ # ^^^^^^^^^^
2474
+ class MatchRequiredNode < Node
2475
+ attr_reader value: Node
2476
+ attr_reader pattern: Node
2477
+ attr_reader operator_loc: Location
2478
+
2479
+ def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
2480
+ def accept: (visitor: Visitor) -> void
2481
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2482
+ def child_nodes: () -> Array[Node?]
2483
+ def deconstruct: () -> Array[Node?]
2484
+
2485
+ def copy: (**untyped) -> MatchRequiredNode
2486
+
2487
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2488
+
2489
+ def operator: () -> String
2490
+
2491
+ def inspect: (inspector: NodeInspector) -> String
2492
+ end
2493
+ # Represents writing local variables using a regular expression match with
2494
+ # named capture groups.
2495
+ #
2496
+ # /(?<foo>bar)/ =~ baz
2497
+ # ^^^^^^^^^^^^^^^^^^^^
2498
+ class MatchWriteNode < Node
2499
+ attr_reader call: CallNode
2500
+ attr_reader locals: Array[Symbol]
2501
+
2502
+ def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void
2503
+ def accept: (visitor: Visitor) -> void
2504
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2505
+ def child_nodes: () -> Array[Node?]
2506
+ def deconstruct: () -> Array[Node?]
2507
+
2508
+ def copy: (**untyped) -> MatchWriteNode
2509
+
2510
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2511
+
2512
+ def inspect: (inspector: NodeInspector) -> String
2513
+ end
2514
+ # Represents a node that is missing from the source and results in a syntax
2515
+ # error.
2516
+ class MissingNode < Node
2517
+
2518
+ def initialize: (location: Location) -> void
2519
+ def accept: (visitor: Visitor) -> void
2520
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2521
+ def child_nodes: () -> Array[Node?]
2522
+ def deconstruct: () -> Array[Node?]
2523
+
2524
+ def copy: (**untyped) -> MissingNode
2525
+
2526
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2527
+
2528
+ def inspect: (inspector: NodeInspector) -> String
2529
+ end
2530
+ # Represents a module declaration involving the `module` keyword.
2531
+ #
2532
+ # module Foo end
2533
+ # ^^^^^^^^^^^^^^
2534
+ class ModuleNode < Node
2535
+ attr_reader locals: Array[Symbol]
2536
+ attr_reader module_keyword_loc: Location
2537
+ attr_reader constant_path: Node
2538
+ attr_reader body: Node?
2539
+ attr_reader end_keyword_loc: Location
2540
+ attr_reader name: Symbol
2541
+
2542
+ def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void
2543
+ def accept: (visitor: Visitor) -> void
2544
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2545
+ def child_nodes: () -> Array[Node?]
2546
+ def deconstruct: () -> Array[Node?]
2547
+
2548
+ def copy: (**untyped) -> ModuleNode
2549
+
2550
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2551
+
2552
+ def module_keyword: () -> String
2553
+
2554
+ def end_keyword: () -> String
2555
+
2556
+ def inspect: (inspector: NodeInspector) -> String
2557
+ end
2558
+ # Represents a multi-target expression.
2559
+ #
2560
+ # a, (b, c) = 1, 2, 3
2561
+ # ^^^^^^
2562
+ class MultiTargetNode < Node
2563
+ attr_reader lefts: Array[Node]
2564
+ attr_reader rest: Node?
2565
+ attr_reader rights: Array[Node]
2566
+ attr_reader lparen_loc: Location?
2567
+ attr_reader rparen_loc: Location?
2568
+
2569
+ def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void
2570
+ def accept: (visitor: Visitor) -> void
2571
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2572
+ def child_nodes: () -> Array[Node?]
2573
+ def deconstruct: () -> Array[Node?]
2574
+
2575
+ def copy: (**untyped) -> MultiTargetNode
2576
+
2577
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2578
+
2579
+ def lparen: () -> String?
2580
+
2581
+ def rparen: () -> String?
2582
+
2583
+ def inspect: (inspector: NodeInspector) -> String
2584
+ end
2585
+ # Represents a write to a multi-target expression.
2586
+ #
2587
+ # a, b, c = 1, 2, 3
2588
+ # ^^^^^^^^^^^^^^^^^
2589
+ class MultiWriteNode < Node
2590
+ attr_reader lefts: Array[Node]
2591
+ attr_reader rest: Node?
2592
+ attr_reader rights: Array[Node]
2593
+ attr_reader lparen_loc: Location?
2594
+ attr_reader rparen_loc: Location?
2595
+ attr_reader operator_loc: Location
2596
+ attr_reader value: Node
2597
+
2598
+ def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void
2599
+ def accept: (visitor: Visitor) -> void
2600
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2601
+ def child_nodes: () -> Array[Node?]
2602
+ def deconstruct: () -> Array[Node?]
2603
+
2604
+ def copy: (**untyped) -> MultiWriteNode
2605
+
2606
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2607
+
2608
+ def lparen: () -> String?
2609
+
2610
+ def rparen: () -> String?
2611
+
2612
+ def operator: () -> String
2613
+
2614
+ def inspect: (inspector: NodeInspector) -> String
2615
+ end
2616
+ # Represents the use of the `next` keyword.
2617
+ #
2618
+ # next 1
2619
+ # ^^^^^^
2620
+ class NextNode < Node
2621
+ attr_reader arguments: ArgumentsNode?
2622
+ attr_reader keyword_loc: Location
2623
+
2624
+ def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void
2625
+ def accept: (visitor: Visitor) -> void
2626
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2627
+ def child_nodes: () -> Array[Node?]
2628
+ def deconstruct: () -> Array[Node?]
2629
+
2630
+ def copy: (**untyped) -> NextNode
2631
+
2632
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2633
+
2634
+ def keyword: () -> String
2635
+
2636
+ def inspect: (inspector: NodeInspector) -> String
2637
+ end
2638
+ # Represents the use of the `nil` keyword.
2639
+ #
2640
+ # nil
2641
+ # ^^^
2642
+ class NilNode < Node
2643
+
2644
+ def initialize: (location: Location) -> void
2645
+ def accept: (visitor: Visitor) -> void
2646
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2647
+ def child_nodes: () -> Array[Node?]
2648
+ def deconstruct: () -> Array[Node?]
2649
+
2650
+ def copy: (**untyped) -> NilNode
2651
+
2652
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2653
+
2654
+ def inspect: (inspector: NodeInspector) -> String
2655
+ end
2656
+ # Represents the use of `**nil` inside method arguments.
2657
+ #
2658
+ # def a(**nil)
2659
+ # ^^^^^
2660
+ # end
2661
+ class NoKeywordsParameterNode < Node
2662
+ attr_reader operator_loc: Location
2663
+ attr_reader keyword_loc: Location
2664
+
2665
+ def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void
2666
+ def accept: (visitor: Visitor) -> void
2667
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2668
+ def child_nodes: () -> Array[Node?]
2669
+ def deconstruct: () -> Array[Node?]
2670
+
2671
+ def copy: (**untyped) -> NoKeywordsParameterNode
2672
+
2673
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2674
+
2675
+ def operator: () -> String
2676
+
2677
+ def keyword: () -> String
2678
+
2679
+ def inspect: (inspector: NodeInspector) -> String
2680
+ end
2681
+ # Represents reading a numbered reference to a capture in the previous match.
2682
+ #
2683
+ # $1
2684
+ # ^^
2685
+ class NumberedReferenceReadNode < Node
2686
+ attr_reader number: Integer
2687
+
2688
+ def initialize: (number: Integer, location: Location) -> void
2689
+ def accept: (visitor: Visitor) -> void
2690
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2691
+ def child_nodes: () -> Array[Node?]
2692
+ def deconstruct: () -> Array[Node?]
2693
+
2694
+ def copy: (**untyped) -> NumberedReferenceReadNode
2695
+
2696
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2697
+
2698
+ def inspect: (inspector: NodeInspector) -> String
2699
+ end
2700
+ # Represents an optional parameter to a method, block, or lambda definition.
2701
+ #
2702
+ # def a(b = 1)
2703
+ # ^^^^^
2704
+ # end
2705
+ class OptionalParameterNode < Node
2706
+ attr_reader name: Symbol
2707
+ attr_reader name_loc: Location
2708
+ attr_reader operator_loc: Location
2709
+ attr_reader value: Node
2710
+
2711
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
2712
+ def accept: (visitor: Visitor) -> void
2713
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2714
+ def child_nodes: () -> Array[Node?]
2715
+ def deconstruct: () -> Array[Node?]
2716
+
2717
+ def copy: (**untyped) -> OptionalParameterNode
2718
+
2719
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2720
+
2721
+ def operator: () -> String
2722
+
2723
+ def inspect: (inspector: NodeInspector) -> String
2724
+ end
2725
+ # Represents the use of the `||` operator or the `or` keyword.
2726
+ #
2727
+ # left or right
2728
+ # ^^^^^^^^^^^^^
2729
+ class OrNode < Node
2730
+ attr_reader left: Node
2731
+ attr_reader right: Node
2732
+ attr_reader operator_loc: Location
2733
+
2734
+ def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
2735
+ def accept: (visitor: Visitor) -> void
2736
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2737
+ def child_nodes: () -> Array[Node?]
2738
+ def deconstruct: () -> Array[Node?]
2739
+
2740
+ def copy: (**untyped) -> OrNode
2741
+
2742
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2743
+
2744
+ def operator: () -> String
2745
+
2746
+ def inspect: (inspector: NodeInspector) -> String
2747
+ end
2748
+ # Represents the list of parameters on a method, block, or lambda definition.
2749
+ #
2750
+ # def a(b, c, d)
2751
+ # ^^^^^^^
2752
+ # end
2753
+ class ParametersNode < Node
2754
+ attr_reader requireds: Array[Node]
2755
+ attr_reader optionals: Array[Node]
2756
+ attr_reader rest: RestParameterNode?
2757
+ attr_reader posts: Array[Node]
2758
+ attr_reader keywords: Array[Node]
2759
+ attr_reader keyword_rest: Node?
2760
+ attr_reader block: BlockParameterNode?
2761
+
2762
+ def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
2763
+ def accept: (visitor: Visitor) -> void
2764
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2765
+ def child_nodes: () -> Array[Node?]
2766
+ def deconstruct: () -> Array[Node?]
2767
+
2768
+ def copy: (**untyped) -> ParametersNode
2769
+
2770
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2771
+
2772
+ def inspect: (inspector: NodeInspector) -> String
2773
+ end
2774
+ # Represents a parenthesized expression
2775
+ #
2776
+ # (10 + 34)
2777
+ # ^^^^^^^^^
2778
+ class ParenthesesNode < Node
2779
+ attr_reader body: Node?
2780
+ attr_reader opening_loc: Location
2781
+ attr_reader closing_loc: Location
2782
+
2783
+ def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
2784
+ def accept: (visitor: Visitor) -> void
2785
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2786
+ def child_nodes: () -> Array[Node?]
2787
+ def deconstruct: () -> Array[Node?]
2788
+
2789
+ def copy: (**untyped) -> ParenthesesNode
2790
+
2791
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2792
+
2793
+ def opening: () -> String
2794
+
2795
+ def closing: () -> String
2796
+
2797
+ def inspect: (inspector: NodeInspector) -> String
2798
+ end
2799
+ # Represents the use of the `^` operator for pinning an expression in a
2800
+ # pattern matching expression.
2801
+ #
2802
+ # foo in ^(bar)
2803
+ # ^^^^^^
2804
+ class PinnedExpressionNode < Node
2805
+ attr_reader expression: Node
2806
+ attr_reader operator_loc: Location
2807
+ attr_reader lparen_loc: Location
2808
+ attr_reader rparen_loc: Location
2809
+
2810
+ def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void
2811
+ def accept: (visitor: Visitor) -> void
2812
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2813
+ def child_nodes: () -> Array[Node?]
2814
+ def deconstruct: () -> Array[Node?]
2815
+
2816
+ def copy: (**untyped) -> PinnedExpressionNode
2817
+
2818
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2819
+
2820
+ def operator: () -> String
2821
+
2822
+ def lparen: () -> String
2823
+
2824
+ def rparen: () -> String
2825
+
2826
+ def inspect: (inspector: NodeInspector) -> String
2827
+ end
2828
+ # Represents the use of the `^` operator for pinning a variable in a pattern
2829
+ # matching expression.
2830
+ #
2831
+ # foo in ^bar
2832
+ # ^^^^
2833
+ class PinnedVariableNode < Node
2834
+ attr_reader variable: Node
2835
+ attr_reader operator_loc: Location
2836
+
2837
+ def initialize: (variable: Node, operator_loc: Location, location: Location) -> void
2838
+ def accept: (visitor: Visitor) -> void
2839
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2840
+ def child_nodes: () -> Array[Node?]
2841
+ def deconstruct: () -> Array[Node?]
2842
+
2843
+ def copy: (**untyped) -> PinnedVariableNode
2844
+
2845
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2846
+
2847
+ def operator: () -> String
2848
+
2849
+ def inspect: (inspector: NodeInspector) -> String
2850
+ end
2851
+ # Represents the use of the `END` keyword.
2852
+ #
2853
+ # END { foo }
2854
+ # ^^^^^^^^^^^
2855
+ class PostExecutionNode < Node
2856
+ attr_reader statements: StatementsNode?
2857
+ attr_reader keyword_loc: Location
2858
+ attr_reader opening_loc: Location
2859
+ attr_reader closing_loc: Location
2860
+
2861
+ def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
2862
+ def accept: (visitor: Visitor) -> void
2863
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2864
+ def child_nodes: () -> Array[Node?]
2865
+ def deconstruct: () -> Array[Node?]
2866
+
2867
+ def copy: (**untyped) -> PostExecutionNode
2868
+
2869
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2870
+
2871
+ def keyword: () -> String
2872
+
2873
+ def opening: () -> String
2874
+
2875
+ def closing: () -> String
2876
+
2877
+ def inspect: (inspector: NodeInspector) -> String
2878
+ end
2879
+ # Represents the use of the `BEGIN` keyword.
2880
+ #
2881
+ # BEGIN { foo }
2882
+ # ^^^^^^^^^^^^^
2883
+ class PreExecutionNode < Node
2884
+ attr_reader statements: StatementsNode?
2885
+ attr_reader keyword_loc: Location
2886
+ attr_reader opening_loc: Location
2887
+ attr_reader closing_loc: Location
2888
+
2889
+ def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
2890
+ def accept: (visitor: Visitor) -> void
2891
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2892
+ def child_nodes: () -> Array[Node?]
2893
+ def deconstruct: () -> Array[Node?]
2894
+
2895
+ def copy: (**untyped) -> PreExecutionNode
2896
+
2897
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2898
+
2899
+ def keyword: () -> String
2900
+
2901
+ def opening: () -> String
2902
+
2903
+ def closing: () -> String
2904
+
2905
+ def inspect: (inspector: NodeInspector) -> String
2906
+ end
2907
+ # The top level node of any parse tree.
2908
+ class ProgramNode < Node
2909
+ attr_reader locals: Array[Symbol]
2910
+ attr_reader statements: StatementsNode
2911
+
2912
+ def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void
2913
+ def accept: (visitor: Visitor) -> void
2914
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2915
+ def child_nodes: () -> Array[Node?]
2916
+ def deconstruct: () -> Array[Node?]
2917
+
2918
+ def copy: (**untyped) -> ProgramNode
2919
+
2920
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2921
+
2922
+ def inspect: (inspector: NodeInspector) -> String
2923
+ end
2924
+ # Represents the use of the `..` or `...` operators.
2925
+ #
2926
+ # 1..2
2927
+ # ^^^^
2928
+ #
2929
+ # c if a =~ /left/ ... b =~ /right/
2930
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2931
+ class RangeNode < Node
2932
+ attr_reader left: Node?
2933
+ attr_reader right: Node?
2934
+ attr_reader operator_loc: Location
2935
+ attr_reader flags: Integer
2936
+
2937
+ def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
2938
+ def accept: (visitor: Visitor) -> void
2939
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2940
+ def child_nodes: () -> Array[Node?]
2941
+ def deconstruct: () -> Array[Node?]
2942
+
2943
+ def copy: (**untyped) -> RangeNode
2944
+
2945
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2946
+
2947
+ def operator: () -> String
2948
+
2949
+ def exclude_end?: () -> bool
2950
+
2951
+ def inspect: (inspector: NodeInspector) -> String
2952
+ end
2953
+ # Represents a rational number literal.
2954
+ #
2955
+ # 1.0r
2956
+ # ^^^^
2957
+ class RationalNode < Node
2958
+ attr_reader numeric: Node
2959
+
2960
+ def initialize: (numeric: Node, location: Location) -> void
2961
+ def accept: (visitor: Visitor) -> void
2962
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2963
+ def child_nodes: () -> Array[Node?]
2964
+ def deconstruct: () -> Array[Node?]
2965
+
2966
+ def copy: (**untyped) -> RationalNode
2967
+
2968
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2969
+
2970
+ def inspect: (inspector: NodeInspector) -> String
2971
+ end
2972
+ # Represents the use of the `redo` keyword.
2973
+ #
2974
+ # redo
2975
+ # ^^^^
2976
+ class RedoNode < Node
2977
+
2978
+ def initialize: (location: Location) -> void
2979
+ def accept: (visitor: Visitor) -> void
2980
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2981
+ def child_nodes: () -> Array[Node?]
2982
+ def deconstruct: () -> Array[Node?]
2983
+
2984
+ def copy: (**untyped) -> RedoNode
2985
+
2986
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2987
+
2988
+ def inspect: (inspector: NodeInspector) -> String
2989
+ end
2990
+ # Represents a regular expression literal with no interpolation.
2991
+ #
2992
+ # /foo/i
2993
+ # ^^^^^^
2994
+ class RegularExpressionNode < Node
2995
+ attr_reader opening_loc: Location
2996
+ attr_reader content_loc: Location
2997
+ attr_reader closing_loc: Location
2998
+ attr_reader unescaped: String
2999
+ attr_reader flags: Integer
3000
+
3001
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
3002
+ def accept: (visitor: Visitor) -> void
3003
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3004
+ def child_nodes: () -> Array[Node?]
3005
+ def deconstruct: () -> Array[Node?]
3006
+
3007
+ def copy: (**untyped) -> RegularExpressionNode
3008
+
3009
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3010
+
3011
+ def opening: () -> String
3012
+
3013
+ def content: () -> String
3014
+
3015
+ def closing: () -> String
3016
+
3017
+ def ignore_case?: () -> bool
3018
+
3019
+ def extended?: () -> bool
3020
+
3021
+ def multi_line?: () -> bool
3022
+
3023
+ def once?: () -> bool
3024
+
3025
+ def euc_jp?: () -> bool
3026
+
3027
+ def ascii_8bit?: () -> bool
3028
+
3029
+ def windows_31j?: () -> bool
3030
+
3031
+ def utf_8?: () -> bool
3032
+
3033
+ def inspect: (inspector: NodeInspector) -> String
3034
+ end
3035
+ # Represents a required parameter to a method, block, or lambda definition.
3036
+ #
3037
+ # def a(b)
3038
+ # ^
3039
+ # end
3040
+ class RequiredParameterNode < Node
3041
+ attr_reader name: Symbol
3042
+
3043
+ def initialize: (name: Symbol, location: Location) -> void
3044
+ def accept: (visitor: Visitor) -> void
3045
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3046
+ def child_nodes: () -> Array[Node?]
3047
+ def deconstruct: () -> Array[Node?]
3048
+
3049
+ def copy: (**untyped) -> RequiredParameterNode
3050
+
3051
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3052
+
3053
+ def inspect: (inspector: NodeInspector) -> String
3054
+ end
3055
+ # Represents an expression modified with a rescue.
3056
+ #
3057
+ # foo rescue nil
3058
+ # ^^^^^^^^^^^^^^
3059
+ class RescueModifierNode < Node
3060
+ attr_reader expression: Node
3061
+ attr_reader keyword_loc: Location
3062
+ attr_reader rescue_expression: Node
3063
+
3064
+ def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void
3065
+ def accept: (visitor: Visitor) -> void
3066
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3067
+ def child_nodes: () -> Array[Node?]
3068
+ def deconstruct: () -> Array[Node?]
3069
+
3070
+ def copy: (**untyped) -> RescueModifierNode
3071
+
3072
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3073
+
3074
+ def keyword: () -> String
3075
+
3076
+ def inspect: (inspector: NodeInspector) -> String
3077
+ end
3078
+ # Represents a rescue statement.
3079
+ #
3080
+ # begin
3081
+ # rescue Foo, *splat, Bar => ex
3082
+ # ^^^^^^
3083
+ # foo
3084
+ # end
3085
+ #
3086
+ # `Foo, *splat, Bar` are in the `exceptions` field.
3087
+ # `ex` is in the `exception` field.
3088
+ class RescueNode < Node
3089
+ attr_reader keyword_loc: Location
3090
+ attr_reader exceptions: Array[Node]
3091
+ attr_reader operator_loc: Location?
3092
+ attr_reader reference: Node?
3093
+ attr_reader statements: StatementsNode?
3094
+ attr_reader consequent: RescueNode?
3095
+
3096
+ def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void
3097
+ def accept: (visitor: Visitor) -> void
3098
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3099
+ def child_nodes: () -> Array[Node?]
3100
+ def deconstruct: () -> Array[Node?]
3101
+
3102
+ def copy: (**untyped) -> RescueNode
3103
+
3104
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3105
+
3106
+ def keyword: () -> String
3107
+
3108
+ def operator: () -> String?
3109
+
3110
+ def inspect: (inspector: NodeInspector) -> String
3111
+ end
3112
+ # Represents a rest parameter to a method, block, or lambda definition.
3113
+ #
3114
+ # def a(*b)
3115
+ # ^^
3116
+ # end
3117
+ class RestParameterNode < Node
3118
+ attr_reader name: Symbol?
3119
+ attr_reader name_loc: Location?
3120
+ attr_reader operator_loc: Location
3121
+
3122
+ def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
3123
+ def accept: (visitor: Visitor) -> void
3124
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3125
+ def child_nodes: () -> Array[Node?]
3126
+ def deconstruct: () -> Array[Node?]
3127
+
3128
+ def copy: (**untyped) -> RestParameterNode
3129
+
3130
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3131
+
3132
+ def operator: () -> String
3133
+
3134
+ def inspect: (inspector: NodeInspector) -> String
3135
+ end
3136
+ # Represents the use of the `retry` keyword.
3137
+ #
3138
+ # retry
3139
+ # ^^^^^
3140
+ class RetryNode < Node
3141
+
3142
+ def initialize: (location: Location) -> void
3143
+ def accept: (visitor: Visitor) -> void
3144
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3145
+ def child_nodes: () -> Array[Node?]
3146
+ def deconstruct: () -> Array[Node?]
3147
+
3148
+ def copy: (**untyped) -> RetryNode
3149
+
3150
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3151
+
3152
+ def inspect: (inspector: NodeInspector) -> String
3153
+ end
3154
+ # Represents the use of the `return` keyword.
3155
+ #
3156
+ # return 1
3157
+ # ^^^^^^^^
3158
+ class ReturnNode < Node
3159
+ attr_reader keyword_loc: Location
3160
+ attr_reader arguments: ArgumentsNode?
3161
+
3162
+ def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void
3163
+ def accept: (visitor: Visitor) -> void
3164
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3165
+ def child_nodes: () -> Array[Node?]
3166
+ def deconstruct: () -> Array[Node?]
3167
+
3168
+ def copy: (**untyped) -> ReturnNode
3169
+
3170
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3171
+
3172
+ def keyword: () -> String
3173
+
3174
+ def inspect: (inspector: NodeInspector) -> String
3175
+ end
3176
+ # Represents the `self` keyword.
3177
+ #
3178
+ # self
3179
+ # ^^^^
3180
+ class SelfNode < Node
3181
+
3182
+ def initialize: (location: Location) -> void
3183
+ def accept: (visitor: Visitor) -> void
3184
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3185
+ def child_nodes: () -> Array[Node?]
3186
+ def deconstruct: () -> Array[Node?]
3187
+
3188
+ def copy: (**untyped) -> SelfNode
3189
+
3190
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3191
+
3192
+ def inspect: (inspector: NodeInspector) -> String
3193
+ end
3194
+ # Represents a singleton class declaration involving the `class` keyword.
3195
+ #
3196
+ # class << self end
3197
+ # ^^^^^^^^^^^^^^^^^
3198
+ class SingletonClassNode < Node
3199
+ attr_reader locals: Array[Symbol]
3200
+ attr_reader class_keyword_loc: Location
3201
+ attr_reader operator_loc: Location
3202
+ attr_reader expression: Node
3203
+ attr_reader body: Node?
3204
+ attr_reader end_keyword_loc: Location
3205
+
3206
+ def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void
3207
+ def accept: (visitor: Visitor) -> void
3208
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3209
+ def child_nodes: () -> Array[Node?]
3210
+ def deconstruct: () -> Array[Node?]
3211
+
3212
+ def copy: (**untyped) -> SingletonClassNode
3213
+
3214
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3215
+
3216
+ def class_keyword: () -> String
3217
+
3218
+ def operator: () -> String
3219
+
3220
+ def end_keyword: () -> String
3221
+
3222
+ def inspect: (inspector: NodeInspector) -> String
3223
+ end
3224
+ # Represents the use of the `__ENCODING__` keyword.
3225
+ #
3226
+ # __ENCODING__
3227
+ # ^^^^^^^^^^^^
3228
+ class SourceEncodingNode < Node
3229
+
3230
+ def initialize: (location: Location) -> void
3231
+ def accept: (visitor: Visitor) -> void
3232
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3233
+ def child_nodes: () -> Array[Node?]
3234
+ def deconstruct: () -> Array[Node?]
3235
+
3236
+ def copy: (**untyped) -> SourceEncodingNode
3237
+
3238
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3239
+
3240
+ def inspect: (inspector: NodeInspector) -> String
3241
+ end
3242
+ # Represents the use of the `__FILE__` keyword.
3243
+ #
3244
+ # __FILE__
3245
+ # ^^^^^^^^
3246
+ class SourceFileNode < Node
3247
+ attr_reader filepath: String
3248
+
3249
+ def initialize: (filepath: String, location: Location) -> void
3250
+ def accept: (visitor: Visitor) -> void
3251
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3252
+ def child_nodes: () -> Array[Node?]
3253
+ def deconstruct: () -> Array[Node?]
3254
+
3255
+ def copy: (**untyped) -> SourceFileNode
3256
+
3257
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3258
+
3259
+ def inspect: (inspector: NodeInspector) -> String
3260
+ end
3261
+ # Represents the use of the `__LINE__` keyword.
3262
+ #
3263
+ # __LINE__
3264
+ # ^^^^^^^^
3265
+ class SourceLineNode < Node
3266
+
3267
+ def initialize: (location: Location) -> void
3268
+ def accept: (visitor: Visitor) -> void
3269
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3270
+ def child_nodes: () -> Array[Node?]
3271
+ def deconstruct: () -> Array[Node?]
3272
+
3273
+ def copy: (**untyped) -> SourceLineNode
3274
+
3275
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3276
+
3277
+ def inspect: (inspector: NodeInspector) -> String
3278
+ end
3279
+ # Represents the use of the splat operator.
3280
+ #
3281
+ # [*a]
3282
+ # ^^
3283
+ class SplatNode < Node
3284
+ attr_reader operator_loc: Location
3285
+ attr_reader expression: Node?
3286
+
3287
+ def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void
3288
+ def accept: (visitor: Visitor) -> void
3289
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3290
+ def child_nodes: () -> Array[Node?]
3291
+ def deconstruct: () -> Array[Node?]
3292
+
3293
+ def copy: (**untyped) -> SplatNode
3294
+
3295
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3296
+
3297
+ def operator: () -> String
3298
+
3299
+ def inspect: (inspector: NodeInspector) -> String
3300
+ end
3301
+ # Represents a set of statements contained within some scope.
3302
+ #
3303
+ # foo; bar; baz
3304
+ # ^^^^^^^^^^^^^
3305
+ class StatementsNode < Node
3306
+ attr_reader body: Array[Node]
3307
+
3308
+ def initialize: (body: Array[Node], location: Location) -> void
3309
+ def accept: (visitor: Visitor) -> void
3310
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3311
+ def child_nodes: () -> Array[Node?]
3312
+ def deconstruct: () -> Array[Node?]
3313
+
3314
+ def copy: (**untyped) -> StatementsNode
3315
+
3316
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3317
+
3318
+ def inspect: (inspector: NodeInspector) -> String
3319
+ end
3320
+ # Represents the use of compile-time string concatenation.
3321
+ #
3322
+ # "foo" "bar"
3323
+ # ^^^^^^^^^^^
3324
+ class StringConcatNode < Node
3325
+ attr_reader left: Node
3326
+ attr_reader right: Node
3327
+
3328
+ def initialize: (left: Node, right: Node, location: Location) -> void
3329
+ def accept: (visitor: Visitor) -> void
3330
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3331
+ def child_nodes: () -> Array[Node?]
3332
+ def deconstruct: () -> Array[Node?]
3333
+
3334
+ def copy: (**untyped) -> StringConcatNode
3335
+
3336
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3337
+
3338
+ def inspect: (inspector: NodeInspector) -> String
3339
+ end
3340
+ # Represents a string literal, a string contained within a `%w` list, or
3341
+ # plain string content within an interpolated string.
3342
+ #
3343
+ # "foo"
3344
+ # ^^^^^
3345
+ #
3346
+ # %w[foo]
3347
+ # ^^^
3348
+ #
3349
+ # "foo #{bar} baz"
3350
+ # ^^^^ ^^^^
3351
+ class StringNode < Node
3352
+ attr_reader flags: Integer
3353
+ attr_reader opening_loc: Location?
3354
+ attr_reader content_loc: Location
3355
+ attr_reader closing_loc: Location?
3356
+ attr_reader unescaped: String
3357
+
3358
+ def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void
3359
+ def accept: (visitor: Visitor) -> void
3360
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3361
+ def child_nodes: () -> Array[Node?]
3362
+ def deconstruct: () -> Array[Node?]
3363
+
3364
+ def copy: (**untyped) -> StringNode
3365
+
3366
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3367
+
3368
+ def frozen?: () -> bool
3369
+
3370
+ def opening: () -> String?
3371
+
3372
+ def content: () -> String
3373
+
3374
+ def closing: () -> String?
3375
+
3376
+ def inspect: (inspector: NodeInspector) -> String
3377
+ end
3378
+ # Represents the use of the `super` keyword with parentheses or arguments.
3379
+ #
3380
+ # super()
3381
+ # ^^^^^^^
3382
+ #
3383
+ # super foo, bar
3384
+ # ^^^^^^^^^^^^^^
3385
+ class SuperNode < Node
3386
+ attr_reader keyword_loc: Location
3387
+ attr_reader lparen_loc: Location?
3388
+ attr_reader arguments: ArgumentsNode?
3389
+ attr_reader rparen_loc: Location?
3390
+ attr_reader block: Node?
3391
+
3392
+ def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void
3393
+ def accept: (visitor: Visitor) -> void
3394
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3395
+ def child_nodes: () -> Array[Node?]
3396
+ def deconstruct: () -> Array[Node?]
3397
+
3398
+ def copy: (**untyped) -> SuperNode
3399
+
3400
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3401
+
3402
+ def keyword: () -> String
3403
+
3404
+ def lparen: () -> String?
3405
+
3406
+ def rparen: () -> String?
3407
+
3408
+ def inspect: (inspector: NodeInspector) -> String
3409
+ end
3410
+ # Represents a symbol literal or a symbol contained within a `%i` list.
3411
+ #
3412
+ # :foo
3413
+ # ^^^^
3414
+ #
3415
+ # %i[foo]
3416
+ # ^^^
3417
+ class SymbolNode < Node
3418
+ attr_reader opening_loc: Location?
3419
+ attr_reader value_loc: Location?
3420
+ attr_reader closing_loc: Location?
3421
+ attr_reader unescaped: String
3422
+
3423
+ def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
3424
+ def accept: (visitor: Visitor) -> void
3425
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3426
+ def child_nodes: () -> Array[Node?]
3427
+ def deconstruct: () -> Array[Node?]
3428
+
3429
+ def copy: (**untyped) -> SymbolNode
3430
+
3431
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3432
+
3433
+ def opening: () -> String?
3434
+
3435
+ def value: () -> String?
3436
+
3437
+ def closing: () -> String?
3438
+
3439
+ def inspect: (inspector: NodeInspector) -> String
3440
+ end
3441
+ # Represents the use of the literal `true` keyword.
3442
+ #
3443
+ # true
3444
+ # ^^^^
3445
+ class TrueNode < Node
3446
+
3447
+ def initialize: (location: Location) -> void
3448
+ def accept: (visitor: Visitor) -> void
3449
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3450
+ def child_nodes: () -> Array[Node?]
3451
+ def deconstruct: () -> Array[Node?]
3452
+
3453
+ def copy: (**untyped) -> TrueNode
3454
+
3455
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3456
+
3457
+ def inspect: (inspector: NodeInspector) -> String
3458
+ end
3459
+ # Represents the use of the `undef` keyword.
3460
+ #
3461
+ # undef :foo, :bar, :baz
3462
+ # ^^^^^^^^^^^^^^^^^^^^^^
3463
+ class UndefNode < Node
3464
+ attr_reader names: Array[Node]
3465
+ attr_reader keyword_loc: Location
3466
+
3467
+ def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void
3468
+ def accept: (visitor: Visitor) -> void
3469
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3470
+ def child_nodes: () -> Array[Node?]
3471
+ def deconstruct: () -> Array[Node?]
3472
+
3473
+ def copy: (**untyped) -> UndefNode
3474
+
3475
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3476
+
3477
+ def keyword: () -> String
3478
+
3479
+ def inspect: (inspector: NodeInspector) -> String
3480
+ end
3481
+ # Represents the use of the `unless` keyword, either in the block form or the modifier form.
3482
+ #
3483
+ # bar unless foo
3484
+ # ^^^^^^^^^^^^^^
3485
+ #
3486
+ # unless foo then bar end
3487
+ # ^^^^^^^^^^^^^^^^^^^^^^^
3488
+ class UnlessNode < Node
3489
+ attr_reader keyword_loc: Location
3490
+ attr_reader predicate: Node
3491
+ attr_reader statements: StatementsNode?
3492
+ attr_reader consequent: ElseNode?
3493
+ attr_reader end_keyword_loc: Location?
3494
+
3495
+ def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void
3496
+ def accept: (visitor: Visitor) -> void
3497
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3498
+ def child_nodes: () -> Array[Node?]
3499
+ def deconstruct: () -> Array[Node?]
3500
+
3501
+ def copy: (**untyped) -> UnlessNode
3502
+
3503
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3504
+
3505
+ def keyword: () -> String
3506
+
3507
+ def end_keyword: () -> String?
3508
+
3509
+ def inspect: (inspector: NodeInspector) -> String
3510
+ end
3511
+ # Represents the use of the `until` keyword, either in the block form or the modifier form.
3512
+ #
3513
+ # bar until foo
3514
+ # ^^^^^^^^^^^^^
3515
+ #
3516
+ # until foo do bar end
3517
+ # ^^^^^^^^^^^^^^^^^^^^
3518
+ class UntilNode < Node
3519
+ attr_reader keyword_loc: Location
3520
+ attr_reader closing_loc: Location?
3521
+ attr_reader predicate: Node
3522
+ attr_reader statements: StatementsNode?
3523
+ attr_reader flags: Integer
3524
+
3525
+ def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
3526
+ def accept: (visitor: Visitor) -> void
3527
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3528
+ def child_nodes: () -> Array[Node?]
3529
+ def deconstruct: () -> Array[Node?]
3530
+
3531
+ def copy: (**untyped) -> UntilNode
3532
+
3533
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3534
+
3535
+ def keyword: () -> String
3536
+
3537
+ def closing: () -> String?
3538
+
3539
+ def begin_modifier?: () -> bool
3540
+
3541
+ def inspect: (inspector: NodeInspector) -> String
3542
+ end
3543
+ # Represents the use of the `when` keyword within a case statement.
3544
+ #
3545
+ # case true
3546
+ # when true
3547
+ # ^^^^^^^^^
3548
+ # end
3549
+ class WhenNode < Node
3550
+ attr_reader keyword_loc: Location
3551
+ attr_reader conditions: Array[Node]
3552
+ attr_reader statements: StatementsNode?
3553
+
3554
+ def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void
3555
+ def accept: (visitor: Visitor) -> void
3556
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3557
+ def child_nodes: () -> Array[Node?]
3558
+ def deconstruct: () -> Array[Node?]
3559
+
3560
+ def copy: (**untyped) -> WhenNode
3561
+
3562
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3563
+
3564
+ def keyword: () -> String
3565
+
3566
+ def inspect: (inspector: NodeInspector) -> String
3567
+ end
3568
+ # Represents the use of the `while` keyword, either in the block form or the modifier form.
3569
+ #
3570
+ # bar while foo
3571
+ # ^^^^^^^^^^^^^
3572
+ #
3573
+ # while foo do bar end
3574
+ # ^^^^^^^^^^^^^^^^^^^^
3575
+ class WhileNode < Node
3576
+ attr_reader keyword_loc: Location
3577
+ attr_reader closing_loc: Location?
3578
+ attr_reader predicate: Node
3579
+ attr_reader statements: StatementsNode?
3580
+ attr_reader flags: Integer
3581
+
3582
+ def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
3583
+ def accept: (visitor: Visitor) -> void
3584
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3585
+ def child_nodes: () -> Array[Node?]
3586
+ def deconstruct: () -> Array[Node?]
3587
+
3588
+ def copy: (**untyped) -> WhileNode
3589
+
3590
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3591
+
3592
+ def keyword: () -> String
3593
+
3594
+ def closing: () -> String?
3595
+
3596
+ def begin_modifier?: () -> bool
3597
+
3598
+ def inspect: (inspector: NodeInspector) -> String
3599
+ end
3600
+ # Represents an xstring literal with no interpolation.
3601
+ #
3602
+ # `foo`
3603
+ # ^^^^^
3604
+ class XStringNode < Node
3605
+ attr_reader opening_loc: Location
3606
+ attr_reader content_loc: Location
3607
+ attr_reader closing_loc: Location
3608
+ attr_reader unescaped: String
3609
+
3610
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
3611
+ def accept: (visitor: Visitor) -> void
3612
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3613
+ def child_nodes: () -> Array[Node?]
3614
+ def deconstruct: () -> Array[Node?]
3615
+
3616
+ def copy: (**untyped) -> XStringNode
3617
+
3618
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3619
+
3620
+ def opening: () -> String
3621
+
3622
+ def content: () -> String
3623
+
3624
+ def closing: () -> String
3625
+
3626
+ def inspect: (inspector: NodeInspector) -> String
3627
+ end
3628
+ # Represents the use of the `yield` keyword.
3629
+ #
3630
+ # yield 1
3631
+ # ^^^^^^^
3632
+ class YieldNode < Node
3633
+ attr_reader keyword_loc: Location
3634
+ attr_reader lparen_loc: Location?
3635
+ attr_reader arguments: ArgumentsNode?
3636
+ attr_reader rparen_loc: Location?
3637
+
3638
+ def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void
3639
+ def accept: (visitor: Visitor) -> void
3640
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3641
+ def child_nodes: () -> Array[Node?]
3642
+ def deconstruct: () -> Array[Node?]
3643
+
3644
+ def copy: (**untyped) -> YieldNode
3645
+
3646
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3647
+
3648
+ def keyword: () -> String
3649
+
3650
+ def lparen: () -> String?
3651
+
3652
+ def rparen: () -> String?
3653
+
3654
+ def inspect: (inspector: NodeInspector) -> String
3655
+ end
3656
+
3657
+ module ArgumentsNodeFlags
3658
+ # if arguments contain keyword splat
3659
+ KEYWORD_SPLAT: Integer
3660
+ end
3661
+
3662
+ module CallNodeFlags
3663
+ # &. operator
3664
+ SAFE_NAVIGATION: Integer
3665
+ # a call that could have been a local variable
3666
+ VARIABLE_CALL: Integer
3667
+ end
3668
+
3669
+ module IntegerBaseFlags
3670
+ # 0b prefix
3671
+ BINARY: Integer
3672
+ # 0o or 0 prefix
3673
+ OCTAL: Integer
3674
+ # 0d or no prefix
3675
+ DECIMAL: Integer
3676
+ # 0x prefix
3677
+ HEXADECIMAL: Integer
3678
+ end
3679
+
3680
+ module LoopFlags
3681
+ # a loop after a begin statement, so the body is executed first before the condition
3682
+ BEGIN_MODIFIER: Integer
3683
+ end
3684
+
3685
+ module RangeFlags
3686
+ # ... operator
3687
+ EXCLUDE_END: Integer
3688
+ end
3689
+
3690
+ module RegularExpressionFlags
3691
+ # i - ignores the case of characters when matching
3692
+ IGNORE_CASE: Integer
3693
+ # x - ignores whitespace and allows comments in regular expressions
3694
+ EXTENDED: Integer
3695
+ # m - allows $ to match the end of lines within strings
3696
+ MULTI_LINE: Integer
3697
+ # o - only interpolates values into the regular expression once
3698
+ ONCE: Integer
3699
+ # e - forces the EUC-JP encoding
3700
+ EUC_JP: Integer
3701
+ # n - forces the ASCII-8BIT encoding
3702
+ ASCII_8BIT: Integer
3703
+ # s - forces the Windows-31J encoding
3704
+ WINDOWS_31J: Integer
3705
+ # u - forces the UTF-8 encoding
3706
+ UTF_8: Integer
3707
+ end
3708
+
3709
+ module StringFlags
3710
+ # frozen by virtue of a `frozen_string_literal` comment
3711
+ FROZEN: Integer
3712
+ end
3713
+
3714
+
3715
+ class Visitor < BasicVisitor
3716
+ # Visit a AliasGlobalVariableNode node
3717
+ def visit_alias_global_variable_node: (node: AliasGlobalVariableNode) -> void
3718
+
3719
+ # Visit a AliasMethodNode node
3720
+ def visit_alias_method_node: (node: AliasMethodNode) -> void
3721
+
3722
+ # Visit a AlternationPatternNode node
3723
+ def visit_alternation_pattern_node: (node: AlternationPatternNode) -> void
3724
+
3725
+ # Visit a AndNode node
3726
+ def visit_and_node: (node: AndNode) -> void
3727
+
3728
+ # Visit a ArgumentsNode node
3729
+ def visit_arguments_node: (node: ArgumentsNode) -> void
3730
+
3731
+ # Visit a ArrayNode node
3732
+ def visit_array_node: (node: ArrayNode) -> void
3733
+
3734
+ # Visit a ArrayPatternNode node
3735
+ def visit_array_pattern_node: (node: ArrayPatternNode) -> void
3736
+
3737
+ # Visit a AssocNode node
3738
+ def visit_assoc_node: (node: AssocNode) -> void
3739
+
3740
+ # Visit a AssocSplatNode node
3741
+ def visit_assoc_splat_node: (node: AssocSplatNode) -> void
3742
+
3743
+ # Visit a BackReferenceReadNode node
3744
+ def visit_back_reference_read_node: (node: BackReferenceReadNode) -> void
3745
+
3746
+ # Visit a BeginNode node
3747
+ def visit_begin_node: (node: BeginNode) -> void
3748
+
3749
+ # Visit a BlockArgumentNode node
3750
+ def visit_block_argument_node: (node: BlockArgumentNode) -> void
3751
+
3752
+ # Visit a BlockLocalVariableNode node
3753
+ def visit_block_local_variable_node: (node: BlockLocalVariableNode) -> void
3754
+
3755
+ # Visit a BlockNode node
3756
+ def visit_block_node: (node: BlockNode) -> void
3757
+
3758
+ # Visit a BlockParameterNode node
3759
+ def visit_block_parameter_node: (node: BlockParameterNode) -> void
3760
+
3761
+ # Visit a BlockParametersNode node
3762
+ def visit_block_parameters_node: (node: BlockParametersNode) -> void
3763
+
3764
+ # Visit a BreakNode node
3765
+ def visit_break_node: (node: BreakNode) -> void
3766
+
3767
+ # Visit a CallAndWriteNode node
3768
+ def visit_call_and_write_node: (node: CallAndWriteNode) -> void
3769
+
3770
+ # Visit a CallNode node
3771
+ def visit_call_node: (node: CallNode) -> void
3772
+
3773
+ # Visit a CallOperatorWriteNode node
3774
+ def visit_call_operator_write_node: (node: CallOperatorWriteNode) -> void
3775
+
3776
+ # Visit a CallOrWriteNode node
3777
+ def visit_call_or_write_node: (node: CallOrWriteNode) -> void
3778
+
3779
+ # Visit a CapturePatternNode node
3780
+ def visit_capture_pattern_node: (node: CapturePatternNode) -> void
3781
+
3782
+ # Visit a CaseNode node
3783
+ def visit_case_node: (node: CaseNode) -> void
3784
+
3785
+ # Visit a ClassNode node
3786
+ def visit_class_node: (node: ClassNode) -> void
3787
+
3788
+ # Visit a ClassVariableAndWriteNode node
3789
+ def visit_class_variable_and_write_node: (node: ClassVariableAndWriteNode) -> void
3790
+
3791
+ # Visit a ClassVariableOperatorWriteNode node
3792
+ def visit_class_variable_operator_write_node: (node: ClassVariableOperatorWriteNode) -> void
3793
+
3794
+ # Visit a ClassVariableOrWriteNode node
3795
+ def visit_class_variable_or_write_node: (node: ClassVariableOrWriteNode) -> void
3796
+
3797
+ # Visit a ClassVariableReadNode node
3798
+ def visit_class_variable_read_node: (node: ClassVariableReadNode) -> void
3799
+
3800
+ # Visit a ClassVariableTargetNode node
3801
+ def visit_class_variable_target_node: (node: ClassVariableTargetNode) -> void
3802
+
3803
+ # Visit a ClassVariableWriteNode node
3804
+ def visit_class_variable_write_node: (node: ClassVariableWriteNode) -> void
3805
+
3806
+ # Visit a ConstantAndWriteNode node
3807
+ def visit_constant_and_write_node: (node: ConstantAndWriteNode) -> void
3808
+
3809
+ # Visit a ConstantOperatorWriteNode node
3810
+ def visit_constant_operator_write_node: (node: ConstantOperatorWriteNode) -> void
3811
+
3812
+ # Visit a ConstantOrWriteNode node
3813
+ def visit_constant_or_write_node: (node: ConstantOrWriteNode) -> void
3814
+
3815
+ # Visit a ConstantPathAndWriteNode node
3816
+ def visit_constant_path_and_write_node: (node: ConstantPathAndWriteNode) -> void
3817
+
3818
+ # Visit a ConstantPathNode node
3819
+ def visit_constant_path_node: (node: ConstantPathNode) -> void
3820
+
3821
+ # Visit a ConstantPathOperatorWriteNode node
3822
+ def visit_constant_path_operator_write_node: (node: ConstantPathOperatorWriteNode) -> void
3823
+
3824
+ # Visit a ConstantPathOrWriteNode node
3825
+ def visit_constant_path_or_write_node: (node: ConstantPathOrWriteNode) -> void
3826
+
3827
+ # Visit a ConstantPathTargetNode node
3828
+ def visit_constant_path_target_node: (node: ConstantPathTargetNode) -> void
3829
+
3830
+ # Visit a ConstantPathWriteNode node
3831
+ def visit_constant_path_write_node: (node: ConstantPathWriteNode) -> void
3832
+
3833
+ # Visit a ConstantReadNode node
3834
+ def visit_constant_read_node: (node: ConstantReadNode) -> void
3835
+
3836
+ # Visit a ConstantTargetNode node
3837
+ def visit_constant_target_node: (node: ConstantTargetNode) -> void
3838
+
3839
+ # Visit a ConstantWriteNode node
3840
+ def visit_constant_write_node: (node: ConstantWriteNode) -> void
3841
+
3842
+ # Visit a DefNode node
3843
+ def visit_def_node: (node: DefNode) -> void
3844
+
3845
+ # Visit a DefinedNode node
3846
+ def visit_defined_node: (node: DefinedNode) -> void
3847
+
3848
+ # Visit a ElseNode node
3849
+ def visit_else_node: (node: ElseNode) -> void
3850
+
3851
+ # Visit a EmbeddedStatementsNode node
3852
+ def visit_embedded_statements_node: (node: EmbeddedStatementsNode) -> void
3853
+
3854
+ # Visit a EmbeddedVariableNode node
3855
+ def visit_embedded_variable_node: (node: EmbeddedVariableNode) -> void
3856
+
3857
+ # Visit a EnsureNode node
3858
+ def visit_ensure_node: (node: EnsureNode) -> void
3859
+
3860
+ # Visit a FalseNode node
3861
+ def visit_false_node: (node: FalseNode) -> void
3862
+
3863
+ # Visit a FindPatternNode node
3864
+ def visit_find_pattern_node: (node: FindPatternNode) -> void
3865
+
3866
+ # Visit a FlipFlopNode node
3867
+ def visit_flip_flop_node: (node: FlipFlopNode) -> void
3868
+
3869
+ # Visit a FloatNode node
3870
+ def visit_float_node: (node: FloatNode) -> void
3871
+
3872
+ # Visit a ForNode node
3873
+ def visit_for_node: (node: ForNode) -> void
3874
+
3875
+ # Visit a ForwardingArgumentsNode node
3876
+ def visit_forwarding_arguments_node: (node: ForwardingArgumentsNode) -> void
3877
+
3878
+ # Visit a ForwardingParameterNode node
3879
+ def visit_forwarding_parameter_node: (node: ForwardingParameterNode) -> void
3880
+
3881
+ # Visit a ForwardingSuperNode node
3882
+ def visit_forwarding_super_node: (node: ForwardingSuperNode) -> void
3883
+
3884
+ # Visit a GlobalVariableAndWriteNode node
3885
+ def visit_global_variable_and_write_node: (node: GlobalVariableAndWriteNode) -> void
3886
+
3887
+ # Visit a GlobalVariableOperatorWriteNode node
3888
+ def visit_global_variable_operator_write_node: (node: GlobalVariableOperatorWriteNode) -> void
3889
+
3890
+ # Visit a GlobalVariableOrWriteNode node
3891
+ def visit_global_variable_or_write_node: (node: GlobalVariableOrWriteNode) -> void
3892
+
3893
+ # Visit a GlobalVariableReadNode node
3894
+ def visit_global_variable_read_node: (node: GlobalVariableReadNode) -> void
3895
+
3896
+ # Visit a GlobalVariableTargetNode node
3897
+ def visit_global_variable_target_node: (node: GlobalVariableTargetNode) -> void
3898
+
3899
+ # Visit a GlobalVariableWriteNode node
3900
+ def visit_global_variable_write_node: (node: GlobalVariableWriteNode) -> void
3901
+
3902
+ # Visit a HashNode node
3903
+ def visit_hash_node: (node: HashNode) -> void
3904
+
3905
+ # Visit a HashPatternNode node
3906
+ def visit_hash_pattern_node: (node: HashPatternNode) -> void
3907
+
3908
+ # Visit a IfNode node
3909
+ def visit_if_node: (node: IfNode) -> void
3910
+
3911
+ # Visit a ImaginaryNode node
3912
+ def visit_imaginary_node: (node: ImaginaryNode) -> void
3913
+
3914
+ # Visit a ImplicitNode node
3915
+ def visit_implicit_node: (node: ImplicitNode) -> void
3916
+
3917
+ # Visit a InNode node
3918
+ def visit_in_node: (node: InNode) -> void
3919
+
3920
+ # Visit a IndexAndWriteNode node
3921
+ def visit_index_and_write_node: (node: IndexAndWriteNode) -> void
3922
+
3923
+ # Visit a IndexOperatorWriteNode node
3924
+ def visit_index_operator_write_node: (node: IndexOperatorWriteNode) -> void
3925
+
3926
+ # Visit a IndexOrWriteNode node
3927
+ def visit_index_or_write_node: (node: IndexOrWriteNode) -> void
3928
+
3929
+ # Visit a InstanceVariableAndWriteNode node
3930
+ def visit_instance_variable_and_write_node: (node: InstanceVariableAndWriteNode) -> void
3931
+
3932
+ # Visit a InstanceVariableOperatorWriteNode node
3933
+ def visit_instance_variable_operator_write_node: (node: InstanceVariableOperatorWriteNode) -> void
3934
+
3935
+ # Visit a InstanceVariableOrWriteNode node
3936
+ def visit_instance_variable_or_write_node: (node: InstanceVariableOrWriteNode) -> void
3937
+
3938
+ # Visit a InstanceVariableReadNode node
3939
+ def visit_instance_variable_read_node: (node: InstanceVariableReadNode) -> void
3940
+
3941
+ # Visit a InstanceVariableTargetNode node
3942
+ def visit_instance_variable_target_node: (node: InstanceVariableTargetNode) -> void
3943
+
3944
+ # Visit a InstanceVariableWriteNode node
3945
+ def visit_instance_variable_write_node: (node: InstanceVariableWriteNode) -> void
3946
+
3947
+ # Visit a IntegerNode node
3948
+ def visit_integer_node: (node: IntegerNode) -> void
3949
+
3950
+ # Visit a InterpolatedMatchLastLineNode node
3951
+ def visit_interpolated_match_last_line_node: (node: InterpolatedMatchLastLineNode) -> void
3952
+
3953
+ # Visit a InterpolatedRegularExpressionNode node
3954
+ def visit_interpolated_regular_expression_node: (node: InterpolatedRegularExpressionNode) -> void
3955
+
3956
+ # Visit a InterpolatedStringNode node
3957
+ def visit_interpolated_string_node: (node: InterpolatedStringNode) -> void
3958
+
3959
+ # Visit a InterpolatedSymbolNode node
3960
+ def visit_interpolated_symbol_node: (node: InterpolatedSymbolNode) -> void
3961
+
3962
+ # Visit a InterpolatedXStringNode node
3963
+ def visit_interpolated_x_string_node: (node: InterpolatedXStringNode) -> void
3964
+
3965
+ # Visit a KeywordHashNode node
3966
+ def visit_keyword_hash_node: (node: KeywordHashNode) -> void
3967
+
3968
+ # Visit a KeywordParameterNode node
3969
+ def visit_keyword_parameter_node: (node: KeywordParameterNode) -> void
3970
+
3971
+ # Visit a KeywordRestParameterNode node
3972
+ def visit_keyword_rest_parameter_node: (node: KeywordRestParameterNode) -> void
3973
+
3974
+ # Visit a LambdaNode node
3975
+ def visit_lambda_node: (node: LambdaNode) -> void
3976
+
3977
+ # Visit a LocalVariableAndWriteNode node
3978
+ def visit_local_variable_and_write_node: (node: LocalVariableAndWriteNode) -> void
3979
+
3980
+ # Visit a LocalVariableOperatorWriteNode node
3981
+ def visit_local_variable_operator_write_node: (node: LocalVariableOperatorWriteNode) -> void
3982
+
3983
+ # Visit a LocalVariableOrWriteNode node
3984
+ def visit_local_variable_or_write_node: (node: LocalVariableOrWriteNode) -> void
3985
+
3986
+ # Visit a LocalVariableReadNode node
3987
+ def visit_local_variable_read_node: (node: LocalVariableReadNode) -> void
3988
+
3989
+ # Visit a LocalVariableTargetNode node
3990
+ def visit_local_variable_target_node: (node: LocalVariableTargetNode) -> void
3991
+
3992
+ # Visit a LocalVariableWriteNode node
3993
+ def visit_local_variable_write_node: (node: LocalVariableWriteNode) -> void
3994
+
3995
+ # Visit a MatchLastLineNode node
3996
+ def visit_match_last_line_node: (node: MatchLastLineNode) -> void
3997
+
3998
+ # Visit a MatchPredicateNode node
3999
+ def visit_match_predicate_node: (node: MatchPredicateNode) -> void
4000
+
4001
+ # Visit a MatchRequiredNode node
4002
+ def visit_match_required_node: (node: MatchRequiredNode) -> void
4003
+
4004
+ # Visit a MatchWriteNode node
4005
+ def visit_match_write_node: (node: MatchWriteNode) -> void
4006
+
4007
+ # Visit a MissingNode node
4008
+ def visit_missing_node: (node: MissingNode) -> void
4009
+
4010
+ # Visit a ModuleNode node
4011
+ def visit_module_node: (node: ModuleNode) -> void
4012
+
4013
+ # Visit a MultiTargetNode node
4014
+ def visit_multi_target_node: (node: MultiTargetNode) -> void
4015
+
4016
+ # Visit a MultiWriteNode node
4017
+ def visit_multi_write_node: (node: MultiWriteNode) -> void
4018
+
4019
+ # Visit a NextNode node
4020
+ def visit_next_node: (node: NextNode) -> void
4021
+
4022
+ # Visit a NilNode node
4023
+ def visit_nil_node: (node: NilNode) -> void
4024
+
4025
+ # Visit a NoKeywordsParameterNode node
4026
+ def visit_no_keywords_parameter_node: (node: NoKeywordsParameterNode) -> void
4027
+
4028
+ # Visit a NumberedReferenceReadNode node
4029
+ def visit_numbered_reference_read_node: (node: NumberedReferenceReadNode) -> void
4030
+
4031
+ # Visit a OptionalParameterNode node
4032
+ def visit_optional_parameter_node: (node: OptionalParameterNode) -> void
4033
+
4034
+ # Visit a OrNode node
4035
+ def visit_or_node: (node: OrNode) -> void
4036
+
4037
+ # Visit a ParametersNode node
4038
+ def visit_parameters_node: (node: ParametersNode) -> void
4039
+
4040
+ # Visit a ParenthesesNode node
4041
+ def visit_parentheses_node: (node: ParenthesesNode) -> void
4042
+
4043
+ # Visit a PinnedExpressionNode node
4044
+ def visit_pinned_expression_node: (node: PinnedExpressionNode) -> void
4045
+
4046
+ # Visit a PinnedVariableNode node
4047
+ def visit_pinned_variable_node: (node: PinnedVariableNode) -> void
4048
+
4049
+ # Visit a PostExecutionNode node
4050
+ def visit_post_execution_node: (node: PostExecutionNode) -> void
4051
+
4052
+ # Visit a PreExecutionNode node
4053
+ def visit_pre_execution_node: (node: PreExecutionNode) -> void
4054
+
4055
+ # Visit a ProgramNode node
4056
+ def visit_program_node: (node: ProgramNode) -> void
4057
+
4058
+ # Visit a RangeNode node
4059
+ def visit_range_node: (node: RangeNode) -> void
4060
+
4061
+ # Visit a RationalNode node
4062
+ def visit_rational_node: (node: RationalNode) -> void
4063
+
4064
+ # Visit a RedoNode node
4065
+ def visit_redo_node: (node: RedoNode) -> void
4066
+
4067
+ # Visit a RegularExpressionNode node
4068
+ def visit_regular_expression_node: (node: RegularExpressionNode) -> void
4069
+
4070
+ # Visit a RequiredParameterNode node
4071
+ def visit_required_parameter_node: (node: RequiredParameterNode) -> void
4072
+
4073
+ # Visit a RescueModifierNode node
4074
+ def visit_rescue_modifier_node: (node: RescueModifierNode) -> void
4075
+
4076
+ # Visit a RescueNode node
4077
+ def visit_rescue_node: (node: RescueNode) -> void
4078
+
4079
+ # Visit a RestParameterNode node
4080
+ def visit_rest_parameter_node: (node: RestParameterNode) -> void
4081
+
4082
+ # Visit a RetryNode node
4083
+ def visit_retry_node: (node: RetryNode) -> void
4084
+
4085
+ # Visit a ReturnNode node
4086
+ def visit_return_node: (node: ReturnNode) -> void
4087
+
4088
+ # Visit a SelfNode node
4089
+ def visit_self_node: (node: SelfNode) -> void
4090
+
4091
+ # Visit a SingletonClassNode node
4092
+ def visit_singleton_class_node: (node: SingletonClassNode) -> void
4093
+
4094
+ # Visit a SourceEncodingNode node
4095
+ def visit_source_encoding_node: (node: SourceEncodingNode) -> void
4096
+
4097
+ # Visit a SourceFileNode node
4098
+ def visit_source_file_node: (node: SourceFileNode) -> void
4099
+
4100
+ # Visit a SourceLineNode node
4101
+ def visit_source_line_node: (node: SourceLineNode) -> void
4102
+
4103
+ # Visit a SplatNode node
4104
+ def visit_splat_node: (node: SplatNode) -> void
4105
+
4106
+ # Visit a StatementsNode node
4107
+ def visit_statements_node: (node: StatementsNode) -> void
4108
+
4109
+ # Visit a StringConcatNode node
4110
+ def visit_string_concat_node: (node: StringConcatNode) -> void
4111
+
4112
+ # Visit a StringNode node
4113
+ def visit_string_node: (node: StringNode) -> void
4114
+
4115
+ # Visit a SuperNode node
4116
+ def visit_super_node: (node: SuperNode) -> void
4117
+
4118
+ # Visit a SymbolNode node
4119
+ def visit_symbol_node: (node: SymbolNode) -> void
4120
+
4121
+ # Visit a TrueNode node
4122
+ def visit_true_node: (node: TrueNode) -> void
4123
+
4124
+ # Visit a UndefNode node
4125
+ def visit_undef_node: (node: UndefNode) -> void
4126
+
4127
+ # Visit a UnlessNode node
4128
+ def visit_unless_node: (node: UnlessNode) -> void
4129
+
4130
+ # Visit a UntilNode node
4131
+ def visit_until_node: (node: UntilNode) -> void
4132
+
4133
+ # Visit a WhenNode node
4134
+ def visit_when_node: (node: WhenNode) -> void
4135
+
4136
+ # Visit a WhileNode node
4137
+ def visit_while_node: (node: WhileNode) -> void
4138
+
4139
+ # Visit a XStringNode node
4140
+ def visit_x_string_node: (node: XStringNode) -> void
4141
+
4142
+ # Visit a YieldNode node
4143
+ def visit_yield_node: (node: YieldNode) -> void
4144
+ end
4145
+
4146
+ module DSL
4147
+ private
4148
+
4149
+ # Create a new Location object
4150
+ def Location: (source: Source?, start_offset: Integer, length: Integer) -> Location
4151
+
4152
+ # Create a new AliasGlobalVariableNode node
4153
+ def AliasGlobalVariableNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasGlobalVariableNode
4154
+ # Create a new AliasMethodNode node
4155
+ def AliasMethodNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasMethodNode
4156
+ # Create a new AlternationPatternNode node
4157
+ def AlternationPatternNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AlternationPatternNode
4158
+ # Create a new AndNode node
4159
+ def AndNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AndNode
4160
+ # Create a new ArgumentsNode node
4161
+ def ArgumentsNode: (arguments: Array[Node], flags: Integer, location: Location) -> ArgumentsNode
4162
+ # Create a new ArrayNode node
4163
+ def ArrayNode: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
4164
+ # Create a new ArrayPatternNode node
4165
+ def ArrayPatternNode: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayPatternNode
4166
+ # Create a new AssocNode node
4167
+ def AssocNode: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> AssocNode
4168
+ # Create a new AssocSplatNode node
4169
+ def AssocSplatNode: (value: Node?, operator_loc: Location, location: Location) -> AssocSplatNode
4170
+ # Create a new BackReferenceReadNode node
4171
+ def BackReferenceReadNode: (name: Symbol, location: Location) -> BackReferenceReadNode
4172
+ # Create a new BeginNode node
4173
+ def BeginNode: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> BeginNode
4174
+ # Create a new BlockArgumentNode node
4175
+ def BlockArgumentNode: (expression: Node?, operator_loc: Location, location: Location) -> BlockArgumentNode
4176
+ # Create a new BlockLocalVariableNode node
4177
+ def BlockLocalVariableNode: (name: Symbol, location: Location) -> BlockLocalVariableNode
4178
+ # Create a new BlockNode node
4179
+ def BlockNode: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode
4180
+ # Create a new BlockParameterNode node
4181
+ def BlockParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode
4182
+ # Create a new BlockParametersNode node
4183
+ def BlockParametersNode: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> BlockParametersNode
4184
+ # Create a new BreakNode node
4185
+ def BreakNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> BreakNode
4186
+ # Create a new CallAndWriteNode node
4187
+ def CallAndWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallAndWriteNode
4188
+ # Create a new CallNode node
4189
+ def CallNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> CallNode
4190
+ # Create a new CallOperatorWriteNode node
4191
+ def CallOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOperatorWriteNode
4192
+ # Create a new CallOrWriteNode node
4193
+ def CallOrWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOrWriteNode
4194
+ # Create a new CapturePatternNode node
4195
+ def CapturePatternNode: (value: Node, target: Node, operator_loc: Location, location: Location) -> CapturePatternNode
4196
+ # Create a new CaseNode node
4197
+ def CaseNode: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> CaseNode
4198
+ # Create a new ClassNode node
4199
+ def ClassNode: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> ClassNode
4200
+ # Create a new ClassVariableAndWriteNode node
4201
+ def ClassVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ClassVariableAndWriteNode
4202
+ # Create a new ClassVariableOperatorWriteNode node
4203
+ def ClassVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ClassVariableOperatorWriteNode
4204
+ # Create a new ClassVariableOrWriteNode node
4205
+ def ClassVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ClassVariableOrWriteNode
4206
+ # Create a new ClassVariableReadNode node
4207
+ def ClassVariableReadNode: (name: Symbol, location: Location) -> ClassVariableReadNode
4208
+ # Create a new ClassVariableTargetNode node
4209
+ def ClassVariableTargetNode: (name: Symbol, location: Location) -> ClassVariableTargetNode
4210
+ # Create a new ClassVariableWriteNode node
4211
+ def ClassVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> ClassVariableWriteNode
4212
+ # Create a new ConstantAndWriteNode node
4213
+ def ConstantAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ConstantAndWriteNode
4214
+ # Create a new ConstantOperatorWriteNode node
4215
+ def ConstantOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ConstantOperatorWriteNode
4216
+ # Create a new ConstantOrWriteNode node
4217
+ def ConstantOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ConstantOrWriteNode
4218
+ # Create a new ConstantPathAndWriteNode node
4219
+ def ConstantPathAndWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathAndWriteNode
4220
+ # Create a new ConstantPathNode node
4221
+ def ConstantPathNode: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> ConstantPathNode
4222
+ # Create a new ConstantPathOperatorWriteNode node
4223
+ def ConstantPathOperatorWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ConstantPathOperatorWriteNode
4224
+ # Create a new ConstantPathOrWriteNode node
4225
+ def ConstantPathOrWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathOrWriteNode
4226
+ # Create a new ConstantPathTargetNode node
4227
+ def ConstantPathTargetNode: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> ConstantPathTargetNode
4228
+ # Create a new ConstantPathWriteNode node
4229
+ def ConstantPathWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathWriteNode
4230
+ # Create a new ConstantReadNode node
4231
+ def ConstantReadNode: (name: Symbol, location: Location) -> ConstantReadNode
4232
+ # Create a new ConstantTargetNode node
4233
+ def ConstantTargetNode: (name: Symbol, location: Location) -> ConstantTargetNode
4234
+ # Create a new ConstantWriteNode node
4235
+ def ConstantWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> ConstantWriteNode
4236
+ # Create a new DefNode node
4237
+ def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode
4238
+ # Create a new DefinedNode node
4239
+ def DefinedNode: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> DefinedNode
4240
+ # Create a new ElseNode node
4241
+ def ElseNode: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> ElseNode
4242
+ # Create a new EmbeddedStatementsNode node
4243
+ def EmbeddedStatementsNode: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> EmbeddedStatementsNode
4244
+ # Create a new EmbeddedVariableNode node
4245
+ def EmbeddedVariableNode: (operator_loc: Location, variable: Node, location: Location) -> EmbeddedVariableNode
4246
+ # Create a new EnsureNode node
4247
+ def EnsureNode: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> EnsureNode
4248
+ # Create a new FalseNode node
4249
+ def FalseNode: (location: Location) -> FalseNode
4250
+ # Create a new FindPatternNode node
4251
+ def FindPatternNode: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> FindPatternNode
4252
+ # Create a new FlipFlopNode node
4253
+ def FlipFlopNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> FlipFlopNode
4254
+ # Create a new FloatNode node
4255
+ def FloatNode: (location: Location) -> FloatNode
4256
+ # Create a new ForNode node
4257
+ def ForNode: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> ForNode
4258
+ # Create a new ForwardingArgumentsNode node
4259
+ def ForwardingArgumentsNode: (location: Location) -> ForwardingArgumentsNode
4260
+ # Create a new ForwardingParameterNode node
4261
+ def ForwardingParameterNode: (location: Location) -> ForwardingParameterNode
4262
+ # Create a new ForwardingSuperNode node
4263
+ def ForwardingSuperNode: (block: BlockNode?, location: Location) -> ForwardingSuperNode
4264
+ # Create a new GlobalVariableAndWriteNode node
4265
+ def GlobalVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> GlobalVariableAndWriteNode
4266
+ # Create a new GlobalVariableOperatorWriteNode node
4267
+ def GlobalVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> GlobalVariableOperatorWriteNode
4268
+ # Create a new GlobalVariableOrWriteNode node
4269
+ def GlobalVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> GlobalVariableOrWriteNode
4270
+ # Create a new GlobalVariableReadNode node
4271
+ def GlobalVariableReadNode: (name: Symbol, location: Location) -> GlobalVariableReadNode
4272
+ # Create a new GlobalVariableTargetNode node
4273
+ def GlobalVariableTargetNode: (name: Symbol, location: Location) -> GlobalVariableTargetNode
4274
+ # Create a new GlobalVariableWriteNode node
4275
+ def GlobalVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> GlobalVariableWriteNode
4276
+ # Create a new HashNode node
4277
+ def HashNode: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> HashNode
4278
+ # Create a new HashPatternNode node
4279
+ def HashPatternNode: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> HashPatternNode
4280
+ # Create a new IfNode node
4281
+ def IfNode: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> IfNode
4282
+ # Create a new ImaginaryNode node
4283
+ def ImaginaryNode: (numeric: Node, location: Location) -> ImaginaryNode
4284
+ # Create a new ImplicitNode node
4285
+ def ImplicitNode: (value: Node, location: Location) -> ImplicitNode
4286
+ # Create a new InNode node
4287
+ def InNode: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> InNode
4288
+ # Create a new IndexAndWriteNode node
4289
+ def IndexAndWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> IndexAndWriteNode
4290
+ # Create a new IndexOperatorWriteNode node
4291
+ def IndexOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> IndexOperatorWriteNode
4292
+ # Create a new IndexOrWriteNode node
4293
+ def IndexOrWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> IndexOrWriteNode
4294
+ # Create a new InstanceVariableAndWriteNode node
4295
+ def InstanceVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableAndWriteNode
4296
+ # Create a new InstanceVariableOperatorWriteNode node
4297
+ def InstanceVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> InstanceVariableOperatorWriteNode
4298
+ # Create a new InstanceVariableOrWriteNode node
4299
+ def InstanceVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableOrWriteNode
4300
+ # Create a new InstanceVariableReadNode node
4301
+ def InstanceVariableReadNode: (name: Symbol, location: Location) -> InstanceVariableReadNode
4302
+ # Create a new InstanceVariableTargetNode node
4303
+ def InstanceVariableTargetNode: (name: Symbol, location: Location) -> InstanceVariableTargetNode
4304
+ # Create a new InstanceVariableWriteNode node
4305
+ def InstanceVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> InstanceVariableWriteNode
4306
+ # Create a new IntegerNode node
4307
+ def IntegerNode: (flags: Integer, location: Location) -> IntegerNode
4308
+ # Create a new InterpolatedMatchLastLineNode node
4309
+ def InterpolatedMatchLastLineNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedMatchLastLineNode
4310
+ # Create a new InterpolatedRegularExpressionNode node
4311
+ def InterpolatedRegularExpressionNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedRegularExpressionNode
4312
+ # Create a new InterpolatedStringNode node
4313
+ def InterpolatedStringNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedStringNode
4314
+ # Create a new InterpolatedSymbolNode node
4315
+ def InterpolatedSymbolNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedSymbolNode
4316
+ # Create a new InterpolatedXStringNode node
4317
+ def InterpolatedXStringNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedXStringNode
4318
+ # Create a new KeywordHashNode node
4319
+ def KeywordHashNode: (elements: Array[Node], location: Location) -> KeywordHashNode
4320
+ # Create a new KeywordParameterNode node
4321
+ def KeywordParameterNode: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> KeywordParameterNode
4322
+ # Create a new KeywordRestParameterNode node
4323
+ def KeywordRestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode
4324
+ # Create a new LambdaNode node
4325
+ def LambdaNode: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> LambdaNode
4326
+ # Create a new LocalVariableAndWriteNode node
4327
+ def LocalVariableAndWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableAndWriteNode
4328
+ # Create a new LocalVariableOperatorWriteNode node
4329
+ def LocalVariableOperatorWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> LocalVariableOperatorWriteNode
4330
+ # Create a new LocalVariableOrWriteNode node
4331
+ def LocalVariableOrWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableOrWriteNode
4332
+ # Create a new LocalVariableReadNode node
4333
+ def LocalVariableReadNode: (name: Symbol, depth: Integer, location: Location) -> LocalVariableReadNode
4334
+ # Create a new LocalVariableTargetNode node
4335
+ def LocalVariableTargetNode: (name: Symbol, depth: Integer, location: Location) -> LocalVariableTargetNode
4336
+ # Create a new LocalVariableWriteNode node
4337
+ def LocalVariableWriteNode: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> LocalVariableWriteNode
4338
+ # Create a new MatchLastLineNode node
4339
+ def MatchLastLineNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> MatchLastLineNode
4340
+ # Create a new MatchPredicateNode node
4341
+ def MatchPredicateNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchPredicateNode
4342
+ # Create a new MatchRequiredNode node
4343
+ def MatchRequiredNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchRequiredNode
4344
+ # Create a new MatchWriteNode node
4345
+ def MatchWriteNode: (call: CallNode, locals: Array[Symbol], location: Location) -> MatchWriteNode
4346
+ # Create a new MissingNode node
4347
+ def MissingNode: (location: Location) -> MissingNode
4348
+ # Create a new ModuleNode node
4349
+ def ModuleNode: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> ModuleNode
4350
+ # Create a new MultiTargetNode node
4351
+ def MultiTargetNode: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> MultiTargetNode
4352
+ # Create a new MultiWriteNode node
4353
+ def MultiWriteNode: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> MultiWriteNode
4354
+ # Create a new NextNode node
4355
+ def NextNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> NextNode
4356
+ # Create a new NilNode node
4357
+ def NilNode: (location: Location) -> NilNode
4358
+ # Create a new NoKeywordsParameterNode node
4359
+ def NoKeywordsParameterNode: (operator_loc: Location, keyword_loc: Location, location: Location) -> NoKeywordsParameterNode
4360
+ # Create a new NumberedReferenceReadNode node
4361
+ def NumberedReferenceReadNode: (number: Integer, location: Location) -> NumberedReferenceReadNode
4362
+ # Create a new OptionalParameterNode node
4363
+ def OptionalParameterNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> OptionalParameterNode
4364
+ # Create a new OrNode node
4365
+ def OrNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> OrNode
4366
+ # Create a new ParametersNode node
4367
+ def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode
4368
+ # Create a new ParenthesesNode node
4369
+ def ParenthesesNode: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> ParenthesesNode
4370
+ # Create a new PinnedExpressionNode node
4371
+ def PinnedExpressionNode: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> PinnedExpressionNode
4372
+ # Create a new PinnedVariableNode node
4373
+ def PinnedVariableNode: (variable: Node, operator_loc: Location, location: Location) -> PinnedVariableNode
4374
+ # Create a new PostExecutionNode node
4375
+ def PostExecutionNode: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> PostExecutionNode
4376
+ # Create a new PreExecutionNode node
4377
+ def PreExecutionNode: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> PreExecutionNode
4378
+ # Create a new ProgramNode node
4379
+ def ProgramNode: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> ProgramNode
4380
+ # Create a new RangeNode node
4381
+ def RangeNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> RangeNode
4382
+ # Create a new RationalNode node
4383
+ def RationalNode: (numeric: Node, location: Location) -> RationalNode
4384
+ # Create a new RedoNode node
4385
+ def RedoNode: (location: Location) -> RedoNode
4386
+ # Create a new RegularExpressionNode node
4387
+ def RegularExpressionNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> RegularExpressionNode
4388
+ # Create a new RequiredParameterNode node
4389
+ def RequiredParameterNode: (name: Symbol, location: Location) -> RequiredParameterNode
4390
+ # Create a new RescueModifierNode node
4391
+ def RescueModifierNode: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> RescueModifierNode
4392
+ # Create a new RescueNode node
4393
+ def RescueNode: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> RescueNode
4394
+ # Create a new RestParameterNode node
4395
+ def RestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> RestParameterNode
4396
+ # Create a new RetryNode node
4397
+ def RetryNode: (location: Location) -> RetryNode
4398
+ # Create a new ReturnNode node
4399
+ def ReturnNode: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> ReturnNode
4400
+ # Create a new SelfNode node
4401
+ def SelfNode: (location: Location) -> SelfNode
4402
+ # Create a new SingletonClassNode node
4403
+ def SingletonClassNode: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> SingletonClassNode
4404
+ # Create a new SourceEncodingNode node
4405
+ def SourceEncodingNode: (location: Location) -> SourceEncodingNode
4406
+ # Create a new SourceFileNode node
4407
+ def SourceFileNode: (filepath: String, location: Location) -> SourceFileNode
4408
+ # Create a new SourceLineNode node
4409
+ def SourceLineNode: (location: Location) -> SourceLineNode
4410
+ # Create a new SplatNode node
4411
+ def SplatNode: (operator_loc: Location, expression: Node?, location: Location) -> SplatNode
4412
+ # Create a new StatementsNode node
4413
+ def StatementsNode: (body: Array[Node], location: Location) -> StatementsNode
4414
+ # Create a new StringConcatNode node
4415
+ def StringConcatNode: (left: Node, right: Node, location: Location) -> StringConcatNode
4416
+ # Create a new StringNode node
4417
+ def StringNode: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> StringNode
4418
+ # Create a new SuperNode node
4419
+ def SuperNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> SuperNode
4420
+ # Create a new SymbolNode node
4421
+ def SymbolNode: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
4422
+ # Create a new TrueNode node
4423
+ def TrueNode: (location: Location) -> TrueNode
4424
+ # Create a new UndefNode node
4425
+ def UndefNode: (names: Array[Node], keyword_loc: Location, location: Location) -> UndefNode
4426
+ # Create a new UnlessNode node
4427
+ def UnlessNode: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> UnlessNode
4428
+ # Create a new UntilNode node
4429
+ def UntilNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> UntilNode
4430
+ # Create a new WhenNode node
4431
+ def WhenNode: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> WhenNode
4432
+ # Create a new WhileNode node
4433
+ def WhileNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> WhileNode
4434
+ # Create a new XStringNode node
4435
+ def XStringNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
4436
+ # Create a new YieldNode node
4437
+ def YieldNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> YieldNode
4438
+ end
4439
+ end