jruby-prism-parser 0.23.0.pre.SNAPSHOT-java

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