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