prism 0.15.1 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -1
  3. data/Makefile +12 -0
  4. data/README.md +3 -1
  5. data/config.yml +66 -50
  6. data/docs/configuration.md +2 -0
  7. data/docs/fuzzing.md +1 -1
  8. data/docs/javascript.md +90 -0
  9. data/docs/releasing.md +27 -0
  10. data/docs/ruby_api.md +2 -0
  11. data/docs/serialization.md +28 -29
  12. data/ext/prism/api_node.c +856 -826
  13. data/ext/prism/api_pack.c +20 -9
  14. data/ext/prism/extension.c +494 -119
  15. data/ext/prism/extension.h +1 -1
  16. data/include/prism/ast.h +3157 -747
  17. data/include/prism/defines.h +40 -8
  18. data/include/prism/diagnostic.h +36 -3
  19. data/include/prism/enc/pm_encoding.h +119 -28
  20. data/include/prism/node.h +38 -30
  21. data/include/prism/options.h +204 -0
  22. data/include/prism/pack.h +44 -33
  23. data/include/prism/parser.h +445 -199
  24. data/include/prism/prettyprint.h +26 -0
  25. data/include/prism/regexp.h +16 -2
  26. data/include/prism/util/pm_buffer.h +102 -18
  27. data/include/prism/util/pm_char.h +162 -48
  28. data/include/prism/util/pm_constant_pool.h +128 -34
  29. data/include/prism/util/pm_list.h +68 -38
  30. data/include/prism/util/pm_memchr.h +18 -3
  31. data/include/prism/util/pm_newline_list.h +71 -28
  32. data/include/prism/util/pm_state_stack.h +25 -7
  33. data/include/prism/util/pm_string.h +115 -27
  34. data/include/prism/util/pm_string_list.h +25 -6
  35. data/include/prism/util/pm_strncasecmp.h +32 -0
  36. data/include/prism/util/pm_strpbrk.h +31 -17
  37. data/include/prism/version.h +28 -3
  38. data/include/prism.h +229 -36
  39. data/lib/prism/compiler.rb +5 -5
  40. data/lib/prism/debug.rb +43 -13
  41. data/lib/prism/desugar_compiler.rb +1 -1
  42. data/lib/prism/dispatcher.rb +27 -26
  43. data/lib/prism/dsl.rb +16 -16
  44. data/lib/prism/ffi.rb +138 -61
  45. data/lib/prism/lex_compat.rb +26 -16
  46. data/lib/prism/mutation_compiler.rb +11 -11
  47. data/lib/prism/node.rb +426 -227
  48. data/lib/prism/node_ext.rb +23 -16
  49. data/lib/prism/node_inspector.rb +1 -1
  50. data/lib/prism/pack.rb +79 -40
  51. data/lib/prism/parse_result/comments.rb +7 -2
  52. data/lib/prism/parse_result/newlines.rb +4 -0
  53. data/lib/prism/parse_result.rb +157 -21
  54. data/lib/prism/pattern.rb +14 -3
  55. data/lib/prism/ripper_compat.rb +28 -10
  56. data/lib/prism/serialize.rb +935 -307
  57. data/lib/prism/visitor.rb +9 -5
  58. data/lib/prism.rb +20 -2
  59. data/prism.gemspec +11 -2
  60. data/rbi/prism.rbi +7305 -0
  61. data/rbi/prism_static.rbi +196 -0
  62. data/sig/prism.rbs +4468 -0
  63. data/sig/prism_static.rbs +123 -0
  64. data/src/diagnostic.c +56 -53
  65. data/src/enc/pm_big5.c +1 -0
  66. data/src/enc/pm_euc_jp.c +1 -0
  67. data/src/enc/pm_gbk.c +1 -0
  68. data/src/enc/pm_shift_jis.c +1 -0
  69. data/src/enc/pm_tables.c +316 -80
  70. data/src/enc/pm_unicode.c +54 -9
  71. data/src/enc/pm_windows_31j.c +1 -0
  72. data/src/node.c +357 -345
  73. data/src/options.c +170 -0
  74. data/src/prettyprint.c +7697 -1643
  75. data/src/prism.c +1964 -1125
  76. data/src/regexp.c +153 -95
  77. data/src/serialize.c +432 -397
  78. data/src/token_type.c +3 -1
  79. data/src/util/pm_buffer.c +88 -23
  80. data/src/util/pm_char.c +103 -57
  81. data/src/util/pm_constant_pool.c +52 -22
  82. data/src/util/pm_list.c +12 -4
  83. data/src/util/pm_memchr.c +5 -3
  84. data/src/util/pm_newline_list.c +25 -63
  85. data/src/util/pm_state_stack.c +9 -3
  86. data/src/util/pm_string.c +95 -85
  87. data/src/util/pm_string_list.c +14 -15
  88. data/src/util/pm_strncasecmp.c +10 -3
  89. data/src/util/pm_strpbrk.c +25 -19
  90. metadata +12 -3
  91. data/docs/prism.png +0 -0
data/sig/prism.rbs ADDED
@@ -0,0 +1,4468 @@
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
+ # when false
612
+ # end
613
+ # ^^^^^^^^^^
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 rest parameter to a method, block, or lambda definition.
2180
+ #
2181
+ # def a(**b)
2182
+ # ^^^
2183
+ # end
2184
+ class KeywordRestParameterNode < Node
2185
+ attr_reader name: Symbol?
2186
+ attr_reader name_loc: Location?
2187
+ attr_reader operator_loc: Location
2188
+
2189
+ def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
2190
+ def accept: (visitor: Visitor) -> void
2191
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2192
+ def child_nodes: () -> Array[Node?]
2193
+ def deconstruct: () -> Array[Node?]
2194
+
2195
+ def copy: (**untyped) -> KeywordRestParameterNode
2196
+
2197
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2198
+
2199
+ def operator: () -> String
2200
+
2201
+ def inspect: (inspector: NodeInspector) -> String
2202
+ end
2203
+ # Represents using a lambda literal (not the lambda method call).
2204
+ #
2205
+ # ->(value) { value * 2 }
2206
+ # ^^^^^^^^^^^^^^^^^^^^^^^
2207
+ class LambdaNode < Node
2208
+ attr_reader locals: Array[Symbol]
2209
+ attr_reader operator_loc: Location
2210
+ attr_reader opening_loc: Location
2211
+ attr_reader closing_loc: Location
2212
+ attr_reader parameters: BlockParametersNode?
2213
+ attr_reader body: Node?
2214
+
2215
+ def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, 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) -> LambdaNode
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 opening: () -> String
2228
+
2229
+ def closing: () -> String
2230
+
2231
+ def inspect: (inspector: NodeInspector) -> String
2232
+ end
2233
+ # Represents the use of the `&&=` operator for assignment to a local variable.
2234
+ #
2235
+ # target &&= value
2236
+ # ^^^^^^^^^^^^^^^^
2237
+ class LocalVariableAndWriteNode < Node
2238
+ attr_reader name_loc: Location
2239
+ attr_reader operator_loc: Location
2240
+ attr_reader value: Node
2241
+ attr_reader name: Symbol
2242
+ attr_reader depth: Integer
2243
+
2244
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
2245
+ def accept: (visitor: Visitor) -> void
2246
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2247
+ def child_nodes: () -> Array[Node?]
2248
+ def deconstruct: () -> Array[Node?]
2249
+
2250
+ def copy: (**untyped) -> LocalVariableAndWriteNode
2251
+
2252
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2253
+
2254
+ def operator: () -> String
2255
+
2256
+ def inspect: (inspector: NodeInspector) -> String
2257
+ end
2258
+ # Represents assigning to a local variable using an operator that isn't `=`.
2259
+ #
2260
+ # target += value
2261
+ # ^^^^^^^^^^^^^^^
2262
+ class LocalVariableOperatorWriteNode < Node
2263
+ attr_reader name_loc: Location
2264
+ attr_reader operator_loc: Location
2265
+ attr_reader value: Node
2266
+ attr_reader name: Symbol
2267
+ attr_reader operator: Symbol
2268
+ attr_reader depth: Integer
2269
+
2270
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: 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) -> LocalVariableOperatorWriteNode
2277
+
2278
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2279
+
2280
+ def inspect: (inspector: NodeInspector) -> String
2281
+ end
2282
+ # Represents the use of the `||=` operator for assignment to a local variable.
2283
+ #
2284
+ # target ||= value
2285
+ # ^^^^^^^^^^^^^^^^
2286
+ class LocalVariableOrWriteNode < Node
2287
+ attr_reader name_loc: Location
2288
+ attr_reader operator_loc: Location
2289
+ attr_reader value: Node
2290
+ attr_reader name: Symbol
2291
+ attr_reader depth: Integer
2292
+
2293
+ def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
2294
+ def accept: (visitor: Visitor) -> void
2295
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2296
+ def child_nodes: () -> Array[Node?]
2297
+ def deconstruct: () -> Array[Node?]
2298
+
2299
+ def copy: (**untyped) -> LocalVariableOrWriteNode
2300
+
2301
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2302
+
2303
+ def operator: () -> String
2304
+
2305
+ def inspect: (inspector: NodeInspector) -> String
2306
+ end
2307
+ # Represents reading a local variable. Note that this requires that a local
2308
+ # variable of the same name has already been written to in the same scope,
2309
+ # otherwise it is parsed as a method call.
2310
+ #
2311
+ # foo
2312
+ # ^^^
2313
+ class LocalVariableReadNode < Node
2314
+ attr_reader name: Symbol
2315
+ attr_reader depth: Integer
2316
+
2317
+ def initialize: (name: Symbol, depth: Integer, location: Location) -> void
2318
+ def accept: (visitor: Visitor) -> void
2319
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2320
+ def child_nodes: () -> Array[Node?]
2321
+ def deconstruct: () -> Array[Node?]
2322
+
2323
+ def copy: (**untyped) -> LocalVariableReadNode
2324
+
2325
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2326
+
2327
+ def inspect: (inspector: NodeInspector) -> String
2328
+ end
2329
+ # Represents writing to a local variable in a context that doesn't have an explicit value.
2330
+ #
2331
+ # foo, bar = baz
2332
+ # ^^^ ^^^
2333
+ class LocalVariableTargetNode < Node
2334
+ attr_reader name: Symbol
2335
+ attr_reader depth: Integer
2336
+
2337
+ def initialize: (name: Symbol, depth: Integer, location: Location) -> void
2338
+ def accept: (visitor: Visitor) -> void
2339
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2340
+ def child_nodes: () -> Array[Node?]
2341
+ def deconstruct: () -> Array[Node?]
2342
+
2343
+ def copy: (**untyped) -> LocalVariableTargetNode
2344
+
2345
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2346
+
2347
+ def inspect: (inspector: NodeInspector) -> String
2348
+ end
2349
+ # Represents writing to a local variable.
2350
+ #
2351
+ # foo = 1
2352
+ # ^^^^^^^
2353
+ class LocalVariableWriteNode < Node
2354
+ attr_reader name: Symbol
2355
+ attr_reader depth: Integer
2356
+ attr_reader name_loc: Location
2357
+ attr_reader value: Node
2358
+ attr_reader operator_loc: Location
2359
+
2360
+ def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
2361
+ def accept: (visitor: Visitor) -> void
2362
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2363
+ def child_nodes: () -> Array[Node?]
2364
+ def deconstruct: () -> Array[Node?]
2365
+
2366
+ def copy: (**untyped) -> LocalVariableWriteNode
2367
+
2368
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2369
+
2370
+ def operator: () -> String
2371
+
2372
+ def inspect: (inspector: NodeInspector) -> String
2373
+ end
2374
+ # Represents a regular expression literal used in the predicate of a
2375
+ # conditional to implicitly match against the last line read by an IO
2376
+ # object.
2377
+ #
2378
+ # if /foo/i then end
2379
+ # ^^^^^^
2380
+ class MatchLastLineNode < Node
2381
+ attr_reader opening_loc: Location
2382
+ attr_reader content_loc: Location
2383
+ attr_reader closing_loc: Location
2384
+ attr_reader unescaped: String
2385
+ attr_reader flags: Integer
2386
+
2387
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
2388
+ def accept: (visitor: Visitor) -> void
2389
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2390
+ def child_nodes: () -> Array[Node?]
2391
+ def deconstruct: () -> Array[Node?]
2392
+
2393
+ def copy: (**untyped) -> MatchLastLineNode
2394
+
2395
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2396
+
2397
+ def opening: () -> String
2398
+
2399
+ def content: () -> String
2400
+
2401
+ def closing: () -> String
2402
+
2403
+ def ignore_case?: () -> bool
2404
+
2405
+ def extended?: () -> bool
2406
+
2407
+ def multi_line?: () -> bool
2408
+
2409
+ def once?: () -> bool
2410
+
2411
+ def euc_jp?: () -> bool
2412
+
2413
+ def ascii_8bit?: () -> bool
2414
+
2415
+ def windows_31j?: () -> bool
2416
+
2417
+ def utf_8?: () -> bool
2418
+
2419
+ def inspect: (inspector: NodeInspector) -> String
2420
+ end
2421
+ # Represents the use of the modifier `in` operator.
2422
+ #
2423
+ # foo in bar
2424
+ # ^^^^^^^^^^
2425
+ class MatchPredicateNode < Node
2426
+ attr_reader value: Node
2427
+ attr_reader pattern: Node
2428
+ attr_reader operator_loc: Location
2429
+
2430
+ def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
2431
+ def accept: (visitor: Visitor) -> void
2432
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2433
+ def child_nodes: () -> Array[Node?]
2434
+ def deconstruct: () -> Array[Node?]
2435
+
2436
+ def copy: (**untyped) -> MatchPredicateNode
2437
+
2438
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2439
+
2440
+ def operator: () -> String
2441
+
2442
+ def inspect: (inspector: NodeInspector) -> String
2443
+ end
2444
+ # Represents the use of the `=>` operator.
2445
+ #
2446
+ # foo => bar
2447
+ # ^^^^^^^^^^
2448
+ class MatchRequiredNode < Node
2449
+ attr_reader value: Node
2450
+ attr_reader pattern: Node
2451
+ attr_reader operator_loc: Location
2452
+
2453
+ def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
2454
+ def accept: (visitor: Visitor) -> void
2455
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2456
+ def child_nodes: () -> Array[Node?]
2457
+ def deconstruct: () -> Array[Node?]
2458
+
2459
+ def copy: (**untyped) -> MatchRequiredNode
2460
+
2461
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2462
+
2463
+ def operator: () -> String
2464
+
2465
+ def inspect: (inspector: NodeInspector) -> String
2466
+ end
2467
+ # Represents writing local variables using a regular expression match with
2468
+ # named capture groups.
2469
+ #
2470
+ # /(?<foo>bar)/ =~ baz
2471
+ # ^^^^^^^^^^^^^^^^^^^^
2472
+ class MatchWriteNode < Node
2473
+ attr_reader call: CallNode
2474
+ attr_reader locals: Array[Symbol]
2475
+
2476
+ def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void
2477
+ def accept: (visitor: Visitor) -> void
2478
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2479
+ def child_nodes: () -> Array[Node?]
2480
+ def deconstruct: () -> Array[Node?]
2481
+
2482
+ def copy: (**untyped) -> MatchWriteNode
2483
+
2484
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2485
+
2486
+ def inspect: (inspector: NodeInspector) -> String
2487
+ end
2488
+ # Represents a node that is missing from the source and results in a syntax
2489
+ # error.
2490
+ class MissingNode < Node
2491
+
2492
+ def initialize: (location: Location) -> void
2493
+ def accept: (visitor: Visitor) -> void
2494
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2495
+ def child_nodes: () -> Array[Node?]
2496
+ def deconstruct: () -> Array[Node?]
2497
+
2498
+ def copy: (**untyped) -> MissingNode
2499
+
2500
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2501
+
2502
+ def inspect: (inspector: NodeInspector) -> String
2503
+ end
2504
+ # Represents a module declaration involving the `module` keyword.
2505
+ #
2506
+ # module Foo end
2507
+ # ^^^^^^^^^^^^^^
2508
+ class ModuleNode < Node
2509
+ attr_reader locals: Array[Symbol]
2510
+ attr_reader module_keyword_loc: Location
2511
+ attr_reader constant_path: Node
2512
+ attr_reader body: Node?
2513
+ attr_reader end_keyword_loc: Location
2514
+ attr_reader name: Symbol
2515
+
2516
+ def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void
2517
+ def accept: (visitor: Visitor) -> void
2518
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2519
+ def child_nodes: () -> Array[Node?]
2520
+ def deconstruct: () -> Array[Node?]
2521
+
2522
+ def copy: (**untyped) -> ModuleNode
2523
+
2524
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2525
+
2526
+ def module_keyword: () -> String
2527
+
2528
+ def end_keyword: () -> String
2529
+
2530
+ def inspect: (inspector: NodeInspector) -> String
2531
+ end
2532
+ # Represents a multi-target expression.
2533
+ #
2534
+ # a, (b, c) = 1, 2, 3
2535
+ # ^^^^^^
2536
+ class MultiTargetNode < Node
2537
+ attr_reader lefts: Array[Node]
2538
+ attr_reader rest: Node?
2539
+ attr_reader rights: Array[Node]
2540
+ attr_reader lparen_loc: Location?
2541
+ attr_reader rparen_loc: Location?
2542
+
2543
+ def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void
2544
+ def accept: (visitor: Visitor) -> void
2545
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2546
+ def child_nodes: () -> Array[Node?]
2547
+ def deconstruct: () -> Array[Node?]
2548
+
2549
+ def copy: (**untyped) -> MultiTargetNode
2550
+
2551
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2552
+
2553
+ def lparen: () -> String?
2554
+
2555
+ def rparen: () -> String?
2556
+
2557
+ def inspect: (inspector: NodeInspector) -> String
2558
+ end
2559
+ # Represents a write to a multi-target expression.
2560
+ #
2561
+ # a, b, c = 1, 2, 3
2562
+ # ^^^^^^^^^^^^^^^^^
2563
+ class MultiWriteNode < Node
2564
+ attr_reader lefts: Array[Node]
2565
+ attr_reader rest: Node?
2566
+ attr_reader rights: Array[Node]
2567
+ attr_reader lparen_loc: Location?
2568
+ attr_reader rparen_loc: Location?
2569
+ attr_reader operator_loc: Location
2570
+ attr_reader value: Node
2571
+
2572
+ def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void
2573
+ def accept: (visitor: Visitor) -> void
2574
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2575
+ def child_nodes: () -> Array[Node?]
2576
+ def deconstruct: () -> Array[Node?]
2577
+
2578
+ def copy: (**untyped) -> MultiWriteNode
2579
+
2580
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2581
+
2582
+ def lparen: () -> String?
2583
+
2584
+ def rparen: () -> String?
2585
+
2586
+ def operator: () -> String
2587
+
2588
+ def inspect: (inspector: NodeInspector) -> String
2589
+ end
2590
+ # Represents the use of the `next` keyword.
2591
+ #
2592
+ # next 1
2593
+ # ^^^^^^
2594
+ class NextNode < Node
2595
+ attr_reader arguments: ArgumentsNode?
2596
+ attr_reader keyword_loc: Location
2597
+
2598
+ def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, 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) -> NextNode
2605
+
2606
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2607
+
2608
+ def keyword: () -> String
2609
+
2610
+ def inspect: (inspector: NodeInspector) -> String
2611
+ end
2612
+ # Represents the use of the `nil` keyword.
2613
+ #
2614
+ # nil
2615
+ # ^^^
2616
+ class NilNode < Node
2617
+
2618
+ def initialize: (location: Location) -> void
2619
+ def accept: (visitor: Visitor) -> void
2620
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2621
+ def child_nodes: () -> Array[Node?]
2622
+ def deconstruct: () -> Array[Node?]
2623
+
2624
+ def copy: (**untyped) -> NilNode
2625
+
2626
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2627
+
2628
+ def inspect: (inspector: NodeInspector) -> String
2629
+ end
2630
+ # Represents the use of `**nil` inside method arguments.
2631
+ #
2632
+ # def a(**nil)
2633
+ # ^^^^^
2634
+ # end
2635
+ class NoKeywordsParameterNode < Node
2636
+ attr_reader operator_loc: Location
2637
+ attr_reader keyword_loc: Location
2638
+
2639
+ def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void
2640
+ def accept: (visitor: Visitor) -> void
2641
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2642
+ def child_nodes: () -> Array[Node?]
2643
+ def deconstruct: () -> Array[Node?]
2644
+
2645
+ def copy: (**untyped) -> NoKeywordsParameterNode
2646
+
2647
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2648
+
2649
+ def operator: () -> String
2650
+
2651
+ def keyword: () -> String
2652
+
2653
+ def inspect: (inspector: NodeInspector) -> String
2654
+ end
2655
+ # Represents reading a numbered reference to a capture in the previous match.
2656
+ #
2657
+ # $1
2658
+ # ^^
2659
+ class NumberedReferenceReadNode < Node
2660
+ attr_reader number: Integer
2661
+
2662
+ def initialize: (number: Integer, location: Location) -> void
2663
+ def accept: (visitor: Visitor) -> void
2664
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2665
+ def child_nodes: () -> Array[Node?]
2666
+ def deconstruct: () -> Array[Node?]
2667
+
2668
+ def copy: (**untyped) -> NumberedReferenceReadNode
2669
+
2670
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2671
+
2672
+ def inspect: (inspector: NodeInspector) -> String
2673
+ end
2674
+ # Represents an optional keyword parameter to a method, block, or lambda definition.
2675
+ #
2676
+ # def a(b: 1)
2677
+ # ^^^^
2678
+ # end
2679
+ class OptionalKeywordParameterNode < Node
2680
+ attr_reader name: Symbol
2681
+ attr_reader name_loc: Location
2682
+ attr_reader value: Node
2683
+
2684
+ def initialize: (name: Symbol, name_loc: Location, value: Node, location: Location) -> void
2685
+ def accept: (visitor: Visitor) -> void
2686
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2687
+ def child_nodes: () -> Array[Node?]
2688
+ def deconstruct: () -> Array[Node?]
2689
+
2690
+ def copy: (**untyped) -> OptionalKeywordParameterNode
2691
+
2692
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2693
+
2694
+ def inspect: (inspector: NodeInspector) -> String
2695
+ end
2696
+ # Represents an optional parameter to a method, block, or lambda definition.
2697
+ #
2698
+ # def a(b = 1)
2699
+ # ^^^^^
2700
+ # end
2701
+ class OptionalParameterNode < Node
2702
+ attr_reader name: Symbol
2703
+ attr_reader name_loc: Location
2704
+ attr_reader operator_loc: Location
2705
+ attr_reader value: Node
2706
+
2707
+ def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
2708
+ def accept: (visitor: Visitor) -> void
2709
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2710
+ def child_nodes: () -> Array[Node?]
2711
+ def deconstruct: () -> Array[Node?]
2712
+
2713
+ def copy: (**untyped) -> OptionalParameterNode
2714
+
2715
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2716
+
2717
+ def operator: () -> String
2718
+
2719
+ def inspect: (inspector: NodeInspector) -> String
2720
+ end
2721
+ # Represents the use of the `||` operator or the `or` keyword.
2722
+ #
2723
+ # left or right
2724
+ # ^^^^^^^^^^^^^
2725
+ class OrNode < Node
2726
+ attr_reader left: Node
2727
+ attr_reader right: Node
2728
+ attr_reader operator_loc: Location
2729
+
2730
+ def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
2731
+ def accept: (visitor: Visitor) -> void
2732
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2733
+ def child_nodes: () -> Array[Node?]
2734
+ def deconstruct: () -> Array[Node?]
2735
+
2736
+ def copy: (**untyped) -> OrNode
2737
+
2738
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2739
+
2740
+ def operator: () -> String
2741
+
2742
+ def inspect: (inspector: NodeInspector) -> String
2743
+ end
2744
+ # Represents the list of parameters on a method, block, or lambda definition.
2745
+ #
2746
+ # def a(b, c, d)
2747
+ # ^^^^^^^
2748
+ # end
2749
+ class ParametersNode < Node
2750
+ attr_reader requireds: Array[Node]
2751
+ attr_reader optionals: Array[Node]
2752
+ attr_reader rest: RestParameterNode?
2753
+ attr_reader posts: Array[Node]
2754
+ attr_reader keywords: Array[Node]
2755
+ attr_reader keyword_rest: Node?
2756
+ attr_reader block: BlockParameterNode?
2757
+
2758
+ def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
2759
+ def accept: (visitor: Visitor) -> void
2760
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2761
+ def child_nodes: () -> Array[Node?]
2762
+ def deconstruct: () -> Array[Node?]
2763
+
2764
+ def copy: (**untyped) -> ParametersNode
2765
+
2766
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2767
+
2768
+ def inspect: (inspector: NodeInspector) -> String
2769
+ end
2770
+ # Represents a parenthesized expression
2771
+ #
2772
+ # (10 + 34)
2773
+ # ^^^^^^^^^
2774
+ class ParenthesesNode < Node
2775
+ attr_reader body: Node?
2776
+ attr_reader opening_loc: Location
2777
+ attr_reader closing_loc: Location
2778
+
2779
+ def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
2780
+ def accept: (visitor: Visitor) -> void
2781
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2782
+ def child_nodes: () -> Array[Node?]
2783
+ def deconstruct: () -> Array[Node?]
2784
+
2785
+ def copy: (**untyped) -> ParenthesesNode
2786
+
2787
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2788
+
2789
+ def opening: () -> String
2790
+
2791
+ def closing: () -> String
2792
+
2793
+ def inspect: (inspector: NodeInspector) -> String
2794
+ end
2795
+ # Represents the use of the `^` operator for pinning an expression in a
2796
+ # pattern matching expression.
2797
+ #
2798
+ # foo in ^(bar)
2799
+ # ^^^^^^
2800
+ class PinnedExpressionNode < Node
2801
+ attr_reader expression: Node
2802
+ attr_reader operator_loc: Location
2803
+ attr_reader lparen_loc: Location
2804
+ attr_reader rparen_loc: Location
2805
+
2806
+ def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void
2807
+ def accept: (visitor: Visitor) -> void
2808
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2809
+ def child_nodes: () -> Array[Node?]
2810
+ def deconstruct: () -> Array[Node?]
2811
+
2812
+ def copy: (**untyped) -> PinnedExpressionNode
2813
+
2814
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2815
+
2816
+ def operator: () -> String
2817
+
2818
+ def lparen: () -> String
2819
+
2820
+ def rparen: () -> String
2821
+
2822
+ def inspect: (inspector: NodeInspector) -> String
2823
+ end
2824
+ # Represents the use of the `^` operator for pinning a variable in a pattern
2825
+ # matching expression.
2826
+ #
2827
+ # foo in ^bar
2828
+ # ^^^^
2829
+ class PinnedVariableNode < Node
2830
+ attr_reader variable: Node
2831
+ attr_reader operator_loc: Location
2832
+
2833
+ def initialize: (variable: Node, operator_loc: Location, location: Location) -> void
2834
+ def accept: (visitor: Visitor) -> void
2835
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2836
+ def child_nodes: () -> Array[Node?]
2837
+ def deconstruct: () -> Array[Node?]
2838
+
2839
+ def copy: (**untyped) -> PinnedVariableNode
2840
+
2841
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2842
+
2843
+ def operator: () -> String
2844
+
2845
+ def inspect: (inspector: NodeInspector) -> String
2846
+ end
2847
+ # Represents the use of the `END` keyword.
2848
+ #
2849
+ # END { foo }
2850
+ # ^^^^^^^^^^^
2851
+ class PostExecutionNode < Node
2852
+ attr_reader statements: StatementsNode?
2853
+ attr_reader keyword_loc: Location
2854
+ attr_reader opening_loc: Location
2855
+ attr_reader closing_loc: Location
2856
+
2857
+ def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
2858
+ def accept: (visitor: Visitor) -> void
2859
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2860
+ def child_nodes: () -> Array[Node?]
2861
+ def deconstruct: () -> Array[Node?]
2862
+
2863
+ def copy: (**untyped) -> PostExecutionNode
2864
+
2865
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2866
+
2867
+ def keyword: () -> String
2868
+
2869
+ def opening: () -> String
2870
+
2871
+ def closing: () -> String
2872
+
2873
+ def inspect: (inspector: NodeInspector) -> String
2874
+ end
2875
+ # Represents the use of the `BEGIN` keyword.
2876
+ #
2877
+ # BEGIN { foo }
2878
+ # ^^^^^^^^^^^^^
2879
+ class PreExecutionNode < Node
2880
+ attr_reader statements: StatementsNode?
2881
+ attr_reader keyword_loc: Location
2882
+ attr_reader opening_loc: Location
2883
+ attr_reader closing_loc: Location
2884
+
2885
+ def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
2886
+ def accept: (visitor: Visitor) -> void
2887
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2888
+ def child_nodes: () -> Array[Node?]
2889
+ def deconstruct: () -> Array[Node?]
2890
+
2891
+ def copy: (**untyped) -> PreExecutionNode
2892
+
2893
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2894
+
2895
+ def keyword: () -> String
2896
+
2897
+ def opening: () -> String
2898
+
2899
+ def closing: () -> String
2900
+
2901
+ def inspect: (inspector: NodeInspector) -> String
2902
+ end
2903
+ # The top level node of any parse tree.
2904
+ class ProgramNode < Node
2905
+ attr_reader locals: Array[Symbol]
2906
+ attr_reader statements: StatementsNode
2907
+
2908
+ def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void
2909
+ def accept: (visitor: Visitor) -> void
2910
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2911
+ def child_nodes: () -> Array[Node?]
2912
+ def deconstruct: () -> Array[Node?]
2913
+
2914
+ def copy: (**untyped) -> ProgramNode
2915
+
2916
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2917
+
2918
+ def inspect: (inspector: NodeInspector) -> String
2919
+ end
2920
+ # Represents the use of the `..` or `...` operators.
2921
+ #
2922
+ # 1..2
2923
+ # ^^^^
2924
+ #
2925
+ # c if a =~ /left/ ... b =~ /right/
2926
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2927
+ class RangeNode < Node
2928
+ attr_reader left: Node?
2929
+ attr_reader right: Node?
2930
+ attr_reader operator_loc: Location
2931
+ attr_reader flags: Integer
2932
+
2933
+ def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
2934
+ def accept: (visitor: Visitor) -> void
2935
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2936
+ def child_nodes: () -> Array[Node?]
2937
+ def deconstruct: () -> Array[Node?]
2938
+
2939
+ def copy: (**untyped) -> RangeNode
2940
+
2941
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2942
+
2943
+ def operator: () -> String
2944
+
2945
+ def exclude_end?: () -> bool
2946
+
2947
+ def inspect: (inspector: NodeInspector) -> String
2948
+ end
2949
+ # Represents a rational number literal.
2950
+ #
2951
+ # 1.0r
2952
+ # ^^^^
2953
+ class RationalNode < Node
2954
+ attr_reader numeric: Node
2955
+
2956
+ def initialize: (numeric: Node, location: Location) -> void
2957
+ def accept: (visitor: Visitor) -> void
2958
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2959
+ def child_nodes: () -> Array[Node?]
2960
+ def deconstruct: () -> Array[Node?]
2961
+
2962
+ def copy: (**untyped) -> RationalNode
2963
+
2964
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2965
+
2966
+ def inspect: (inspector: NodeInspector) -> String
2967
+ end
2968
+ # Represents the use of the `redo` keyword.
2969
+ #
2970
+ # redo
2971
+ # ^^^^
2972
+ class RedoNode < Node
2973
+
2974
+ def initialize: (location: Location) -> void
2975
+ def accept: (visitor: Visitor) -> void
2976
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
2977
+ def child_nodes: () -> Array[Node?]
2978
+ def deconstruct: () -> Array[Node?]
2979
+
2980
+ def copy: (**untyped) -> RedoNode
2981
+
2982
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
2983
+
2984
+ def inspect: (inspector: NodeInspector) -> String
2985
+ end
2986
+ # Represents a regular expression literal with no interpolation.
2987
+ #
2988
+ # /foo/i
2989
+ # ^^^^^^
2990
+ class RegularExpressionNode < Node
2991
+ attr_reader opening_loc: Location
2992
+ attr_reader content_loc: Location
2993
+ attr_reader closing_loc: Location
2994
+ attr_reader unescaped: String
2995
+ attr_reader flags: Integer
2996
+
2997
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
2998
+ def accept: (visitor: Visitor) -> void
2999
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3000
+ def child_nodes: () -> Array[Node?]
3001
+ def deconstruct: () -> Array[Node?]
3002
+
3003
+ def copy: (**untyped) -> RegularExpressionNode
3004
+
3005
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3006
+
3007
+ def opening: () -> String
3008
+
3009
+ def content: () -> String
3010
+
3011
+ def closing: () -> String
3012
+
3013
+ def ignore_case?: () -> bool
3014
+
3015
+ def extended?: () -> bool
3016
+
3017
+ def multi_line?: () -> bool
3018
+
3019
+ def once?: () -> bool
3020
+
3021
+ def euc_jp?: () -> bool
3022
+
3023
+ def ascii_8bit?: () -> bool
3024
+
3025
+ def windows_31j?: () -> bool
3026
+
3027
+ def utf_8?: () -> bool
3028
+
3029
+ def inspect: (inspector: NodeInspector) -> String
3030
+ end
3031
+ # Represents a required keyword parameter to a method, block, or lambda definition.
3032
+ #
3033
+ # def a(b: )
3034
+ # ^^
3035
+ # end
3036
+ class RequiredKeywordParameterNode < Node
3037
+ attr_reader name: Symbol
3038
+ attr_reader name_loc: Location
3039
+
3040
+ def initialize: (name: Symbol, name_loc: Location, location: Location) -> void
3041
+ def accept: (visitor: Visitor) -> void
3042
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3043
+ def child_nodes: () -> Array[Node?]
3044
+ def deconstruct: () -> Array[Node?]
3045
+
3046
+ def copy: (**untyped) -> RequiredKeywordParameterNode
3047
+
3048
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3049
+
3050
+ def inspect: (inspector: NodeInspector) -> String
3051
+ end
3052
+ # Represents a required parameter to a method, block, or lambda definition.
3053
+ #
3054
+ # def a(b)
3055
+ # ^
3056
+ # end
3057
+ class RequiredParameterNode < Node
3058
+ attr_reader name: Symbol
3059
+
3060
+ def initialize: (name: Symbol, location: Location) -> void
3061
+ def accept: (visitor: Visitor) -> void
3062
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3063
+ def child_nodes: () -> Array[Node?]
3064
+ def deconstruct: () -> Array[Node?]
3065
+
3066
+ def copy: (**untyped) -> RequiredParameterNode
3067
+
3068
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3069
+
3070
+ def inspect: (inspector: NodeInspector) -> String
3071
+ end
3072
+ # Represents an expression modified with a rescue.
3073
+ #
3074
+ # foo rescue nil
3075
+ # ^^^^^^^^^^^^^^
3076
+ class RescueModifierNode < Node
3077
+ attr_reader expression: Node
3078
+ attr_reader keyword_loc: Location
3079
+ attr_reader rescue_expression: Node
3080
+
3081
+ def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void
3082
+ def accept: (visitor: Visitor) -> void
3083
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3084
+ def child_nodes: () -> Array[Node?]
3085
+ def deconstruct: () -> Array[Node?]
3086
+
3087
+ def copy: (**untyped) -> RescueModifierNode
3088
+
3089
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3090
+
3091
+ def keyword: () -> String
3092
+
3093
+ def inspect: (inspector: NodeInspector) -> String
3094
+ end
3095
+ # Represents a rescue statement.
3096
+ #
3097
+ # begin
3098
+ # rescue Foo, *splat, Bar => ex
3099
+ # foo
3100
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3101
+ # end
3102
+ #
3103
+ # `Foo, *splat, Bar` are in the `exceptions` field.
3104
+ # `ex` is in the `exception` field.
3105
+ class RescueNode < Node
3106
+ attr_reader keyword_loc: Location
3107
+ attr_reader exceptions: Array[Node]
3108
+ attr_reader operator_loc: Location?
3109
+ attr_reader reference: Node?
3110
+ attr_reader statements: StatementsNode?
3111
+ attr_reader consequent: RescueNode?
3112
+
3113
+ def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void
3114
+ def accept: (visitor: Visitor) -> void
3115
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3116
+ def child_nodes: () -> Array[Node?]
3117
+ def deconstruct: () -> Array[Node?]
3118
+
3119
+ def copy: (**untyped) -> RescueNode
3120
+
3121
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3122
+
3123
+ def keyword: () -> String
3124
+
3125
+ def operator: () -> String?
3126
+
3127
+ def inspect: (inspector: NodeInspector) -> String
3128
+ end
3129
+ # Represents a rest parameter to a method, block, or lambda definition.
3130
+ #
3131
+ # def a(*b)
3132
+ # ^^
3133
+ # end
3134
+ class RestParameterNode < Node
3135
+ attr_reader name: Symbol?
3136
+ attr_reader name_loc: Location?
3137
+ attr_reader operator_loc: Location
3138
+
3139
+ def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
3140
+ def accept: (visitor: Visitor) -> void
3141
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3142
+ def child_nodes: () -> Array[Node?]
3143
+ def deconstruct: () -> Array[Node?]
3144
+
3145
+ def copy: (**untyped) -> RestParameterNode
3146
+
3147
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3148
+
3149
+ def operator: () -> String
3150
+
3151
+ def inspect: (inspector: NodeInspector) -> String
3152
+ end
3153
+ # Represents the use of the `retry` keyword.
3154
+ #
3155
+ # retry
3156
+ # ^^^^^
3157
+ class RetryNode < Node
3158
+
3159
+ def initialize: (location: Location) -> void
3160
+ def accept: (visitor: Visitor) -> void
3161
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3162
+ def child_nodes: () -> Array[Node?]
3163
+ def deconstruct: () -> Array[Node?]
3164
+
3165
+ def copy: (**untyped) -> RetryNode
3166
+
3167
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3168
+
3169
+ def inspect: (inspector: NodeInspector) -> String
3170
+ end
3171
+ # Represents the use of the `return` keyword.
3172
+ #
3173
+ # return 1
3174
+ # ^^^^^^^^
3175
+ class ReturnNode < Node
3176
+ attr_reader keyword_loc: Location
3177
+ attr_reader arguments: ArgumentsNode?
3178
+
3179
+ def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void
3180
+ def accept: (visitor: Visitor) -> void
3181
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3182
+ def child_nodes: () -> Array[Node?]
3183
+ def deconstruct: () -> Array[Node?]
3184
+
3185
+ def copy: (**untyped) -> ReturnNode
3186
+
3187
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3188
+
3189
+ def keyword: () -> String
3190
+
3191
+ def inspect: (inspector: NodeInspector) -> String
3192
+ end
3193
+ # Represents the `self` keyword.
3194
+ #
3195
+ # self
3196
+ # ^^^^
3197
+ class SelfNode < Node
3198
+
3199
+ def initialize: (location: Location) -> void
3200
+ def accept: (visitor: Visitor) -> void
3201
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3202
+ def child_nodes: () -> Array[Node?]
3203
+ def deconstruct: () -> Array[Node?]
3204
+
3205
+ def copy: (**untyped) -> SelfNode
3206
+
3207
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3208
+
3209
+ def inspect: (inspector: NodeInspector) -> String
3210
+ end
3211
+ # Represents a singleton class declaration involving the `class` keyword.
3212
+ #
3213
+ # class << self end
3214
+ # ^^^^^^^^^^^^^^^^^
3215
+ class SingletonClassNode < Node
3216
+ attr_reader locals: Array[Symbol]
3217
+ attr_reader class_keyword_loc: Location
3218
+ attr_reader operator_loc: Location
3219
+ attr_reader expression: Node
3220
+ attr_reader body: Node?
3221
+ attr_reader end_keyword_loc: Location
3222
+
3223
+ def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void
3224
+ def accept: (visitor: Visitor) -> void
3225
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3226
+ def child_nodes: () -> Array[Node?]
3227
+ def deconstruct: () -> Array[Node?]
3228
+
3229
+ def copy: (**untyped) -> SingletonClassNode
3230
+
3231
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3232
+
3233
+ def class_keyword: () -> String
3234
+
3235
+ def operator: () -> String
3236
+
3237
+ def end_keyword: () -> String
3238
+
3239
+ def inspect: (inspector: NodeInspector) -> String
3240
+ end
3241
+ # Represents the use of the `__ENCODING__` keyword.
3242
+ #
3243
+ # __ENCODING__
3244
+ # ^^^^^^^^^^^^
3245
+ class SourceEncodingNode < Node
3246
+
3247
+ def initialize: (location: Location) -> void
3248
+ def accept: (visitor: Visitor) -> void
3249
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3250
+ def child_nodes: () -> Array[Node?]
3251
+ def deconstruct: () -> Array[Node?]
3252
+
3253
+ def copy: (**untyped) -> SourceEncodingNode
3254
+
3255
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3256
+
3257
+ def inspect: (inspector: NodeInspector) -> String
3258
+ end
3259
+ # Represents the use of the `__FILE__` keyword.
3260
+ #
3261
+ # __FILE__
3262
+ # ^^^^^^^^
3263
+ class SourceFileNode < Node
3264
+ attr_reader filepath: String
3265
+
3266
+ def initialize: (filepath: String, location: Location) -> void
3267
+ def accept: (visitor: Visitor) -> void
3268
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3269
+ def child_nodes: () -> Array[Node?]
3270
+ def deconstruct: () -> Array[Node?]
3271
+
3272
+ def copy: (**untyped) -> SourceFileNode
3273
+
3274
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3275
+
3276
+ def inspect: (inspector: NodeInspector) -> String
3277
+ end
3278
+ # Represents the use of the `__LINE__` keyword.
3279
+ #
3280
+ # __LINE__
3281
+ # ^^^^^^^^
3282
+ class SourceLineNode < Node
3283
+
3284
+ def initialize: (location: Location) -> void
3285
+ def accept: (visitor: Visitor) -> void
3286
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3287
+ def child_nodes: () -> Array[Node?]
3288
+ def deconstruct: () -> Array[Node?]
3289
+
3290
+ def copy: (**untyped) -> SourceLineNode
3291
+
3292
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3293
+
3294
+ def inspect: (inspector: NodeInspector) -> String
3295
+ end
3296
+ # Represents the use of the splat operator.
3297
+ #
3298
+ # [*a]
3299
+ # ^^
3300
+ class SplatNode < Node
3301
+ attr_reader operator_loc: Location
3302
+ attr_reader expression: Node?
3303
+
3304
+ def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void
3305
+ def accept: (visitor: Visitor) -> void
3306
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3307
+ def child_nodes: () -> Array[Node?]
3308
+ def deconstruct: () -> Array[Node?]
3309
+
3310
+ def copy: (**untyped) -> SplatNode
3311
+
3312
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3313
+
3314
+ def operator: () -> String
3315
+
3316
+ def inspect: (inspector: NodeInspector) -> String
3317
+ end
3318
+ # Represents a set of statements contained within some scope.
3319
+ #
3320
+ # foo; bar; baz
3321
+ # ^^^^^^^^^^^^^
3322
+ class StatementsNode < Node
3323
+ attr_reader body: Array[Node]
3324
+
3325
+ def initialize: (body: Array[Node], location: Location) -> void
3326
+ def accept: (visitor: Visitor) -> void
3327
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3328
+ def child_nodes: () -> Array[Node?]
3329
+ def deconstruct: () -> Array[Node?]
3330
+
3331
+ def copy: (**untyped) -> StatementsNode
3332
+
3333
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3334
+
3335
+ def inspect: (inspector: NodeInspector) -> String
3336
+ end
3337
+ # Represents the use of compile-time string concatenation.
3338
+ #
3339
+ # "foo" "bar"
3340
+ # ^^^^^^^^^^^
3341
+ class StringConcatNode < Node
3342
+ attr_reader left: Node
3343
+ attr_reader right: Node
3344
+
3345
+ def initialize: (left: Node, right: Node, location: Location) -> void
3346
+ def accept: (visitor: Visitor) -> void
3347
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3348
+ def child_nodes: () -> Array[Node?]
3349
+ def deconstruct: () -> Array[Node?]
3350
+
3351
+ def copy: (**untyped) -> StringConcatNode
3352
+
3353
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3354
+
3355
+ def inspect: (inspector: NodeInspector) -> String
3356
+ end
3357
+ # Represents a string literal, a string contained within a `%w` list, or
3358
+ # plain string content within an interpolated string.
3359
+ #
3360
+ # "foo"
3361
+ # ^^^^^
3362
+ #
3363
+ # %w[foo]
3364
+ # ^^^
3365
+ #
3366
+ # "foo #{bar} baz"
3367
+ # ^^^^ ^^^^
3368
+ class StringNode < Node
3369
+ attr_reader flags: Integer
3370
+ attr_reader opening_loc: Location?
3371
+ attr_reader content_loc: Location
3372
+ attr_reader closing_loc: Location?
3373
+ attr_reader unescaped: String
3374
+
3375
+ def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void
3376
+ def accept: (visitor: Visitor) -> void
3377
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3378
+ def child_nodes: () -> Array[Node?]
3379
+ def deconstruct: () -> Array[Node?]
3380
+
3381
+ def copy: (**untyped) -> StringNode
3382
+
3383
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3384
+
3385
+ def frozen?: () -> bool
3386
+
3387
+ def opening: () -> String?
3388
+
3389
+ def content: () -> String
3390
+
3391
+ def closing: () -> String?
3392
+
3393
+ def inspect: (inspector: NodeInspector) -> String
3394
+ end
3395
+ # Represents the use of the `super` keyword with parentheses or arguments.
3396
+ #
3397
+ # super()
3398
+ # ^^^^^^^
3399
+ #
3400
+ # super foo, bar
3401
+ # ^^^^^^^^^^^^^^
3402
+ class SuperNode < Node
3403
+ attr_reader keyword_loc: Location
3404
+ attr_reader lparen_loc: Location?
3405
+ attr_reader arguments: ArgumentsNode?
3406
+ attr_reader rparen_loc: Location?
3407
+ attr_reader block: Node?
3408
+
3409
+ def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void
3410
+ def accept: (visitor: Visitor) -> void
3411
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3412
+ def child_nodes: () -> Array[Node?]
3413
+ def deconstruct: () -> Array[Node?]
3414
+
3415
+ def copy: (**untyped) -> SuperNode
3416
+
3417
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3418
+
3419
+ def keyword: () -> String
3420
+
3421
+ def lparen: () -> String?
3422
+
3423
+ def rparen: () -> String?
3424
+
3425
+ def inspect: (inspector: NodeInspector) -> String
3426
+ end
3427
+ # Represents a symbol literal or a symbol contained within a `%i` list.
3428
+ #
3429
+ # :foo
3430
+ # ^^^^
3431
+ #
3432
+ # %i[foo]
3433
+ # ^^^
3434
+ class SymbolNode < Node
3435
+ attr_reader opening_loc: Location?
3436
+ attr_reader value_loc: Location?
3437
+ attr_reader closing_loc: Location?
3438
+ attr_reader unescaped: String
3439
+
3440
+ def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
3441
+ def accept: (visitor: Visitor) -> void
3442
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3443
+ def child_nodes: () -> Array[Node?]
3444
+ def deconstruct: () -> Array[Node?]
3445
+
3446
+ def copy: (**untyped) -> SymbolNode
3447
+
3448
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3449
+
3450
+ def opening: () -> String?
3451
+
3452
+ def value: () -> String?
3453
+
3454
+ def closing: () -> String?
3455
+
3456
+ def inspect: (inspector: NodeInspector) -> String
3457
+ end
3458
+ # Represents the use of the literal `true` keyword.
3459
+ #
3460
+ # true
3461
+ # ^^^^
3462
+ class TrueNode < Node
3463
+
3464
+ def initialize: (location: Location) -> void
3465
+ def accept: (visitor: Visitor) -> void
3466
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3467
+ def child_nodes: () -> Array[Node?]
3468
+ def deconstruct: () -> Array[Node?]
3469
+
3470
+ def copy: (**untyped) -> TrueNode
3471
+
3472
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3473
+
3474
+ def inspect: (inspector: NodeInspector) -> String
3475
+ end
3476
+ # Represents the use of the `undef` keyword.
3477
+ #
3478
+ # undef :foo, :bar, :baz
3479
+ # ^^^^^^^^^^^^^^^^^^^^^^
3480
+ class UndefNode < Node
3481
+ attr_reader names: Array[Node]
3482
+ attr_reader keyword_loc: Location
3483
+
3484
+ def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void
3485
+ def accept: (visitor: Visitor) -> void
3486
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3487
+ def child_nodes: () -> Array[Node?]
3488
+ def deconstruct: () -> Array[Node?]
3489
+
3490
+ def copy: (**untyped) -> UndefNode
3491
+
3492
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3493
+
3494
+ def keyword: () -> String
3495
+
3496
+ def inspect: (inspector: NodeInspector) -> String
3497
+ end
3498
+ # Represents the use of the `unless` keyword, either in the block form or the modifier form.
3499
+ #
3500
+ # bar unless foo
3501
+ # ^^^^^^^^^^^^^^
3502
+ #
3503
+ # unless foo then bar end
3504
+ # ^^^^^^^^^^^^^^^^^^^^^^^
3505
+ class UnlessNode < Node
3506
+ attr_reader keyword_loc: Location
3507
+ attr_reader predicate: Node
3508
+ attr_reader statements: StatementsNode?
3509
+ attr_reader consequent: ElseNode?
3510
+ attr_reader end_keyword_loc: Location?
3511
+
3512
+ def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void
3513
+ def accept: (visitor: Visitor) -> void
3514
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3515
+ def child_nodes: () -> Array[Node?]
3516
+ def deconstruct: () -> Array[Node?]
3517
+
3518
+ def copy: (**untyped) -> UnlessNode
3519
+
3520
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3521
+
3522
+ def keyword: () -> String
3523
+
3524
+ def end_keyword: () -> String?
3525
+
3526
+ def inspect: (inspector: NodeInspector) -> String
3527
+ end
3528
+ # Represents the use of the `until` keyword, either in the block form or the modifier form.
3529
+ #
3530
+ # bar until foo
3531
+ # ^^^^^^^^^^^^^
3532
+ #
3533
+ # until foo do bar end
3534
+ # ^^^^^^^^^^^^^^^^^^^^
3535
+ class UntilNode < Node
3536
+ attr_reader keyword_loc: Location
3537
+ attr_reader closing_loc: Location?
3538
+ attr_reader predicate: Node
3539
+ attr_reader statements: StatementsNode?
3540
+ attr_reader flags: Integer
3541
+
3542
+ def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
3543
+ def accept: (visitor: Visitor) -> void
3544
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3545
+ def child_nodes: () -> Array[Node?]
3546
+ def deconstruct: () -> Array[Node?]
3547
+
3548
+ def copy: (**untyped) -> UntilNode
3549
+
3550
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3551
+
3552
+ def keyword: () -> String
3553
+
3554
+ def closing: () -> String?
3555
+
3556
+ def begin_modifier?: () -> bool
3557
+
3558
+ def inspect: (inspector: NodeInspector) -> String
3559
+ end
3560
+ # Represents the use of the `when` keyword within a case statement.
3561
+ #
3562
+ # case true
3563
+ # when true
3564
+ # ^^^^^^^^^
3565
+ # end
3566
+ class WhenNode < Node
3567
+ attr_reader keyword_loc: Location
3568
+ attr_reader conditions: Array[Node]
3569
+ attr_reader statements: StatementsNode?
3570
+
3571
+ def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void
3572
+ def accept: (visitor: Visitor) -> void
3573
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3574
+ def child_nodes: () -> Array[Node?]
3575
+ def deconstruct: () -> Array[Node?]
3576
+
3577
+ def copy: (**untyped) -> WhenNode
3578
+
3579
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3580
+
3581
+ def keyword: () -> String
3582
+
3583
+ def inspect: (inspector: NodeInspector) -> String
3584
+ end
3585
+ # Represents the use of the `while` keyword, either in the block form or the modifier form.
3586
+ #
3587
+ # bar while foo
3588
+ # ^^^^^^^^^^^^^
3589
+ #
3590
+ # while foo do bar end
3591
+ # ^^^^^^^^^^^^^^^^^^^^
3592
+ class WhileNode < Node
3593
+ attr_reader keyword_loc: Location
3594
+ attr_reader closing_loc: Location?
3595
+ attr_reader predicate: Node
3596
+ attr_reader statements: StatementsNode?
3597
+ attr_reader flags: Integer
3598
+
3599
+ def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
3600
+ def accept: (visitor: Visitor) -> void
3601
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3602
+ def child_nodes: () -> Array[Node?]
3603
+ def deconstruct: () -> Array[Node?]
3604
+
3605
+ def copy: (**untyped) -> WhileNode
3606
+
3607
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3608
+
3609
+ def keyword: () -> String
3610
+
3611
+ def closing: () -> String?
3612
+
3613
+ def begin_modifier?: () -> bool
3614
+
3615
+ def inspect: (inspector: NodeInspector) -> String
3616
+ end
3617
+ # Represents an xstring literal with no interpolation.
3618
+ #
3619
+ # `foo`
3620
+ # ^^^^^
3621
+ class XStringNode < Node
3622
+ attr_reader opening_loc: Location
3623
+ attr_reader content_loc: Location
3624
+ attr_reader closing_loc: Location
3625
+ attr_reader unescaped: String
3626
+
3627
+ def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
3628
+ def accept: (visitor: Visitor) -> void
3629
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3630
+ def child_nodes: () -> Array[Node?]
3631
+ def deconstruct: () -> Array[Node?]
3632
+
3633
+ def copy: (**untyped) -> XStringNode
3634
+
3635
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3636
+
3637
+ def opening: () -> String
3638
+
3639
+ def content: () -> String
3640
+
3641
+ def closing: () -> String
3642
+
3643
+ def inspect: (inspector: NodeInspector) -> String
3644
+ end
3645
+ # Represents the use of the `yield` keyword.
3646
+ #
3647
+ # yield 1
3648
+ # ^^^^^^^
3649
+ class YieldNode < Node
3650
+ attr_reader keyword_loc: Location
3651
+ attr_reader lparen_loc: Location?
3652
+ attr_reader arguments: ArgumentsNode?
3653
+ attr_reader rparen_loc: Location?
3654
+
3655
+ def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void
3656
+ def accept: (visitor: Visitor) -> void
3657
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
3658
+ def child_nodes: () -> Array[Node?]
3659
+ def deconstruct: () -> Array[Node?]
3660
+
3661
+ def copy: (**untyped) -> YieldNode
3662
+
3663
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
3664
+
3665
+ def keyword: () -> String
3666
+
3667
+ def lparen: () -> String?
3668
+
3669
+ def rparen: () -> String?
3670
+
3671
+ def inspect: (inspector: NodeInspector) -> String
3672
+ end
3673
+
3674
+ # Flags for arguments nodes.
3675
+ module ArgumentsNodeFlags
3676
+ # if arguments contain keyword splat
3677
+ KEYWORD_SPLAT: Integer
3678
+ end
3679
+
3680
+ # Flags for call nodes.
3681
+ module CallNodeFlags
3682
+ # &. operator
3683
+ SAFE_NAVIGATION: Integer
3684
+ # a call that could have been a local variable
3685
+ VARIABLE_CALL: Integer
3686
+ end
3687
+
3688
+ # Flags for integer nodes that correspond to the base of the integer.
3689
+ module IntegerBaseFlags
3690
+ # 0b prefix
3691
+ BINARY: Integer
3692
+ # 0o or 0 prefix
3693
+ OCTAL: Integer
3694
+ # 0d or no prefix
3695
+ DECIMAL: Integer
3696
+ # 0x prefix
3697
+ HEXADECIMAL: Integer
3698
+ end
3699
+
3700
+ # Flags for while and until loop nodes.
3701
+ module LoopFlags
3702
+ # a loop after a begin statement, so the body is executed first before the condition
3703
+ BEGIN_MODIFIER: Integer
3704
+ end
3705
+
3706
+ # Flags for range and flip-flop nodes.
3707
+ module RangeFlags
3708
+ # ... operator
3709
+ EXCLUDE_END: Integer
3710
+ end
3711
+
3712
+ # Flags for regular expression and match last line nodes.
3713
+ module RegularExpressionFlags
3714
+ # i - ignores the case of characters when matching
3715
+ IGNORE_CASE: Integer
3716
+ # x - ignores whitespace and allows comments in regular expressions
3717
+ EXTENDED: Integer
3718
+ # m - allows $ to match the end of lines within strings
3719
+ MULTI_LINE: Integer
3720
+ # o - only interpolates values into the regular expression once
3721
+ ONCE: Integer
3722
+ # e - forces the EUC-JP encoding
3723
+ EUC_JP: Integer
3724
+ # n - forces the ASCII-8BIT encoding
3725
+ ASCII_8BIT: Integer
3726
+ # s - forces the Windows-31J encoding
3727
+ WINDOWS_31J: Integer
3728
+ # u - forces the UTF-8 encoding
3729
+ UTF_8: Integer
3730
+ end
3731
+
3732
+ # Flags for string nodes.
3733
+ module StringFlags
3734
+ # frozen by virtue of a `frozen_string_literal` comment
3735
+ FROZEN: Integer
3736
+ end
3737
+
3738
+
3739
+ class Visitor < BasicVisitor
3740
+ # Visit a AliasGlobalVariableNode node
3741
+ def visit_alias_global_variable_node: (node: AliasGlobalVariableNode) -> void
3742
+
3743
+ # Visit a AliasMethodNode node
3744
+ def visit_alias_method_node: (node: AliasMethodNode) -> void
3745
+
3746
+ # Visit a AlternationPatternNode node
3747
+ def visit_alternation_pattern_node: (node: AlternationPatternNode) -> void
3748
+
3749
+ # Visit a AndNode node
3750
+ def visit_and_node: (node: AndNode) -> void
3751
+
3752
+ # Visit a ArgumentsNode node
3753
+ def visit_arguments_node: (node: ArgumentsNode) -> void
3754
+
3755
+ # Visit a ArrayNode node
3756
+ def visit_array_node: (node: ArrayNode) -> void
3757
+
3758
+ # Visit a ArrayPatternNode node
3759
+ def visit_array_pattern_node: (node: ArrayPatternNode) -> void
3760
+
3761
+ # Visit a AssocNode node
3762
+ def visit_assoc_node: (node: AssocNode) -> void
3763
+
3764
+ # Visit a AssocSplatNode node
3765
+ def visit_assoc_splat_node: (node: AssocSplatNode) -> void
3766
+
3767
+ # Visit a BackReferenceReadNode node
3768
+ def visit_back_reference_read_node: (node: BackReferenceReadNode) -> void
3769
+
3770
+ # Visit a BeginNode node
3771
+ def visit_begin_node: (node: BeginNode) -> void
3772
+
3773
+ # Visit a BlockArgumentNode node
3774
+ def visit_block_argument_node: (node: BlockArgumentNode) -> void
3775
+
3776
+ # Visit a BlockLocalVariableNode node
3777
+ def visit_block_local_variable_node: (node: BlockLocalVariableNode) -> void
3778
+
3779
+ # Visit a BlockNode node
3780
+ def visit_block_node: (node: BlockNode) -> void
3781
+
3782
+ # Visit a BlockParameterNode node
3783
+ def visit_block_parameter_node: (node: BlockParameterNode) -> void
3784
+
3785
+ # Visit a BlockParametersNode node
3786
+ def visit_block_parameters_node: (node: BlockParametersNode) -> void
3787
+
3788
+ # Visit a BreakNode node
3789
+ def visit_break_node: (node: BreakNode) -> void
3790
+
3791
+ # Visit a CallAndWriteNode node
3792
+ def visit_call_and_write_node: (node: CallAndWriteNode) -> void
3793
+
3794
+ # Visit a CallNode node
3795
+ def visit_call_node: (node: CallNode) -> void
3796
+
3797
+ # Visit a CallOperatorWriteNode node
3798
+ def visit_call_operator_write_node: (node: CallOperatorWriteNode) -> void
3799
+
3800
+ # Visit a CallOrWriteNode node
3801
+ def visit_call_or_write_node: (node: CallOrWriteNode) -> void
3802
+
3803
+ # Visit a CapturePatternNode node
3804
+ def visit_capture_pattern_node: (node: CapturePatternNode) -> void
3805
+
3806
+ # Visit a CaseNode node
3807
+ def visit_case_node: (node: CaseNode) -> void
3808
+
3809
+ # Visit a ClassNode node
3810
+ def visit_class_node: (node: ClassNode) -> void
3811
+
3812
+ # Visit a ClassVariableAndWriteNode node
3813
+ def visit_class_variable_and_write_node: (node: ClassVariableAndWriteNode) -> void
3814
+
3815
+ # Visit a ClassVariableOperatorWriteNode node
3816
+ def visit_class_variable_operator_write_node: (node: ClassVariableOperatorWriteNode) -> void
3817
+
3818
+ # Visit a ClassVariableOrWriteNode node
3819
+ def visit_class_variable_or_write_node: (node: ClassVariableOrWriteNode) -> void
3820
+
3821
+ # Visit a ClassVariableReadNode node
3822
+ def visit_class_variable_read_node: (node: ClassVariableReadNode) -> void
3823
+
3824
+ # Visit a ClassVariableTargetNode node
3825
+ def visit_class_variable_target_node: (node: ClassVariableTargetNode) -> void
3826
+
3827
+ # Visit a ClassVariableWriteNode node
3828
+ def visit_class_variable_write_node: (node: ClassVariableWriteNode) -> void
3829
+
3830
+ # Visit a ConstantAndWriteNode node
3831
+ def visit_constant_and_write_node: (node: ConstantAndWriteNode) -> void
3832
+
3833
+ # Visit a ConstantOperatorWriteNode node
3834
+ def visit_constant_operator_write_node: (node: ConstantOperatorWriteNode) -> void
3835
+
3836
+ # Visit a ConstantOrWriteNode node
3837
+ def visit_constant_or_write_node: (node: ConstantOrWriteNode) -> void
3838
+
3839
+ # Visit a ConstantPathAndWriteNode node
3840
+ def visit_constant_path_and_write_node: (node: ConstantPathAndWriteNode) -> void
3841
+
3842
+ # Visit a ConstantPathNode node
3843
+ def visit_constant_path_node: (node: ConstantPathNode) -> void
3844
+
3845
+ # Visit a ConstantPathOperatorWriteNode node
3846
+ def visit_constant_path_operator_write_node: (node: ConstantPathOperatorWriteNode) -> void
3847
+
3848
+ # Visit a ConstantPathOrWriteNode node
3849
+ def visit_constant_path_or_write_node: (node: ConstantPathOrWriteNode) -> void
3850
+
3851
+ # Visit a ConstantPathTargetNode node
3852
+ def visit_constant_path_target_node: (node: ConstantPathTargetNode) -> void
3853
+
3854
+ # Visit a ConstantPathWriteNode node
3855
+ def visit_constant_path_write_node: (node: ConstantPathWriteNode) -> void
3856
+
3857
+ # Visit a ConstantReadNode node
3858
+ def visit_constant_read_node: (node: ConstantReadNode) -> void
3859
+
3860
+ # Visit a ConstantTargetNode node
3861
+ def visit_constant_target_node: (node: ConstantTargetNode) -> void
3862
+
3863
+ # Visit a ConstantWriteNode node
3864
+ def visit_constant_write_node: (node: ConstantWriteNode) -> void
3865
+
3866
+ # Visit a DefNode node
3867
+ def visit_def_node: (node: DefNode) -> void
3868
+
3869
+ # Visit a DefinedNode node
3870
+ def visit_defined_node: (node: DefinedNode) -> void
3871
+
3872
+ # Visit a ElseNode node
3873
+ def visit_else_node: (node: ElseNode) -> void
3874
+
3875
+ # Visit a EmbeddedStatementsNode node
3876
+ def visit_embedded_statements_node: (node: EmbeddedStatementsNode) -> void
3877
+
3878
+ # Visit a EmbeddedVariableNode node
3879
+ def visit_embedded_variable_node: (node: EmbeddedVariableNode) -> void
3880
+
3881
+ # Visit a EnsureNode node
3882
+ def visit_ensure_node: (node: EnsureNode) -> void
3883
+
3884
+ # Visit a FalseNode node
3885
+ def visit_false_node: (node: FalseNode) -> void
3886
+
3887
+ # Visit a FindPatternNode node
3888
+ def visit_find_pattern_node: (node: FindPatternNode) -> void
3889
+
3890
+ # Visit a FlipFlopNode node
3891
+ def visit_flip_flop_node: (node: FlipFlopNode) -> void
3892
+
3893
+ # Visit a FloatNode node
3894
+ def visit_float_node: (node: FloatNode) -> void
3895
+
3896
+ # Visit a ForNode node
3897
+ def visit_for_node: (node: ForNode) -> void
3898
+
3899
+ # Visit a ForwardingArgumentsNode node
3900
+ def visit_forwarding_arguments_node: (node: ForwardingArgumentsNode) -> void
3901
+
3902
+ # Visit a ForwardingParameterNode node
3903
+ def visit_forwarding_parameter_node: (node: ForwardingParameterNode) -> void
3904
+
3905
+ # Visit a ForwardingSuperNode node
3906
+ def visit_forwarding_super_node: (node: ForwardingSuperNode) -> void
3907
+
3908
+ # Visit a GlobalVariableAndWriteNode node
3909
+ def visit_global_variable_and_write_node: (node: GlobalVariableAndWriteNode) -> void
3910
+
3911
+ # Visit a GlobalVariableOperatorWriteNode node
3912
+ def visit_global_variable_operator_write_node: (node: GlobalVariableOperatorWriteNode) -> void
3913
+
3914
+ # Visit a GlobalVariableOrWriteNode node
3915
+ def visit_global_variable_or_write_node: (node: GlobalVariableOrWriteNode) -> void
3916
+
3917
+ # Visit a GlobalVariableReadNode node
3918
+ def visit_global_variable_read_node: (node: GlobalVariableReadNode) -> void
3919
+
3920
+ # Visit a GlobalVariableTargetNode node
3921
+ def visit_global_variable_target_node: (node: GlobalVariableTargetNode) -> void
3922
+
3923
+ # Visit a GlobalVariableWriteNode node
3924
+ def visit_global_variable_write_node: (node: GlobalVariableWriteNode) -> void
3925
+
3926
+ # Visit a HashNode node
3927
+ def visit_hash_node: (node: HashNode) -> void
3928
+
3929
+ # Visit a HashPatternNode node
3930
+ def visit_hash_pattern_node: (node: HashPatternNode) -> void
3931
+
3932
+ # Visit a IfNode node
3933
+ def visit_if_node: (node: IfNode) -> void
3934
+
3935
+ # Visit a ImaginaryNode node
3936
+ def visit_imaginary_node: (node: ImaginaryNode) -> void
3937
+
3938
+ # Visit a ImplicitNode node
3939
+ def visit_implicit_node: (node: ImplicitNode) -> void
3940
+
3941
+ # Visit a InNode node
3942
+ def visit_in_node: (node: InNode) -> void
3943
+
3944
+ # Visit a IndexAndWriteNode node
3945
+ def visit_index_and_write_node: (node: IndexAndWriteNode) -> void
3946
+
3947
+ # Visit a IndexOperatorWriteNode node
3948
+ def visit_index_operator_write_node: (node: IndexOperatorWriteNode) -> void
3949
+
3950
+ # Visit a IndexOrWriteNode node
3951
+ def visit_index_or_write_node: (node: IndexOrWriteNode) -> void
3952
+
3953
+ # Visit a InstanceVariableAndWriteNode node
3954
+ def visit_instance_variable_and_write_node: (node: InstanceVariableAndWriteNode) -> void
3955
+
3956
+ # Visit a InstanceVariableOperatorWriteNode node
3957
+ def visit_instance_variable_operator_write_node: (node: InstanceVariableOperatorWriteNode) -> void
3958
+
3959
+ # Visit a InstanceVariableOrWriteNode node
3960
+ def visit_instance_variable_or_write_node: (node: InstanceVariableOrWriteNode) -> void
3961
+
3962
+ # Visit a InstanceVariableReadNode node
3963
+ def visit_instance_variable_read_node: (node: InstanceVariableReadNode) -> void
3964
+
3965
+ # Visit a InstanceVariableTargetNode node
3966
+ def visit_instance_variable_target_node: (node: InstanceVariableTargetNode) -> void
3967
+
3968
+ # Visit a InstanceVariableWriteNode node
3969
+ def visit_instance_variable_write_node: (node: InstanceVariableWriteNode) -> void
3970
+
3971
+ # Visit a IntegerNode node
3972
+ def visit_integer_node: (node: IntegerNode) -> void
3973
+
3974
+ # Visit a InterpolatedMatchLastLineNode node
3975
+ def visit_interpolated_match_last_line_node: (node: InterpolatedMatchLastLineNode) -> void
3976
+
3977
+ # Visit a InterpolatedRegularExpressionNode node
3978
+ def visit_interpolated_regular_expression_node: (node: InterpolatedRegularExpressionNode) -> void
3979
+
3980
+ # Visit a InterpolatedStringNode node
3981
+ def visit_interpolated_string_node: (node: InterpolatedStringNode) -> void
3982
+
3983
+ # Visit a InterpolatedSymbolNode node
3984
+ def visit_interpolated_symbol_node: (node: InterpolatedSymbolNode) -> void
3985
+
3986
+ # Visit a InterpolatedXStringNode node
3987
+ def visit_interpolated_x_string_node: (node: InterpolatedXStringNode) -> void
3988
+
3989
+ # Visit a KeywordHashNode node
3990
+ def visit_keyword_hash_node: (node: KeywordHashNode) -> void
3991
+
3992
+ # Visit a KeywordRestParameterNode node
3993
+ def visit_keyword_rest_parameter_node: (node: KeywordRestParameterNode) -> void
3994
+
3995
+ # Visit a LambdaNode node
3996
+ def visit_lambda_node: (node: LambdaNode) -> void
3997
+
3998
+ # Visit a LocalVariableAndWriteNode node
3999
+ def visit_local_variable_and_write_node: (node: LocalVariableAndWriteNode) -> void
4000
+
4001
+ # Visit a LocalVariableOperatorWriteNode node
4002
+ def visit_local_variable_operator_write_node: (node: LocalVariableOperatorWriteNode) -> void
4003
+
4004
+ # Visit a LocalVariableOrWriteNode node
4005
+ def visit_local_variable_or_write_node: (node: LocalVariableOrWriteNode) -> void
4006
+
4007
+ # Visit a LocalVariableReadNode node
4008
+ def visit_local_variable_read_node: (node: LocalVariableReadNode) -> void
4009
+
4010
+ # Visit a LocalVariableTargetNode node
4011
+ def visit_local_variable_target_node: (node: LocalVariableTargetNode) -> void
4012
+
4013
+ # Visit a LocalVariableWriteNode node
4014
+ def visit_local_variable_write_node: (node: LocalVariableWriteNode) -> void
4015
+
4016
+ # Visit a MatchLastLineNode node
4017
+ def visit_match_last_line_node: (node: MatchLastLineNode) -> void
4018
+
4019
+ # Visit a MatchPredicateNode node
4020
+ def visit_match_predicate_node: (node: MatchPredicateNode) -> void
4021
+
4022
+ # Visit a MatchRequiredNode node
4023
+ def visit_match_required_node: (node: MatchRequiredNode) -> void
4024
+
4025
+ # Visit a MatchWriteNode node
4026
+ def visit_match_write_node: (node: MatchWriteNode) -> void
4027
+
4028
+ # Visit a MissingNode node
4029
+ def visit_missing_node: (node: MissingNode) -> void
4030
+
4031
+ # Visit a ModuleNode node
4032
+ def visit_module_node: (node: ModuleNode) -> void
4033
+
4034
+ # Visit a MultiTargetNode node
4035
+ def visit_multi_target_node: (node: MultiTargetNode) -> void
4036
+
4037
+ # Visit a MultiWriteNode node
4038
+ def visit_multi_write_node: (node: MultiWriteNode) -> void
4039
+
4040
+ # Visit a NextNode node
4041
+ def visit_next_node: (node: NextNode) -> void
4042
+
4043
+ # Visit a NilNode node
4044
+ def visit_nil_node: (node: NilNode) -> void
4045
+
4046
+ # Visit a NoKeywordsParameterNode node
4047
+ def visit_no_keywords_parameter_node: (node: NoKeywordsParameterNode) -> void
4048
+
4049
+ # Visit a NumberedReferenceReadNode node
4050
+ def visit_numbered_reference_read_node: (node: NumberedReferenceReadNode) -> void
4051
+
4052
+ # Visit a OptionalKeywordParameterNode node
4053
+ def visit_optional_keyword_parameter_node: (node: OptionalKeywordParameterNode) -> void
4054
+
4055
+ # Visit a OptionalParameterNode node
4056
+ def visit_optional_parameter_node: (node: OptionalParameterNode) -> void
4057
+
4058
+ # Visit a OrNode node
4059
+ def visit_or_node: (node: OrNode) -> void
4060
+
4061
+ # Visit a ParametersNode node
4062
+ def visit_parameters_node: (node: ParametersNode) -> void
4063
+
4064
+ # Visit a ParenthesesNode node
4065
+ def visit_parentheses_node: (node: ParenthesesNode) -> void
4066
+
4067
+ # Visit a PinnedExpressionNode node
4068
+ def visit_pinned_expression_node: (node: PinnedExpressionNode) -> void
4069
+
4070
+ # Visit a PinnedVariableNode node
4071
+ def visit_pinned_variable_node: (node: PinnedVariableNode) -> void
4072
+
4073
+ # Visit a PostExecutionNode node
4074
+ def visit_post_execution_node: (node: PostExecutionNode) -> void
4075
+
4076
+ # Visit a PreExecutionNode node
4077
+ def visit_pre_execution_node: (node: PreExecutionNode) -> void
4078
+
4079
+ # Visit a ProgramNode node
4080
+ def visit_program_node: (node: ProgramNode) -> void
4081
+
4082
+ # Visit a RangeNode node
4083
+ def visit_range_node: (node: RangeNode) -> void
4084
+
4085
+ # Visit a RationalNode node
4086
+ def visit_rational_node: (node: RationalNode) -> void
4087
+
4088
+ # Visit a RedoNode node
4089
+ def visit_redo_node: (node: RedoNode) -> void
4090
+
4091
+ # Visit a RegularExpressionNode node
4092
+ def visit_regular_expression_node: (node: RegularExpressionNode) -> void
4093
+
4094
+ # Visit a RequiredKeywordParameterNode node
4095
+ def visit_required_keyword_parameter_node: (node: RequiredKeywordParameterNode) -> void
4096
+
4097
+ # Visit a RequiredParameterNode node
4098
+ def visit_required_parameter_node: (node: RequiredParameterNode) -> void
4099
+
4100
+ # Visit a RescueModifierNode node
4101
+ def visit_rescue_modifier_node: (node: RescueModifierNode) -> void
4102
+
4103
+ # Visit a RescueNode node
4104
+ def visit_rescue_node: (node: RescueNode) -> void
4105
+
4106
+ # Visit a RestParameterNode node
4107
+ def visit_rest_parameter_node: (node: RestParameterNode) -> void
4108
+
4109
+ # Visit a RetryNode node
4110
+ def visit_retry_node: (node: RetryNode) -> void
4111
+
4112
+ # Visit a ReturnNode node
4113
+ def visit_return_node: (node: ReturnNode) -> void
4114
+
4115
+ # Visit a SelfNode node
4116
+ def visit_self_node: (node: SelfNode) -> void
4117
+
4118
+ # Visit a SingletonClassNode node
4119
+ def visit_singleton_class_node: (node: SingletonClassNode) -> void
4120
+
4121
+ # Visit a SourceEncodingNode node
4122
+ def visit_source_encoding_node: (node: SourceEncodingNode) -> void
4123
+
4124
+ # Visit a SourceFileNode node
4125
+ def visit_source_file_node: (node: SourceFileNode) -> void
4126
+
4127
+ # Visit a SourceLineNode node
4128
+ def visit_source_line_node: (node: SourceLineNode) -> void
4129
+
4130
+ # Visit a SplatNode node
4131
+ def visit_splat_node: (node: SplatNode) -> void
4132
+
4133
+ # Visit a StatementsNode node
4134
+ def visit_statements_node: (node: StatementsNode) -> void
4135
+
4136
+ # Visit a StringConcatNode node
4137
+ def visit_string_concat_node: (node: StringConcatNode) -> void
4138
+
4139
+ # Visit a StringNode node
4140
+ def visit_string_node: (node: StringNode) -> void
4141
+
4142
+ # Visit a SuperNode node
4143
+ def visit_super_node: (node: SuperNode) -> void
4144
+
4145
+ # Visit a SymbolNode node
4146
+ def visit_symbol_node: (node: SymbolNode) -> void
4147
+
4148
+ # Visit a TrueNode node
4149
+ def visit_true_node: (node: TrueNode) -> void
4150
+
4151
+ # Visit a UndefNode node
4152
+ def visit_undef_node: (node: UndefNode) -> void
4153
+
4154
+ # Visit a UnlessNode node
4155
+ def visit_unless_node: (node: UnlessNode) -> void
4156
+
4157
+ # Visit a UntilNode node
4158
+ def visit_until_node: (node: UntilNode) -> void
4159
+
4160
+ # Visit a WhenNode node
4161
+ def visit_when_node: (node: WhenNode) -> void
4162
+
4163
+ # Visit a WhileNode node
4164
+ def visit_while_node: (node: WhileNode) -> void
4165
+
4166
+ # Visit a XStringNode node
4167
+ def visit_x_string_node: (node: XStringNode) -> void
4168
+
4169
+ # Visit a YieldNode node
4170
+ def visit_yield_node: (node: YieldNode) -> void
4171
+ end
4172
+
4173
+ module DSL
4174
+ private
4175
+
4176
+ # Create a new Location object
4177
+ def Location: (source: Source?, start_offset: Integer, length: Integer) -> Location
4178
+
4179
+ # Create a new AliasGlobalVariableNode node
4180
+ def AliasGlobalVariableNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasGlobalVariableNode
4181
+ # Create a new AliasMethodNode node
4182
+ def AliasMethodNode: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> AliasMethodNode
4183
+ # Create a new AlternationPatternNode node
4184
+ def AlternationPatternNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AlternationPatternNode
4185
+ # Create a new AndNode node
4186
+ def AndNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AndNode
4187
+ # Create a new ArgumentsNode node
4188
+ def ArgumentsNode: (arguments: Array[Node], flags: Integer, location: Location) -> ArgumentsNode
4189
+ # Create a new ArrayNode node
4190
+ def ArrayNode: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
4191
+ # Create a new ArrayPatternNode node
4192
+ def ArrayPatternNode: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayPatternNode
4193
+ # Create a new AssocNode node
4194
+ def AssocNode: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> AssocNode
4195
+ # Create a new AssocSplatNode node
4196
+ def AssocSplatNode: (value: Node?, operator_loc: Location, location: Location) -> AssocSplatNode
4197
+ # Create a new BackReferenceReadNode node
4198
+ def BackReferenceReadNode: (name: Symbol, location: Location) -> BackReferenceReadNode
4199
+ # Create a new BeginNode node
4200
+ def BeginNode: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> BeginNode
4201
+ # Create a new BlockArgumentNode node
4202
+ def BlockArgumentNode: (expression: Node?, operator_loc: Location, location: Location) -> BlockArgumentNode
4203
+ # Create a new BlockLocalVariableNode node
4204
+ def BlockLocalVariableNode: (name: Symbol, location: Location) -> BlockLocalVariableNode
4205
+ # Create a new BlockNode node
4206
+ def BlockNode: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode
4207
+ # Create a new BlockParameterNode node
4208
+ def BlockParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode
4209
+ # Create a new BlockParametersNode node
4210
+ def BlockParametersNode: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> BlockParametersNode
4211
+ # Create a new BreakNode node
4212
+ def BreakNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> BreakNode
4213
+ # Create a new CallAndWriteNode node
4214
+ 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
4215
+ # Create a new CallNode node
4216
+ 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
4217
+ # Create a new CallOperatorWriteNode node
4218
+ 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
4219
+ # Create a new CallOrWriteNode node
4220
+ 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
4221
+ # Create a new CapturePatternNode node
4222
+ def CapturePatternNode: (value: Node, target: Node, operator_loc: Location, location: Location) -> CapturePatternNode
4223
+ # Create a new CaseNode node
4224
+ def CaseNode: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> CaseNode
4225
+ # Create a new ClassNode node
4226
+ 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
4227
+ # Create a new ClassVariableAndWriteNode node
4228
+ def ClassVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ClassVariableAndWriteNode
4229
+ # Create a new ClassVariableOperatorWriteNode node
4230
+ def ClassVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ClassVariableOperatorWriteNode
4231
+ # Create a new ClassVariableOrWriteNode node
4232
+ def ClassVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ClassVariableOrWriteNode
4233
+ # Create a new ClassVariableReadNode node
4234
+ def ClassVariableReadNode: (name: Symbol, location: Location) -> ClassVariableReadNode
4235
+ # Create a new ClassVariableTargetNode node
4236
+ def ClassVariableTargetNode: (name: Symbol, location: Location) -> ClassVariableTargetNode
4237
+ # Create a new ClassVariableWriteNode node
4238
+ def ClassVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> ClassVariableWriteNode
4239
+ # Create a new ConstantAndWriteNode node
4240
+ def ConstantAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ConstantAndWriteNode
4241
+ # Create a new ConstantOperatorWriteNode node
4242
+ def ConstantOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ConstantOperatorWriteNode
4243
+ # Create a new ConstantOrWriteNode node
4244
+ def ConstantOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> ConstantOrWriteNode
4245
+ # Create a new ConstantPathAndWriteNode node
4246
+ def ConstantPathAndWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathAndWriteNode
4247
+ # Create a new ConstantPathNode node
4248
+ def ConstantPathNode: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> ConstantPathNode
4249
+ # Create a new ConstantPathOperatorWriteNode node
4250
+ def ConstantPathOperatorWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> ConstantPathOperatorWriteNode
4251
+ # Create a new ConstantPathOrWriteNode node
4252
+ def ConstantPathOrWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathOrWriteNode
4253
+ # Create a new ConstantPathTargetNode node
4254
+ def ConstantPathTargetNode: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> ConstantPathTargetNode
4255
+ # Create a new ConstantPathWriteNode node
4256
+ def ConstantPathWriteNode: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> ConstantPathWriteNode
4257
+ # Create a new ConstantReadNode node
4258
+ def ConstantReadNode: (name: Symbol, location: Location) -> ConstantReadNode
4259
+ # Create a new ConstantTargetNode node
4260
+ def ConstantTargetNode: (name: Symbol, location: Location) -> ConstantTargetNode
4261
+ # Create a new ConstantWriteNode node
4262
+ def ConstantWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> ConstantWriteNode
4263
+ # Create a new DefNode node
4264
+ 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
4265
+ # Create a new DefinedNode node
4266
+ def DefinedNode: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> DefinedNode
4267
+ # Create a new ElseNode node
4268
+ def ElseNode: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> ElseNode
4269
+ # Create a new EmbeddedStatementsNode node
4270
+ def EmbeddedStatementsNode: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> EmbeddedStatementsNode
4271
+ # Create a new EmbeddedVariableNode node
4272
+ def EmbeddedVariableNode: (operator_loc: Location, variable: Node, location: Location) -> EmbeddedVariableNode
4273
+ # Create a new EnsureNode node
4274
+ def EnsureNode: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> EnsureNode
4275
+ # Create a new FalseNode node
4276
+ def FalseNode: (location: Location) -> FalseNode
4277
+ # Create a new FindPatternNode node
4278
+ def FindPatternNode: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> FindPatternNode
4279
+ # Create a new FlipFlopNode node
4280
+ def FlipFlopNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> FlipFlopNode
4281
+ # Create a new FloatNode node
4282
+ def FloatNode: (location: Location) -> FloatNode
4283
+ # Create a new ForNode node
4284
+ 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
4285
+ # Create a new ForwardingArgumentsNode node
4286
+ def ForwardingArgumentsNode: (location: Location) -> ForwardingArgumentsNode
4287
+ # Create a new ForwardingParameterNode node
4288
+ def ForwardingParameterNode: (location: Location) -> ForwardingParameterNode
4289
+ # Create a new ForwardingSuperNode node
4290
+ def ForwardingSuperNode: (block: BlockNode?, location: Location) -> ForwardingSuperNode
4291
+ # Create a new GlobalVariableAndWriteNode node
4292
+ def GlobalVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> GlobalVariableAndWriteNode
4293
+ # Create a new GlobalVariableOperatorWriteNode node
4294
+ def GlobalVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> GlobalVariableOperatorWriteNode
4295
+ # Create a new GlobalVariableOrWriteNode node
4296
+ def GlobalVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> GlobalVariableOrWriteNode
4297
+ # Create a new GlobalVariableReadNode node
4298
+ def GlobalVariableReadNode: (name: Symbol, location: Location) -> GlobalVariableReadNode
4299
+ # Create a new GlobalVariableTargetNode node
4300
+ def GlobalVariableTargetNode: (name: Symbol, location: Location) -> GlobalVariableTargetNode
4301
+ # Create a new GlobalVariableWriteNode node
4302
+ def GlobalVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> GlobalVariableWriteNode
4303
+ # Create a new HashNode node
4304
+ def HashNode: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> HashNode
4305
+ # Create a new HashPatternNode node
4306
+ def HashPatternNode: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> HashPatternNode
4307
+ # Create a new IfNode node
4308
+ def IfNode: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> IfNode
4309
+ # Create a new ImaginaryNode node
4310
+ def ImaginaryNode: (numeric: Node, location: Location) -> ImaginaryNode
4311
+ # Create a new ImplicitNode node
4312
+ def ImplicitNode: (value: Node, location: Location) -> ImplicitNode
4313
+ # Create a new InNode node
4314
+ def InNode: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> InNode
4315
+ # Create a new IndexAndWriteNode node
4316
+ 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
4317
+ # Create a new IndexOperatorWriteNode node
4318
+ 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
4319
+ # Create a new IndexOrWriteNode node
4320
+ 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
4321
+ # Create a new InstanceVariableAndWriteNode node
4322
+ def InstanceVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableAndWriteNode
4323
+ # Create a new InstanceVariableOperatorWriteNode node
4324
+ def InstanceVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> InstanceVariableOperatorWriteNode
4325
+ # Create a new InstanceVariableOrWriteNode node
4326
+ def InstanceVariableOrWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableOrWriteNode
4327
+ # Create a new InstanceVariableReadNode node
4328
+ def InstanceVariableReadNode: (name: Symbol, location: Location) -> InstanceVariableReadNode
4329
+ # Create a new InstanceVariableTargetNode node
4330
+ def InstanceVariableTargetNode: (name: Symbol, location: Location) -> InstanceVariableTargetNode
4331
+ # Create a new InstanceVariableWriteNode node
4332
+ def InstanceVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> InstanceVariableWriteNode
4333
+ # Create a new IntegerNode node
4334
+ def IntegerNode: (flags: Integer, location: Location) -> IntegerNode
4335
+ # Create a new InterpolatedMatchLastLineNode node
4336
+ def InterpolatedMatchLastLineNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedMatchLastLineNode
4337
+ # Create a new InterpolatedRegularExpressionNode node
4338
+ def InterpolatedRegularExpressionNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedRegularExpressionNode
4339
+ # Create a new InterpolatedStringNode node
4340
+ def InterpolatedStringNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedStringNode
4341
+ # Create a new InterpolatedSymbolNode node
4342
+ def InterpolatedSymbolNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedSymbolNode
4343
+ # Create a new InterpolatedXStringNode node
4344
+ def InterpolatedXStringNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedXStringNode
4345
+ # Create a new KeywordHashNode node
4346
+ def KeywordHashNode: (elements: Array[Node], location: Location) -> KeywordHashNode
4347
+ # Create a new KeywordRestParameterNode node
4348
+ def KeywordRestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode
4349
+ # Create a new LambdaNode node
4350
+ def LambdaNode: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> LambdaNode
4351
+ # Create a new LocalVariableAndWriteNode node
4352
+ def LocalVariableAndWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableAndWriteNode
4353
+ # Create a new LocalVariableOperatorWriteNode node
4354
+ def LocalVariableOperatorWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> LocalVariableOperatorWriteNode
4355
+ # Create a new LocalVariableOrWriteNode node
4356
+ def LocalVariableOrWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableOrWriteNode
4357
+ # Create a new LocalVariableReadNode node
4358
+ def LocalVariableReadNode: (name: Symbol, depth: Integer, location: Location) -> LocalVariableReadNode
4359
+ # Create a new LocalVariableTargetNode node
4360
+ def LocalVariableTargetNode: (name: Symbol, depth: Integer, location: Location) -> LocalVariableTargetNode
4361
+ # Create a new LocalVariableWriteNode node
4362
+ def LocalVariableWriteNode: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> LocalVariableWriteNode
4363
+ # Create a new MatchLastLineNode node
4364
+ def MatchLastLineNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> MatchLastLineNode
4365
+ # Create a new MatchPredicateNode node
4366
+ def MatchPredicateNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchPredicateNode
4367
+ # Create a new MatchRequiredNode node
4368
+ def MatchRequiredNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchRequiredNode
4369
+ # Create a new MatchWriteNode node
4370
+ def MatchWriteNode: (call: CallNode, locals: Array[Symbol], location: Location) -> MatchWriteNode
4371
+ # Create a new MissingNode node
4372
+ def MissingNode: (location: Location) -> MissingNode
4373
+ # Create a new ModuleNode node
4374
+ def ModuleNode: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> ModuleNode
4375
+ # Create a new MultiTargetNode node
4376
+ def MultiTargetNode: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> MultiTargetNode
4377
+ # Create a new MultiWriteNode node
4378
+ def MultiWriteNode: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> MultiWriteNode
4379
+ # Create a new NextNode node
4380
+ def NextNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> NextNode
4381
+ # Create a new NilNode node
4382
+ def NilNode: (location: Location) -> NilNode
4383
+ # Create a new NoKeywordsParameterNode node
4384
+ def NoKeywordsParameterNode: (operator_loc: Location, keyword_loc: Location, location: Location) -> NoKeywordsParameterNode
4385
+ # Create a new NumberedReferenceReadNode node
4386
+ def NumberedReferenceReadNode: (number: Integer, location: Location) -> NumberedReferenceReadNode
4387
+ # Create a new OptionalKeywordParameterNode node
4388
+ def OptionalKeywordParameterNode: (name: Symbol, name_loc: Location, value: Node, location: Location) -> OptionalKeywordParameterNode
4389
+ # Create a new OptionalParameterNode node
4390
+ def OptionalParameterNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> OptionalParameterNode
4391
+ # Create a new OrNode node
4392
+ def OrNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> OrNode
4393
+ # Create a new ParametersNode node
4394
+ def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode
4395
+ # Create a new ParenthesesNode node
4396
+ def ParenthesesNode: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> ParenthesesNode
4397
+ # Create a new PinnedExpressionNode node
4398
+ def PinnedExpressionNode: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> PinnedExpressionNode
4399
+ # Create a new PinnedVariableNode node
4400
+ def PinnedVariableNode: (variable: Node, operator_loc: Location, location: Location) -> PinnedVariableNode
4401
+ # Create a new PostExecutionNode node
4402
+ def PostExecutionNode: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> PostExecutionNode
4403
+ # Create a new PreExecutionNode node
4404
+ def PreExecutionNode: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> PreExecutionNode
4405
+ # Create a new ProgramNode node
4406
+ def ProgramNode: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> ProgramNode
4407
+ # Create a new RangeNode node
4408
+ def RangeNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> RangeNode
4409
+ # Create a new RationalNode node
4410
+ def RationalNode: (numeric: Node, location: Location) -> RationalNode
4411
+ # Create a new RedoNode node
4412
+ def RedoNode: (location: Location) -> RedoNode
4413
+ # Create a new RegularExpressionNode node
4414
+ def RegularExpressionNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> RegularExpressionNode
4415
+ # Create a new RequiredKeywordParameterNode node
4416
+ def RequiredKeywordParameterNode: (name: Symbol, name_loc: Location, location: Location) -> RequiredKeywordParameterNode
4417
+ # Create a new RequiredParameterNode node
4418
+ def RequiredParameterNode: (name: Symbol, location: Location) -> RequiredParameterNode
4419
+ # Create a new RescueModifierNode node
4420
+ def RescueModifierNode: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> RescueModifierNode
4421
+ # Create a new RescueNode node
4422
+ def RescueNode: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> RescueNode
4423
+ # Create a new RestParameterNode node
4424
+ def RestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> RestParameterNode
4425
+ # Create a new RetryNode node
4426
+ def RetryNode: (location: Location) -> RetryNode
4427
+ # Create a new ReturnNode node
4428
+ def ReturnNode: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> ReturnNode
4429
+ # Create a new SelfNode node
4430
+ def SelfNode: (location: Location) -> SelfNode
4431
+ # Create a new SingletonClassNode node
4432
+ def SingletonClassNode: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> SingletonClassNode
4433
+ # Create a new SourceEncodingNode node
4434
+ def SourceEncodingNode: (location: Location) -> SourceEncodingNode
4435
+ # Create a new SourceFileNode node
4436
+ def SourceFileNode: (filepath: String, location: Location) -> SourceFileNode
4437
+ # Create a new SourceLineNode node
4438
+ def SourceLineNode: (location: Location) -> SourceLineNode
4439
+ # Create a new SplatNode node
4440
+ def SplatNode: (operator_loc: Location, expression: Node?, location: Location) -> SplatNode
4441
+ # Create a new StatementsNode node
4442
+ def StatementsNode: (body: Array[Node], location: Location) -> StatementsNode
4443
+ # Create a new StringConcatNode node
4444
+ def StringConcatNode: (left: Node, right: Node, location: Location) -> StringConcatNode
4445
+ # Create a new StringNode node
4446
+ def StringNode: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> StringNode
4447
+ # Create a new SuperNode node
4448
+ def SuperNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> SuperNode
4449
+ # Create a new SymbolNode node
4450
+ def SymbolNode: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
4451
+ # Create a new TrueNode node
4452
+ def TrueNode: (location: Location) -> TrueNode
4453
+ # Create a new UndefNode node
4454
+ def UndefNode: (names: Array[Node], keyword_loc: Location, location: Location) -> UndefNode
4455
+ # Create a new UnlessNode node
4456
+ def UnlessNode: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> UnlessNode
4457
+ # Create a new UntilNode node
4458
+ def UntilNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> UntilNode
4459
+ # Create a new WhenNode node
4460
+ def WhenNode: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> WhenNode
4461
+ # Create a new WhileNode node
4462
+ def WhileNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> WhileNode
4463
+ # Create a new XStringNode node
4464
+ def XStringNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
4465
+ # Create a new YieldNode node
4466
+ def YieldNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> YieldNode
4467
+ end
4468
+ end