prism 0.24.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BSDmakefile +58 -0
- data/CHANGELOG.md +132 -1
- data/Makefile +25 -18
- data/README.md +45 -6
- data/config.yml +828 -25
- data/docs/build_system.md +31 -0
- data/docs/configuration.md +4 -0
- data/docs/cruby_compilation.md +1 -1
- data/docs/parser_translation.md +14 -9
- data/docs/releasing.md +7 -9
- data/docs/ripper_translation.md +50 -0
- data/docs/ruby_api.md +1 -0
- data/docs/serialization.md +26 -5
- data/ext/prism/api_node.c +1037 -936
- data/ext/prism/api_pack.c +9 -0
- data/ext/prism/extconf.rb +62 -18
- data/ext/prism/extension.c +351 -71
- data/ext/prism/extension.h +5 -4
- data/include/prism/ast.h +539 -101
- data/include/prism/defines.h +106 -2
- data/include/prism/diagnostic.h +168 -74
- data/include/prism/encoding.h +22 -4
- data/include/prism/node.h +93 -0
- data/include/prism/options.h +84 -9
- data/include/prism/pack.h +11 -0
- data/include/prism/parser.h +213 -54
- data/include/prism/prettyprint.h +8 -0
- data/include/prism/static_literals.h +120 -0
- data/include/prism/util/pm_buffer.h +65 -2
- data/include/prism/util/pm_constant_pool.h +18 -1
- data/include/prism/util/pm_integer.h +119 -0
- data/include/prism/util/pm_list.h +1 -1
- data/include/prism/util/pm_newline_list.h +8 -0
- data/include/prism/util/pm_string.h +26 -2
- data/include/prism/version.h +2 -2
- data/include/prism.h +59 -1
- data/lib/prism/compiler.rb +8 -1
- data/lib/prism/debug.rb +46 -3
- data/lib/prism/desugar_compiler.rb +5 -3
- data/lib/prism/dispatcher.rb +29 -0
- data/lib/prism/dot_visitor.rb +141 -54
- data/lib/prism/dsl.rb +48 -36
- data/lib/prism/ffi.rb +82 -17
- data/lib/prism/inspect_visitor.rb +2156 -0
- data/lib/prism/lex_compat.rb +34 -15
- data/lib/prism/mutation_compiler.rb +13 -2
- data/lib/prism/node.rb +4453 -4459
- data/lib/prism/node_ext.rb +249 -30
- data/lib/prism/pack.rb +4 -0
- data/lib/prism/parse_result/comments.rb +35 -18
- data/lib/prism/parse_result/newlines.rb +2 -2
- data/lib/prism/parse_result.rb +218 -43
- data/lib/prism/pattern.rb +28 -10
- data/lib/prism/polyfill/byteindex.rb +13 -0
- data/lib/prism/polyfill/unpack1.rb +14 -0
- data/lib/prism/reflection.rb +411 -0
- data/lib/prism/serialize.rb +480 -112
- data/lib/prism/translation/parser/compiler.rb +376 -88
- data/lib/prism/translation/parser/lexer.rb +103 -22
- data/lib/prism/translation/parser/rubocop.rb +41 -13
- data/lib/prism/translation/parser.rb +123 -11
- data/lib/prism/translation/parser33.rb +1 -1
- data/lib/prism/translation/parser34.rb +1 -1
- data/lib/prism/translation/ripper/sexp.rb +125 -0
- data/lib/prism/translation/ripper/shim.rb +5 -0
- data/lib/prism/translation/ripper.rb +3216 -462
- data/lib/prism/translation/ruby_parser.rb +111 -56
- data/lib/prism/translation.rb +3 -1
- data/lib/prism/visitor.rb +10 -0
- data/lib/prism.rb +12 -20
- data/prism.gemspec +46 -14
- data/rbi/prism/compiler.rbi +12 -0
- data/rbi/prism/inspect_visitor.rbi +12 -0
- data/rbi/prism/node.rbi +8712 -0
- data/rbi/prism/node_ext.rbi +107 -0
- data/rbi/prism/parse_result.rbi +358 -0
- data/rbi/prism/reflection.rbi +58 -0
- data/rbi/prism/translation/parser.rbi +11 -0
- data/rbi/prism/translation/parser33.rbi +6 -0
- data/rbi/prism/translation/parser34.rbi +6 -0
- data/rbi/prism/translation/ripper.rbi +15 -0
- data/rbi/prism/visitor.rbi +470 -0
- data/rbi/prism.rbi +38 -7748
- data/sig/prism/compiler.rbs +9 -0
- data/sig/prism/dispatcher.rbs +16 -0
- data/sig/prism/dot_visitor.rbs +6 -0
- data/sig/prism/dsl.rbs +462 -0
- data/sig/prism/inspect_visitor.rbs +22 -0
- data/sig/prism/lex_compat.rbs +10 -0
- data/sig/prism/mutation_compiler.rbs +158 -0
- data/sig/prism/node.rbs +3558 -0
- data/sig/prism/node_ext.rbs +82 -0
- data/sig/prism/pack.rbs +43 -0
- data/sig/prism/parse_result.rbs +160 -0
- data/sig/prism/pattern.rbs +13 -0
- data/sig/prism/reflection.rbs +50 -0
- data/sig/prism/serialize.rbs +6 -0
- data/sig/prism/visitor.rbs +168 -0
- data/sig/prism.rbs +188 -4767
- data/src/diagnostic.c +636 -230
- data/src/encoding.c +211 -108
- data/src/node.c +7555 -451
- data/src/options.c +66 -31
- data/src/pack.c +33 -17
- data/src/prettyprint.c +1383 -1431
- data/src/prism.c +4734 -1310
- data/src/regexp.c +17 -2
- data/src/serialize.c +68 -46
- data/src/static_literals.c +638 -0
- data/src/token_type.c +10 -9
- data/src/util/pm_buffer.c +147 -20
- data/src/util/pm_char.c +4 -4
- data/src/util/pm_constant_pool.c +35 -11
- data/src/util/pm_integer.c +642 -0
- data/src/util/pm_list.c +1 -1
- data/src/util/pm_newline_list.c +14 -5
- data/src/util/pm_string.c +134 -5
- data/src/util/pm_string_list.c +2 -2
- metadata +41 -9
- data/docs/ripper.md +0 -36
- data/include/prism/util/pm_state_stack.h +0 -42
- data/lib/prism/node_inspector.rb +0 -68
- data/rbi/prism_static.rbi +0 -207
- data/sig/prism_static.rbs +0 -201
- data/src/util/pm_state_stack.c +0 -25
data/sig/prism/node.rbs
ADDED
@@ -0,0 +1,3558 @@
|
|
1
|
+
# This file is generated by the templates/template.rb script and should not be
|
2
|
+
# modified manually. See templates/sig/prism/node.rbs.erb
|
3
|
+
# if you are looking to modify the template
|
4
|
+
|
5
|
+
module Prism
|
6
|
+
# Methods implemented on every subclass of a singleton of Node
|
7
|
+
interface _NodeSingleton
|
8
|
+
def type: () -> Symbol
|
9
|
+
end
|
10
|
+
|
11
|
+
class Node
|
12
|
+
extend _NodeSingleton
|
13
|
+
|
14
|
+
attr_reader location: Location
|
15
|
+
attr_reader source: Source
|
16
|
+
|
17
|
+
def start_offset: () -> Integer
|
18
|
+
def end_offset: () -> Integer
|
19
|
+
def source_lines: () -> Array[String]
|
20
|
+
alias script_lines source_lines
|
21
|
+
def slice: () -> String
|
22
|
+
def slice_lines: () -> String
|
23
|
+
def pretty_print: (untyped q) -> untyped
|
24
|
+
def to_dot: () -> String
|
25
|
+
def tunnel: (Integer line, Integer column) -> Array[Prism::node]
|
26
|
+
end
|
27
|
+
|
28
|
+
type node_singleton = singleton(Node) & _NodeSingleton
|
29
|
+
|
30
|
+
# Methods implemented by every subclass of Node
|
31
|
+
interface _Node
|
32
|
+
def accept: (_Visitor) -> void
|
33
|
+
def child_nodes: () -> Array[Prism::node?]
|
34
|
+
def deconstruct: () -> Array[Prism::node?]
|
35
|
+
def compact_child_nodes: () -> Array[Prism::node]
|
36
|
+
def comment_targets: () -> Array[Prism::node | Location]
|
37
|
+
def fields: () -> Array[Prism::Reflection::Field]
|
38
|
+
def inspect: () -> String
|
39
|
+
def type: () -> Symbol
|
40
|
+
end
|
41
|
+
|
42
|
+
type node = Node & _Node
|
43
|
+
|
44
|
+
|
45
|
+
# Represents the use of the `alias` keyword to alias a global variable.
|
46
|
+
#
|
47
|
+
# alias $foo $bar
|
48
|
+
# ^^^^^^^^^^^^^^^
|
49
|
+
class AliasGlobalVariableNode < Node
|
50
|
+
include _Node
|
51
|
+
|
52
|
+
attr_reader new_name: Prism::node
|
53
|
+
attr_reader old_name: Prism::node
|
54
|
+
attr_reader keyword_loc: Location
|
55
|
+
|
56
|
+
def initialize: (Source source, Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void
|
57
|
+
def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode
|
58
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location }
|
59
|
+
def keyword: () -> String
|
60
|
+
def type: () -> :alias_global_variable_node
|
61
|
+
| ...
|
62
|
+
def self.type: () -> :alias_global_variable_node
|
63
|
+
end
|
64
|
+
|
65
|
+
# Represents the use of the `alias` keyword to alias a method.
|
66
|
+
#
|
67
|
+
# alias foo bar
|
68
|
+
# ^^^^^^^^^^^^^
|
69
|
+
class AliasMethodNode < Node
|
70
|
+
include _Node
|
71
|
+
|
72
|
+
attr_reader new_name: Prism::node
|
73
|
+
attr_reader old_name: Prism::node
|
74
|
+
attr_reader keyword_loc: Location
|
75
|
+
|
76
|
+
def initialize: (Source source, Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void
|
77
|
+
def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode
|
78
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location }
|
79
|
+
def keyword: () -> String
|
80
|
+
def type: () -> :alias_method_node
|
81
|
+
| ...
|
82
|
+
def self.type: () -> :alias_method_node
|
83
|
+
end
|
84
|
+
|
85
|
+
# Represents an alternation pattern in pattern matching.
|
86
|
+
#
|
87
|
+
# foo => bar | baz
|
88
|
+
# ^^^^^^^^^
|
89
|
+
class AlternationPatternNode < Node
|
90
|
+
include _Node
|
91
|
+
|
92
|
+
attr_reader left: Prism::node
|
93
|
+
attr_reader right: Prism::node
|
94
|
+
attr_reader operator_loc: Location
|
95
|
+
|
96
|
+
def initialize: (Source source, Prism::node left, Prism::node right, Location operator_loc, Location location) -> void
|
97
|
+
def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode
|
98
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location }
|
99
|
+
def operator: () -> String
|
100
|
+
def type: () -> :alternation_pattern_node
|
101
|
+
| ...
|
102
|
+
def self.type: () -> :alternation_pattern_node
|
103
|
+
end
|
104
|
+
|
105
|
+
# Represents the use of the `&&` operator or the `and` keyword.
|
106
|
+
#
|
107
|
+
# left and right
|
108
|
+
# ^^^^^^^^^^^^^^
|
109
|
+
class AndNode < Node
|
110
|
+
include _Node
|
111
|
+
|
112
|
+
attr_reader left: Prism::node
|
113
|
+
attr_reader right: Prism::node
|
114
|
+
attr_reader operator_loc: Location
|
115
|
+
|
116
|
+
def initialize: (Source source, Prism::node left, Prism::node right, Location operator_loc, Location location) -> void
|
117
|
+
def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode
|
118
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location }
|
119
|
+
def operator: () -> String
|
120
|
+
def type: () -> :and_node
|
121
|
+
| ...
|
122
|
+
def self.type: () -> :and_node
|
123
|
+
end
|
124
|
+
|
125
|
+
# Represents a set of arguments to a method or a keyword.
|
126
|
+
#
|
127
|
+
# return foo, bar, baz
|
128
|
+
# ^^^^^^^^^^^^^
|
129
|
+
class ArgumentsNode < Node
|
130
|
+
include _Node
|
131
|
+
|
132
|
+
attr_reader flags: Integer
|
133
|
+
attr_reader arguments: Array[Prism::node]
|
134
|
+
|
135
|
+
def initialize: (Source source, Integer flags, Array[Prism::node] arguments, Location location) -> void
|
136
|
+
def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode
|
137
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location }
|
138
|
+
def contains_keywords?: () -> bool
|
139
|
+
def contains_keyword_splat?: () -> bool
|
140
|
+
def type: () -> :arguments_node
|
141
|
+
| ...
|
142
|
+
def self.type: () -> :arguments_node
|
143
|
+
end
|
144
|
+
|
145
|
+
# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
|
146
|
+
#
|
147
|
+
# [1, 2, 3]
|
148
|
+
# ^^^^^^^^^
|
149
|
+
class ArrayNode < Node
|
150
|
+
include _Node
|
151
|
+
|
152
|
+
attr_reader flags: Integer
|
153
|
+
attr_reader elements: Array[Prism::node]
|
154
|
+
attr_reader opening_loc: Location?
|
155
|
+
attr_reader closing_loc: Location?
|
156
|
+
|
157
|
+
def initialize: (Source source, Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void
|
158
|
+
def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode
|
159
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location }
|
160
|
+
def contains_splat?: () -> bool
|
161
|
+
def opening: () -> String?
|
162
|
+
def closing: () -> String?
|
163
|
+
def type: () -> :array_node
|
164
|
+
| ...
|
165
|
+
def self.type: () -> :array_node
|
166
|
+
end
|
167
|
+
|
168
|
+
# Represents an array pattern in pattern matching.
|
169
|
+
#
|
170
|
+
# foo in 1, 2
|
171
|
+
# ^^^^^^^^^^^
|
172
|
+
#
|
173
|
+
# foo in [1, 2]
|
174
|
+
# ^^^^^^^^^^^^^
|
175
|
+
#
|
176
|
+
# foo in *1
|
177
|
+
# ^^^^^^^^^
|
178
|
+
#
|
179
|
+
# foo in Bar[]
|
180
|
+
# ^^^^^^^^^^^^
|
181
|
+
#
|
182
|
+
# foo in Bar[1, 2, 3]
|
183
|
+
# ^^^^^^^^^^^^^^^^^^^
|
184
|
+
class ArrayPatternNode < Node
|
185
|
+
include _Node
|
186
|
+
|
187
|
+
attr_reader constant: Prism::node?
|
188
|
+
attr_reader requireds: Array[Prism::node]
|
189
|
+
attr_reader rest: Prism::node?
|
190
|
+
attr_reader posts: Array[Prism::node]
|
191
|
+
attr_reader opening_loc: Location?
|
192
|
+
attr_reader closing_loc: Location?
|
193
|
+
|
194
|
+
def initialize: (Source source, Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void
|
195
|
+
def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode
|
196
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location }
|
197
|
+
def opening: () -> String?
|
198
|
+
def closing: () -> String?
|
199
|
+
def type: () -> :array_pattern_node
|
200
|
+
| ...
|
201
|
+
def self.type: () -> :array_pattern_node
|
202
|
+
end
|
203
|
+
|
204
|
+
# Represents a hash key/value pair.
|
205
|
+
#
|
206
|
+
# { a => b }
|
207
|
+
# ^^^^^^
|
208
|
+
class AssocNode < Node
|
209
|
+
include _Node
|
210
|
+
|
211
|
+
attr_reader key: Prism::node
|
212
|
+
attr_reader value: Prism::node
|
213
|
+
attr_reader operator_loc: Location?
|
214
|
+
|
215
|
+
def initialize: (Source source, Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void
|
216
|
+
def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode
|
217
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location }
|
218
|
+
def operator: () -> String?
|
219
|
+
def type: () -> :assoc_node
|
220
|
+
| ...
|
221
|
+
def self.type: () -> :assoc_node
|
222
|
+
end
|
223
|
+
|
224
|
+
# Represents a splat in a hash literal.
|
225
|
+
#
|
226
|
+
# { **foo }
|
227
|
+
# ^^^^^
|
228
|
+
class AssocSplatNode < Node
|
229
|
+
include _Node
|
230
|
+
|
231
|
+
attr_reader value: Prism::node?
|
232
|
+
attr_reader operator_loc: Location
|
233
|
+
|
234
|
+
def initialize: (Source source, Prism::node? value, Location operator_loc, Location location) -> void
|
235
|
+
def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode
|
236
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location }
|
237
|
+
def operator: () -> String
|
238
|
+
def type: () -> :assoc_splat_node
|
239
|
+
| ...
|
240
|
+
def self.type: () -> :assoc_splat_node
|
241
|
+
end
|
242
|
+
|
243
|
+
# Represents reading a reference to a field in the previous match.
|
244
|
+
#
|
245
|
+
# $'
|
246
|
+
# ^^
|
247
|
+
class BackReferenceReadNode < Node
|
248
|
+
include _Node
|
249
|
+
|
250
|
+
attr_reader name: Symbol
|
251
|
+
|
252
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
253
|
+
def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode
|
254
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
255
|
+
def type: () -> :back_reference_read_node
|
256
|
+
| ...
|
257
|
+
def self.type: () -> :back_reference_read_node
|
258
|
+
end
|
259
|
+
|
260
|
+
# Represents a begin statement.
|
261
|
+
#
|
262
|
+
# begin
|
263
|
+
# foo
|
264
|
+
# end
|
265
|
+
# ^^^^^
|
266
|
+
class BeginNode < Node
|
267
|
+
include _Node
|
268
|
+
|
269
|
+
attr_reader begin_keyword_loc: Location?
|
270
|
+
attr_reader statements: StatementsNode?
|
271
|
+
attr_reader rescue_clause: RescueNode?
|
272
|
+
attr_reader else_clause: ElseNode?
|
273
|
+
attr_reader ensure_clause: EnsureNode?
|
274
|
+
attr_reader end_keyword_loc: Location?
|
275
|
+
|
276
|
+
def initialize: (Source source, Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void
|
277
|
+
def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode
|
278
|
+
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 }
|
279
|
+
def begin_keyword: () -> String?
|
280
|
+
def end_keyword: () -> String?
|
281
|
+
def type: () -> :begin_node
|
282
|
+
| ...
|
283
|
+
def self.type: () -> :begin_node
|
284
|
+
end
|
285
|
+
|
286
|
+
# Represents block method arguments.
|
287
|
+
#
|
288
|
+
# bar(&args)
|
289
|
+
# ^^^^^^^^^^
|
290
|
+
class BlockArgumentNode < Node
|
291
|
+
include _Node
|
292
|
+
|
293
|
+
attr_reader expression: Prism::node?
|
294
|
+
attr_reader operator_loc: Location
|
295
|
+
|
296
|
+
def initialize: (Source source, Prism::node? expression, Location operator_loc, Location location) -> void
|
297
|
+
def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode
|
298
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location }
|
299
|
+
def operator: () -> String
|
300
|
+
def type: () -> :block_argument_node
|
301
|
+
| ...
|
302
|
+
def self.type: () -> :block_argument_node
|
303
|
+
end
|
304
|
+
|
305
|
+
# Represents a block local variable.
|
306
|
+
#
|
307
|
+
# a { |; b| }
|
308
|
+
# ^
|
309
|
+
class BlockLocalVariableNode < Node
|
310
|
+
include _Node
|
311
|
+
|
312
|
+
attr_reader flags: Integer
|
313
|
+
attr_reader name: Symbol
|
314
|
+
|
315
|
+
def initialize: (Source source, Integer flags, Symbol name, Location location) -> void
|
316
|
+
def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode
|
317
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location }
|
318
|
+
def repeated_parameter?: () -> bool
|
319
|
+
def type: () -> :block_local_variable_node
|
320
|
+
| ...
|
321
|
+
def self.type: () -> :block_local_variable_node
|
322
|
+
end
|
323
|
+
|
324
|
+
# Represents a block of ruby code.
|
325
|
+
#
|
326
|
+
# [1, 2, 3].each { |i| puts x }
|
327
|
+
# ^^^^^^^^^^^^^^
|
328
|
+
class BlockNode < Node
|
329
|
+
include _Node
|
330
|
+
|
331
|
+
attr_reader locals: Array[Symbol]
|
332
|
+
attr_reader parameters: Prism::node?
|
333
|
+
attr_reader body: Prism::node?
|
334
|
+
attr_reader opening_loc: Location
|
335
|
+
attr_reader closing_loc: Location
|
336
|
+
|
337
|
+
def initialize: (Source source, Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void
|
338
|
+
def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode
|
339
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location }
|
340
|
+
def opening: () -> String
|
341
|
+
def closing: () -> String
|
342
|
+
def type: () -> :block_node
|
343
|
+
| ...
|
344
|
+
def self.type: () -> :block_node
|
345
|
+
end
|
346
|
+
|
347
|
+
# Represents a block parameter to a method, block, or lambda definition.
|
348
|
+
#
|
349
|
+
# def a(&b)
|
350
|
+
# ^^
|
351
|
+
# end
|
352
|
+
class BlockParameterNode < Node
|
353
|
+
include _Node
|
354
|
+
|
355
|
+
attr_reader flags: Integer
|
356
|
+
attr_reader name: Symbol?
|
357
|
+
attr_reader name_loc: Location?
|
358
|
+
attr_reader operator_loc: Location
|
359
|
+
|
360
|
+
def initialize: (Source source, Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void
|
361
|
+
def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode
|
362
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location }
|
363
|
+
def repeated_parameter?: () -> bool
|
364
|
+
def operator: () -> String
|
365
|
+
def type: () -> :block_parameter_node
|
366
|
+
| ...
|
367
|
+
def self.type: () -> :block_parameter_node
|
368
|
+
end
|
369
|
+
|
370
|
+
# Represents a block's parameters declaration.
|
371
|
+
#
|
372
|
+
# -> (a, b = 1; local) { }
|
373
|
+
# ^^^^^^^^^^^^^^^^^
|
374
|
+
#
|
375
|
+
# foo do |a, b = 1; local|
|
376
|
+
# ^^^^^^^^^^^^^^^^^
|
377
|
+
# end
|
378
|
+
class BlockParametersNode < Node
|
379
|
+
include _Node
|
380
|
+
|
381
|
+
attr_reader parameters: ParametersNode?
|
382
|
+
attr_reader locals: Array[BlockLocalVariableNode]
|
383
|
+
attr_reader opening_loc: Location?
|
384
|
+
attr_reader closing_loc: Location?
|
385
|
+
|
386
|
+
def initialize: (Source source, ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void
|
387
|
+
def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode
|
388
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location }
|
389
|
+
def opening: () -> String?
|
390
|
+
def closing: () -> String?
|
391
|
+
def type: () -> :block_parameters_node
|
392
|
+
| ...
|
393
|
+
def self.type: () -> :block_parameters_node
|
394
|
+
end
|
395
|
+
|
396
|
+
# Represents the use of the `break` keyword.
|
397
|
+
#
|
398
|
+
# break foo
|
399
|
+
# ^^^^^^^^^
|
400
|
+
class BreakNode < Node
|
401
|
+
include _Node
|
402
|
+
|
403
|
+
attr_reader arguments: ArgumentsNode?
|
404
|
+
attr_reader keyword_loc: Location
|
405
|
+
|
406
|
+
def initialize: (Source source, ArgumentsNode? arguments, Location keyword_loc, Location location) -> void
|
407
|
+
def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode
|
408
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location }
|
409
|
+
def keyword: () -> String
|
410
|
+
def type: () -> :break_node
|
411
|
+
| ...
|
412
|
+
def self.type: () -> :break_node
|
413
|
+
end
|
414
|
+
|
415
|
+
# Represents the use of the `&&=` operator on a call.
|
416
|
+
#
|
417
|
+
# foo.bar &&= value
|
418
|
+
# ^^^^^^^^^^^^^^^^^
|
419
|
+
class CallAndWriteNode < Node
|
420
|
+
include _Node
|
421
|
+
|
422
|
+
attr_reader flags: Integer
|
423
|
+
attr_reader receiver: Prism::node?
|
424
|
+
attr_reader call_operator_loc: Location?
|
425
|
+
attr_reader message_loc: Location?
|
426
|
+
attr_reader read_name: Symbol
|
427
|
+
attr_reader write_name: Symbol
|
428
|
+
attr_reader operator_loc: Location
|
429
|
+
attr_reader value: Prism::node
|
430
|
+
|
431
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void
|
432
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode
|
433
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location }
|
434
|
+
def safe_navigation?: () -> bool
|
435
|
+
def variable_call?: () -> bool
|
436
|
+
def attribute_write?: () -> bool
|
437
|
+
def ignore_visibility?: () -> bool
|
438
|
+
def call_operator: () -> String?
|
439
|
+
def message: () -> String?
|
440
|
+
def operator: () -> String
|
441
|
+
def type: () -> :call_and_write_node
|
442
|
+
| ...
|
443
|
+
def self.type: () -> :call_and_write_node
|
444
|
+
end
|
445
|
+
|
446
|
+
# Represents a method call, in all of the various forms that can take.
|
447
|
+
#
|
448
|
+
# foo
|
449
|
+
# ^^^
|
450
|
+
#
|
451
|
+
# foo()
|
452
|
+
# ^^^^^
|
453
|
+
#
|
454
|
+
# +foo
|
455
|
+
# ^^^^
|
456
|
+
#
|
457
|
+
# foo + bar
|
458
|
+
# ^^^^^^^^^
|
459
|
+
#
|
460
|
+
# foo.bar
|
461
|
+
# ^^^^^^^
|
462
|
+
#
|
463
|
+
# foo&.bar
|
464
|
+
# ^^^^^^^^
|
465
|
+
class CallNode < Node
|
466
|
+
include _Node
|
467
|
+
|
468
|
+
attr_reader flags: Integer
|
469
|
+
attr_reader receiver: Prism::node?
|
470
|
+
attr_reader call_operator_loc: Location?
|
471
|
+
attr_reader name: Symbol
|
472
|
+
attr_reader message_loc: Location?
|
473
|
+
attr_reader opening_loc: Location?
|
474
|
+
attr_reader arguments: ArgumentsNode?
|
475
|
+
attr_reader closing_loc: Location?
|
476
|
+
attr_reader block: Prism::node?
|
477
|
+
|
478
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void
|
479
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode
|
480
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location }
|
481
|
+
def safe_navigation?: () -> bool
|
482
|
+
def variable_call?: () -> bool
|
483
|
+
def attribute_write?: () -> bool
|
484
|
+
def ignore_visibility?: () -> bool
|
485
|
+
def call_operator: () -> String?
|
486
|
+
def message: () -> String?
|
487
|
+
def opening: () -> String?
|
488
|
+
def closing: () -> String?
|
489
|
+
def type: () -> :call_node
|
490
|
+
| ...
|
491
|
+
def self.type: () -> :call_node
|
492
|
+
end
|
493
|
+
|
494
|
+
# Represents the use of an assignment operator on a call.
|
495
|
+
#
|
496
|
+
# foo.bar += baz
|
497
|
+
# ^^^^^^^^^^^^^^
|
498
|
+
class CallOperatorWriteNode < Node
|
499
|
+
include _Node
|
500
|
+
|
501
|
+
attr_reader flags: Integer
|
502
|
+
attr_reader receiver: Prism::node?
|
503
|
+
attr_reader call_operator_loc: Location?
|
504
|
+
attr_reader message_loc: Location?
|
505
|
+
attr_reader read_name: Symbol
|
506
|
+
attr_reader write_name: Symbol
|
507
|
+
attr_reader binary_operator: Symbol
|
508
|
+
attr_reader binary_operator_loc: Location
|
509
|
+
attr_reader value: Prism::node
|
510
|
+
|
511
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void
|
512
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode
|
513
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location }
|
514
|
+
def safe_navigation?: () -> bool
|
515
|
+
def variable_call?: () -> bool
|
516
|
+
def attribute_write?: () -> bool
|
517
|
+
def ignore_visibility?: () -> bool
|
518
|
+
def call_operator: () -> String?
|
519
|
+
def message: () -> String?
|
520
|
+
def type: () -> :call_operator_write_node
|
521
|
+
| ...
|
522
|
+
def self.type: () -> :call_operator_write_node
|
523
|
+
end
|
524
|
+
|
525
|
+
# Represents the use of the `||=` operator on a call.
|
526
|
+
#
|
527
|
+
# foo.bar ||= value
|
528
|
+
# ^^^^^^^^^^^^^^^^^
|
529
|
+
class CallOrWriteNode < Node
|
530
|
+
include _Node
|
531
|
+
|
532
|
+
attr_reader flags: Integer
|
533
|
+
attr_reader receiver: Prism::node?
|
534
|
+
attr_reader call_operator_loc: Location?
|
535
|
+
attr_reader message_loc: Location?
|
536
|
+
attr_reader read_name: Symbol
|
537
|
+
attr_reader write_name: Symbol
|
538
|
+
attr_reader operator_loc: Location
|
539
|
+
attr_reader value: Prism::node
|
540
|
+
|
541
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void
|
542
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode
|
543
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location }
|
544
|
+
def safe_navigation?: () -> bool
|
545
|
+
def variable_call?: () -> bool
|
546
|
+
def attribute_write?: () -> bool
|
547
|
+
def ignore_visibility?: () -> bool
|
548
|
+
def call_operator: () -> String?
|
549
|
+
def message: () -> String?
|
550
|
+
def operator: () -> String
|
551
|
+
def type: () -> :call_or_write_node
|
552
|
+
| ...
|
553
|
+
def self.type: () -> :call_or_write_node
|
554
|
+
end
|
555
|
+
|
556
|
+
# Represents assigning to a method call.
|
557
|
+
#
|
558
|
+
# foo.bar, = 1
|
559
|
+
# ^^^^^^^
|
560
|
+
#
|
561
|
+
# begin
|
562
|
+
# rescue => foo.bar
|
563
|
+
# ^^^^^^^
|
564
|
+
# end
|
565
|
+
#
|
566
|
+
# for foo.bar in baz do end
|
567
|
+
# ^^^^^^^
|
568
|
+
class CallTargetNode < Node
|
569
|
+
include _Node
|
570
|
+
|
571
|
+
attr_reader flags: Integer
|
572
|
+
attr_reader receiver: Prism::node
|
573
|
+
attr_reader call_operator_loc: Location
|
574
|
+
attr_reader name: Symbol
|
575
|
+
attr_reader message_loc: Location
|
576
|
+
|
577
|
+
def initialize: (Source source, Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void
|
578
|
+
def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode
|
579
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location }
|
580
|
+
def safe_navigation?: () -> bool
|
581
|
+
def variable_call?: () -> bool
|
582
|
+
def attribute_write?: () -> bool
|
583
|
+
def ignore_visibility?: () -> bool
|
584
|
+
def call_operator: () -> String
|
585
|
+
def message: () -> String
|
586
|
+
def type: () -> :call_target_node
|
587
|
+
| ...
|
588
|
+
def self.type: () -> :call_target_node
|
589
|
+
end
|
590
|
+
|
591
|
+
# Represents assigning to a local variable in pattern matching.
|
592
|
+
#
|
593
|
+
# foo => [bar => baz]
|
594
|
+
# ^^^^^^^^^^^^
|
595
|
+
class CapturePatternNode < Node
|
596
|
+
include _Node
|
597
|
+
|
598
|
+
attr_reader value: Prism::node
|
599
|
+
attr_reader target: Prism::node
|
600
|
+
attr_reader operator_loc: Location
|
601
|
+
|
602
|
+
def initialize: (Source source, Prism::node value, Prism::node target, Location operator_loc, Location location) -> void
|
603
|
+
def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode
|
604
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location }
|
605
|
+
def operator: () -> String
|
606
|
+
def type: () -> :capture_pattern_node
|
607
|
+
| ...
|
608
|
+
def self.type: () -> :capture_pattern_node
|
609
|
+
end
|
610
|
+
|
611
|
+
# Represents the use of a case statement for pattern matching.
|
612
|
+
#
|
613
|
+
# case true
|
614
|
+
# in false
|
615
|
+
# end
|
616
|
+
# ^^^^^^^^^
|
617
|
+
class CaseMatchNode < Node
|
618
|
+
include _Node
|
619
|
+
|
620
|
+
attr_reader predicate: Prism::node?
|
621
|
+
attr_reader conditions: Array[Prism::node]
|
622
|
+
attr_reader consequent: ElseNode?
|
623
|
+
attr_reader case_keyword_loc: Location
|
624
|
+
attr_reader end_keyword_loc: Location
|
625
|
+
|
626
|
+
def initialize: (Source source, Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void
|
627
|
+
def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode
|
628
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location }
|
629
|
+
def case_keyword: () -> String
|
630
|
+
def end_keyword: () -> String
|
631
|
+
def type: () -> :case_match_node
|
632
|
+
| ...
|
633
|
+
def self.type: () -> :case_match_node
|
634
|
+
end
|
635
|
+
|
636
|
+
# Represents the use of a case statement.
|
637
|
+
#
|
638
|
+
# case true
|
639
|
+
# when false
|
640
|
+
# end
|
641
|
+
# ^^^^^^^^^^
|
642
|
+
class CaseNode < Node
|
643
|
+
include _Node
|
644
|
+
|
645
|
+
attr_reader predicate: Prism::node?
|
646
|
+
attr_reader conditions: Array[Prism::node]
|
647
|
+
attr_reader consequent: ElseNode?
|
648
|
+
attr_reader case_keyword_loc: Location
|
649
|
+
attr_reader end_keyword_loc: Location
|
650
|
+
|
651
|
+
def initialize: (Source source, Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void
|
652
|
+
def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode
|
653
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location }
|
654
|
+
def case_keyword: () -> String
|
655
|
+
def end_keyword: () -> String
|
656
|
+
def type: () -> :case_node
|
657
|
+
| ...
|
658
|
+
def self.type: () -> :case_node
|
659
|
+
end
|
660
|
+
|
661
|
+
# Represents a class declaration involving the `class` keyword.
|
662
|
+
#
|
663
|
+
# class Foo end
|
664
|
+
# ^^^^^^^^^^^^^
|
665
|
+
class ClassNode < Node
|
666
|
+
include _Node
|
667
|
+
|
668
|
+
attr_reader locals: Array[Symbol]
|
669
|
+
attr_reader class_keyword_loc: Location
|
670
|
+
attr_reader constant_path: Prism::node
|
671
|
+
attr_reader inheritance_operator_loc: Location?
|
672
|
+
attr_reader superclass: Prism::node?
|
673
|
+
attr_reader body: Prism::node?
|
674
|
+
attr_reader end_keyword_loc: Location
|
675
|
+
attr_reader name: Symbol
|
676
|
+
|
677
|
+
def initialize: (Source source, Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void
|
678
|
+
def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode
|
679
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location }
|
680
|
+
def class_keyword: () -> String
|
681
|
+
def inheritance_operator: () -> String?
|
682
|
+
def end_keyword: () -> String
|
683
|
+
def type: () -> :class_node
|
684
|
+
| ...
|
685
|
+
def self.type: () -> :class_node
|
686
|
+
end
|
687
|
+
|
688
|
+
# Represents the use of the `&&=` operator for assignment to a class variable.
|
689
|
+
#
|
690
|
+
# @@target &&= value
|
691
|
+
# ^^^^^^^^^^^^^^^^^^
|
692
|
+
class ClassVariableAndWriteNode < Node
|
693
|
+
include _Node
|
694
|
+
|
695
|
+
attr_reader name: Symbol
|
696
|
+
attr_reader name_loc: Location
|
697
|
+
attr_reader operator_loc: Location
|
698
|
+
attr_reader value: Prism::node
|
699
|
+
|
700
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
701
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode
|
702
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
703
|
+
def operator: () -> String
|
704
|
+
def type: () -> :class_variable_and_write_node
|
705
|
+
| ...
|
706
|
+
def self.type: () -> :class_variable_and_write_node
|
707
|
+
end
|
708
|
+
|
709
|
+
# Represents assigning to a class variable using an operator that isn't `=`.
|
710
|
+
#
|
711
|
+
# @@target += value
|
712
|
+
# ^^^^^^^^^^^^^^^^^
|
713
|
+
class ClassVariableOperatorWriteNode < Node
|
714
|
+
include _Node
|
715
|
+
|
716
|
+
attr_reader name: Symbol
|
717
|
+
attr_reader name_loc: Location
|
718
|
+
attr_reader binary_operator_loc: Location
|
719
|
+
attr_reader value: Prism::node
|
720
|
+
attr_reader binary_operator: Symbol
|
721
|
+
|
722
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void
|
723
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode
|
724
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location }
|
725
|
+
def type: () -> :class_variable_operator_write_node
|
726
|
+
| ...
|
727
|
+
def self.type: () -> :class_variable_operator_write_node
|
728
|
+
end
|
729
|
+
|
730
|
+
# Represents the use of the `||=` operator for assignment to a class variable.
|
731
|
+
#
|
732
|
+
# @@target ||= value
|
733
|
+
# ^^^^^^^^^^^^^^^^^^
|
734
|
+
class ClassVariableOrWriteNode < Node
|
735
|
+
include _Node
|
736
|
+
|
737
|
+
attr_reader name: Symbol
|
738
|
+
attr_reader name_loc: Location
|
739
|
+
attr_reader operator_loc: Location
|
740
|
+
attr_reader value: Prism::node
|
741
|
+
|
742
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
743
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode
|
744
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
745
|
+
def operator: () -> String
|
746
|
+
def type: () -> :class_variable_or_write_node
|
747
|
+
| ...
|
748
|
+
def self.type: () -> :class_variable_or_write_node
|
749
|
+
end
|
750
|
+
|
751
|
+
# Represents referencing a class variable.
|
752
|
+
#
|
753
|
+
# @@foo
|
754
|
+
# ^^^^^
|
755
|
+
class ClassVariableReadNode < Node
|
756
|
+
include _Node
|
757
|
+
|
758
|
+
attr_reader name: Symbol
|
759
|
+
|
760
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
761
|
+
def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode
|
762
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
763
|
+
def type: () -> :class_variable_read_node
|
764
|
+
| ...
|
765
|
+
def self.type: () -> :class_variable_read_node
|
766
|
+
end
|
767
|
+
|
768
|
+
# Represents writing to a class variable in a context that doesn't have an explicit value.
|
769
|
+
#
|
770
|
+
# @@foo, @@bar = baz
|
771
|
+
# ^^^^^ ^^^^^
|
772
|
+
class ClassVariableTargetNode < Node
|
773
|
+
include _Node
|
774
|
+
|
775
|
+
attr_reader name: Symbol
|
776
|
+
|
777
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
778
|
+
def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode
|
779
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
780
|
+
def type: () -> :class_variable_target_node
|
781
|
+
| ...
|
782
|
+
def self.type: () -> :class_variable_target_node
|
783
|
+
end
|
784
|
+
|
785
|
+
# Represents writing to a class variable.
|
786
|
+
#
|
787
|
+
# @@foo = 1
|
788
|
+
# ^^^^^^^^^
|
789
|
+
class ClassVariableWriteNode < Node
|
790
|
+
include _Node
|
791
|
+
|
792
|
+
attr_reader name: Symbol
|
793
|
+
attr_reader name_loc: Location
|
794
|
+
attr_reader value: Prism::node
|
795
|
+
attr_reader operator_loc: Location
|
796
|
+
|
797
|
+
def initialize: (Source source, Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void
|
798
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode
|
799
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location }
|
800
|
+
def operator: () -> String
|
801
|
+
def type: () -> :class_variable_write_node
|
802
|
+
| ...
|
803
|
+
def self.type: () -> :class_variable_write_node
|
804
|
+
end
|
805
|
+
|
806
|
+
# Represents the use of the `&&=` operator for assignment to a constant.
|
807
|
+
#
|
808
|
+
# Target &&= value
|
809
|
+
# ^^^^^^^^^^^^^^^^
|
810
|
+
class ConstantAndWriteNode < Node
|
811
|
+
include _Node
|
812
|
+
|
813
|
+
attr_reader name: Symbol
|
814
|
+
attr_reader name_loc: Location
|
815
|
+
attr_reader operator_loc: Location
|
816
|
+
attr_reader value: Prism::node
|
817
|
+
|
818
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
819
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode
|
820
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
821
|
+
def operator: () -> String
|
822
|
+
def type: () -> :constant_and_write_node
|
823
|
+
| ...
|
824
|
+
def self.type: () -> :constant_and_write_node
|
825
|
+
end
|
826
|
+
|
827
|
+
# Represents assigning to a constant using an operator that isn't `=`.
|
828
|
+
#
|
829
|
+
# Target += value
|
830
|
+
# ^^^^^^^^^^^^^^^
|
831
|
+
class ConstantOperatorWriteNode < Node
|
832
|
+
include _Node
|
833
|
+
|
834
|
+
attr_reader name: Symbol
|
835
|
+
attr_reader name_loc: Location
|
836
|
+
attr_reader binary_operator_loc: Location
|
837
|
+
attr_reader value: Prism::node
|
838
|
+
attr_reader binary_operator: Symbol
|
839
|
+
|
840
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void
|
841
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode
|
842
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location }
|
843
|
+
def type: () -> :constant_operator_write_node
|
844
|
+
| ...
|
845
|
+
def self.type: () -> :constant_operator_write_node
|
846
|
+
end
|
847
|
+
|
848
|
+
# Represents the use of the `||=` operator for assignment to a constant.
|
849
|
+
#
|
850
|
+
# Target ||= value
|
851
|
+
# ^^^^^^^^^^^^^^^^
|
852
|
+
class ConstantOrWriteNode < Node
|
853
|
+
include _Node
|
854
|
+
|
855
|
+
attr_reader name: Symbol
|
856
|
+
attr_reader name_loc: Location
|
857
|
+
attr_reader operator_loc: Location
|
858
|
+
attr_reader value: Prism::node
|
859
|
+
|
860
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
861
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode
|
862
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
863
|
+
def operator: () -> String
|
864
|
+
def type: () -> :constant_or_write_node
|
865
|
+
| ...
|
866
|
+
def self.type: () -> :constant_or_write_node
|
867
|
+
end
|
868
|
+
|
869
|
+
# Represents the use of the `&&=` operator for assignment to a constant path.
|
870
|
+
#
|
871
|
+
# Parent::Child &&= value
|
872
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^
|
873
|
+
class ConstantPathAndWriteNode < Node
|
874
|
+
include _Node
|
875
|
+
|
876
|
+
attr_reader target: ConstantPathNode
|
877
|
+
attr_reader operator_loc: Location
|
878
|
+
attr_reader value: Prism::node
|
879
|
+
|
880
|
+
def initialize: (Source source, ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void
|
881
|
+
def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode
|
882
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location }
|
883
|
+
def operator: () -> String
|
884
|
+
def type: () -> :constant_path_and_write_node
|
885
|
+
| ...
|
886
|
+
def self.type: () -> :constant_path_and_write_node
|
887
|
+
end
|
888
|
+
|
889
|
+
# Represents accessing a constant through a path of `::` operators.
|
890
|
+
#
|
891
|
+
# Foo::Bar
|
892
|
+
# ^^^^^^^^
|
893
|
+
class ConstantPathNode < Node
|
894
|
+
include _Node
|
895
|
+
|
896
|
+
attr_reader parent: Prism::node?
|
897
|
+
attr_reader name: Symbol?
|
898
|
+
attr_reader delimiter_loc: Location
|
899
|
+
attr_reader name_loc: Location
|
900
|
+
|
901
|
+
def initialize: (Source source, Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void
|
902
|
+
def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode
|
903
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location }
|
904
|
+
def delimiter: () -> String
|
905
|
+
def type: () -> :constant_path_node
|
906
|
+
| ...
|
907
|
+
def self.type: () -> :constant_path_node
|
908
|
+
end
|
909
|
+
|
910
|
+
# Represents assigning to a constant path using an operator that isn't `=`.
|
911
|
+
#
|
912
|
+
# Parent::Child += value
|
913
|
+
# ^^^^^^^^^^^^^^^^^^^^^^
|
914
|
+
class ConstantPathOperatorWriteNode < Node
|
915
|
+
include _Node
|
916
|
+
|
917
|
+
attr_reader target: ConstantPathNode
|
918
|
+
attr_reader binary_operator_loc: Location
|
919
|
+
attr_reader value: Prism::node
|
920
|
+
attr_reader binary_operator: Symbol
|
921
|
+
|
922
|
+
def initialize: (Source source, ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void
|
923
|
+
def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode
|
924
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location }
|
925
|
+
def type: () -> :constant_path_operator_write_node
|
926
|
+
| ...
|
927
|
+
def self.type: () -> :constant_path_operator_write_node
|
928
|
+
end
|
929
|
+
|
930
|
+
# Represents the use of the `||=` operator for assignment to a constant path.
|
931
|
+
#
|
932
|
+
# Parent::Child ||= value
|
933
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^
|
934
|
+
class ConstantPathOrWriteNode < Node
|
935
|
+
include _Node
|
936
|
+
|
937
|
+
attr_reader target: ConstantPathNode
|
938
|
+
attr_reader operator_loc: Location
|
939
|
+
attr_reader value: Prism::node
|
940
|
+
|
941
|
+
def initialize: (Source source, ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void
|
942
|
+
def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode
|
943
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location }
|
944
|
+
def operator: () -> String
|
945
|
+
def type: () -> :constant_path_or_write_node
|
946
|
+
| ...
|
947
|
+
def self.type: () -> :constant_path_or_write_node
|
948
|
+
end
|
949
|
+
|
950
|
+
# Represents writing to a constant path in a context that doesn't have an explicit value.
|
951
|
+
#
|
952
|
+
# Foo::Foo, Bar::Bar = baz
|
953
|
+
# ^^^^^^^^ ^^^^^^^^
|
954
|
+
class ConstantPathTargetNode < Node
|
955
|
+
include _Node
|
956
|
+
|
957
|
+
attr_reader parent: Prism::node?
|
958
|
+
attr_reader name: Symbol?
|
959
|
+
attr_reader delimiter_loc: Location
|
960
|
+
attr_reader name_loc: Location
|
961
|
+
|
962
|
+
def initialize: (Source source, Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void
|
963
|
+
def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode
|
964
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location }
|
965
|
+
def delimiter: () -> String
|
966
|
+
def type: () -> :constant_path_target_node
|
967
|
+
| ...
|
968
|
+
def self.type: () -> :constant_path_target_node
|
969
|
+
end
|
970
|
+
|
971
|
+
# Represents writing to a constant path.
|
972
|
+
#
|
973
|
+
# ::Foo = 1
|
974
|
+
# ^^^^^^^^^
|
975
|
+
#
|
976
|
+
# Foo::Bar = 1
|
977
|
+
# ^^^^^^^^^^^^
|
978
|
+
#
|
979
|
+
# ::Foo::Bar = 1
|
980
|
+
# ^^^^^^^^^^^^^^
|
981
|
+
class ConstantPathWriteNode < Node
|
982
|
+
include _Node
|
983
|
+
|
984
|
+
attr_reader target: ConstantPathNode
|
985
|
+
attr_reader operator_loc: Location
|
986
|
+
attr_reader value: Prism::node
|
987
|
+
|
988
|
+
def initialize: (Source source, ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void
|
989
|
+
def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode
|
990
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location }
|
991
|
+
def operator: () -> String
|
992
|
+
def type: () -> :constant_path_write_node
|
993
|
+
| ...
|
994
|
+
def self.type: () -> :constant_path_write_node
|
995
|
+
end
|
996
|
+
|
997
|
+
# Represents referencing a constant.
|
998
|
+
#
|
999
|
+
# Foo
|
1000
|
+
# ^^^
|
1001
|
+
class ConstantReadNode < Node
|
1002
|
+
include _Node
|
1003
|
+
|
1004
|
+
attr_reader name: Symbol
|
1005
|
+
|
1006
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1007
|
+
def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode
|
1008
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1009
|
+
def type: () -> :constant_read_node
|
1010
|
+
| ...
|
1011
|
+
def self.type: () -> :constant_read_node
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Represents writing to a constant in a context that doesn't have an explicit value.
|
1015
|
+
#
|
1016
|
+
# Foo, Bar = baz
|
1017
|
+
# ^^^ ^^^
|
1018
|
+
class ConstantTargetNode < Node
|
1019
|
+
include _Node
|
1020
|
+
|
1021
|
+
attr_reader name: Symbol
|
1022
|
+
|
1023
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1024
|
+
def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode
|
1025
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1026
|
+
def type: () -> :constant_target_node
|
1027
|
+
| ...
|
1028
|
+
def self.type: () -> :constant_target_node
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Represents writing to a constant.
|
1032
|
+
#
|
1033
|
+
# Foo = 1
|
1034
|
+
# ^^^^^^^
|
1035
|
+
class ConstantWriteNode < Node
|
1036
|
+
include _Node
|
1037
|
+
|
1038
|
+
attr_reader name: Symbol
|
1039
|
+
attr_reader name_loc: Location
|
1040
|
+
attr_reader value: Prism::node
|
1041
|
+
attr_reader operator_loc: Location
|
1042
|
+
|
1043
|
+
def initialize: (Source source, Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void
|
1044
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode
|
1045
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location }
|
1046
|
+
def operator: () -> String
|
1047
|
+
def type: () -> :constant_write_node
|
1048
|
+
| ...
|
1049
|
+
def self.type: () -> :constant_write_node
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Represents a method definition.
|
1053
|
+
#
|
1054
|
+
# def method
|
1055
|
+
# end
|
1056
|
+
# ^^^^^^^^^^
|
1057
|
+
class DefNode < Node
|
1058
|
+
include _Node
|
1059
|
+
|
1060
|
+
attr_reader name: Symbol
|
1061
|
+
attr_reader name_loc: Location
|
1062
|
+
attr_reader receiver: Prism::node?
|
1063
|
+
attr_reader parameters: ParametersNode?
|
1064
|
+
attr_reader body: Prism::node?
|
1065
|
+
attr_reader locals: Array[Symbol]
|
1066
|
+
attr_reader def_keyword_loc: Location
|
1067
|
+
attr_reader operator_loc: Location?
|
1068
|
+
attr_reader lparen_loc: Location?
|
1069
|
+
attr_reader rparen_loc: Location?
|
1070
|
+
attr_reader equal_loc: Location?
|
1071
|
+
attr_reader end_keyword_loc: Location?
|
1072
|
+
|
1073
|
+
def initialize: (Source source, Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::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
|
1074
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::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
|
1075
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::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 }
|
1076
|
+
def def_keyword: () -> String
|
1077
|
+
def operator: () -> String?
|
1078
|
+
def lparen: () -> String?
|
1079
|
+
def rparen: () -> String?
|
1080
|
+
def equal: () -> String?
|
1081
|
+
def end_keyword: () -> String?
|
1082
|
+
def type: () -> :def_node
|
1083
|
+
| ...
|
1084
|
+
def self.type: () -> :def_node
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Represents the use of the `defined?` keyword.
|
1088
|
+
#
|
1089
|
+
# defined?(a)
|
1090
|
+
# ^^^^^^^^^^^
|
1091
|
+
class DefinedNode < Node
|
1092
|
+
include _Node
|
1093
|
+
|
1094
|
+
attr_reader lparen_loc: Location?
|
1095
|
+
attr_reader value: Prism::node
|
1096
|
+
attr_reader rparen_loc: Location?
|
1097
|
+
attr_reader keyword_loc: Location
|
1098
|
+
|
1099
|
+
def initialize: (Source source, Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void
|
1100
|
+
def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode
|
1101
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location }
|
1102
|
+
def lparen: () -> String?
|
1103
|
+
def rparen: () -> String?
|
1104
|
+
def keyword: () -> String
|
1105
|
+
def type: () -> :defined_node
|
1106
|
+
| ...
|
1107
|
+
def self.type: () -> :defined_node
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
# Represents an `else` clause in a `case`, `if`, or `unless` statement.
|
1111
|
+
#
|
1112
|
+
# if a then b else c end
|
1113
|
+
# ^^^^^^^^^^
|
1114
|
+
class ElseNode < Node
|
1115
|
+
include _Node
|
1116
|
+
|
1117
|
+
attr_reader else_keyword_loc: Location
|
1118
|
+
attr_reader statements: StatementsNode?
|
1119
|
+
attr_reader end_keyword_loc: Location?
|
1120
|
+
|
1121
|
+
def initialize: (Source source, Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void
|
1122
|
+
def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode
|
1123
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location }
|
1124
|
+
def else_keyword: () -> String
|
1125
|
+
def end_keyword: () -> String?
|
1126
|
+
def type: () -> :else_node
|
1127
|
+
| ...
|
1128
|
+
def self.type: () -> :else_node
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
# Represents an interpolated set of statements.
|
1132
|
+
#
|
1133
|
+
# "foo #{bar}"
|
1134
|
+
# ^^^^^^
|
1135
|
+
class EmbeddedStatementsNode < Node
|
1136
|
+
include _Node
|
1137
|
+
|
1138
|
+
attr_reader opening_loc: Location
|
1139
|
+
attr_reader statements: StatementsNode?
|
1140
|
+
attr_reader closing_loc: Location
|
1141
|
+
|
1142
|
+
def initialize: (Source source, Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void
|
1143
|
+
def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode
|
1144
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location }
|
1145
|
+
def opening: () -> String
|
1146
|
+
def closing: () -> String
|
1147
|
+
def type: () -> :embedded_statements_node
|
1148
|
+
| ...
|
1149
|
+
def self.type: () -> :embedded_statements_node
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
# Represents an interpolated variable.
|
1153
|
+
#
|
1154
|
+
# "foo #@bar"
|
1155
|
+
# ^^^^^
|
1156
|
+
class EmbeddedVariableNode < Node
|
1157
|
+
include _Node
|
1158
|
+
|
1159
|
+
attr_reader operator_loc: Location
|
1160
|
+
attr_reader variable: Prism::node
|
1161
|
+
|
1162
|
+
def initialize: (Source source, Location operator_loc, Prism::node variable, Location location) -> void
|
1163
|
+
def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode
|
1164
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location }
|
1165
|
+
def operator: () -> String
|
1166
|
+
def type: () -> :embedded_variable_node
|
1167
|
+
| ...
|
1168
|
+
def self.type: () -> :embedded_variable_node
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# Represents an `ensure` clause in a `begin` statement.
|
1172
|
+
#
|
1173
|
+
# begin
|
1174
|
+
# foo
|
1175
|
+
# ensure
|
1176
|
+
# ^^^^^^
|
1177
|
+
# bar
|
1178
|
+
# end
|
1179
|
+
class EnsureNode < Node
|
1180
|
+
include _Node
|
1181
|
+
|
1182
|
+
attr_reader ensure_keyword_loc: Location
|
1183
|
+
attr_reader statements: StatementsNode?
|
1184
|
+
attr_reader end_keyword_loc: Location
|
1185
|
+
|
1186
|
+
def initialize: (Source source, Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void
|
1187
|
+
def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode
|
1188
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location }
|
1189
|
+
def ensure_keyword: () -> String
|
1190
|
+
def end_keyword: () -> String
|
1191
|
+
def type: () -> :ensure_node
|
1192
|
+
| ...
|
1193
|
+
def self.type: () -> :ensure_node
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# Represents the use of the literal `false` keyword.
|
1197
|
+
#
|
1198
|
+
# false
|
1199
|
+
# ^^^^^
|
1200
|
+
class FalseNode < Node
|
1201
|
+
include _Node
|
1202
|
+
|
1203
|
+
|
1204
|
+
def initialize: (Source source, Location location) -> void
|
1205
|
+
def copy: (?location: Location) -> FalseNode
|
1206
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
1207
|
+
def type: () -> :false_node
|
1208
|
+
| ...
|
1209
|
+
def self.type: () -> :false_node
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# Represents a find pattern in pattern matching.
|
1213
|
+
#
|
1214
|
+
# foo in *bar, baz, *qux
|
1215
|
+
# ^^^^^^^^^^^^^^^
|
1216
|
+
#
|
1217
|
+
# foo in [*bar, baz, *qux]
|
1218
|
+
# ^^^^^^^^^^^^^^^^^
|
1219
|
+
#
|
1220
|
+
# foo in Foo(*bar, baz, *qux)
|
1221
|
+
# ^^^^^^^^^^^^^^^^^^^^
|
1222
|
+
class FindPatternNode < Node
|
1223
|
+
include _Node
|
1224
|
+
|
1225
|
+
attr_reader constant: Prism::node?
|
1226
|
+
attr_reader left: Prism::node
|
1227
|
+
attr_reader requireds: Array[Prism::node]
|
1228
|
+
attr_reader right: Prism::node
|
1229
|
+
attr_reader opening_loc: Location?
|
1230
|
+
attr_reader closing_loc: Location?
|
1231
|
+
|
1232
|
+
def initialize: (Source source, Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void
|
1233
|
+
def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode
|
1234
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location }
|
1235
|
+
def opening: () -> String?
|
1236
|
+
def closing: () -> String?
|
1237
|
+
def type: () -> :find_pattern_node
|
1238
|
+
| ...
|
1239
|
+
def self.type: () -> :find_pattern_node
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
# Represents the use of the `..` or `...` operators to create flip flops.
|
1243
|
+
#
|
1244
|
+
# baz if foo .. bar
|
1245
|
+
# ^^^^^^^^^^
|
1246
|
+
class FlipFlopNode < Node
|
1247
|
+
include _Node
|
1248
|
+
|
1249
|
+
attr_reader flags: Integer
|
1250
|
+
attr_reader left: Prism::node?
|
1251
|
+
attr_reader right: Prism::node?
|
1252
|
+
attr_reader operator_loc: Location
|
1253
|
+
|
1254
|
+
def initialize: (Source source, Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void
|
1255
|
+
def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode
|
1256
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location }
|
1257
|
+
def exclude_end?: () -> bool
|
1258
|
+
def operator: () -> String
|
1259
|
+
def type: () -> :flip_flop_node
|
1260
|
+
| ...
|
1261
|
+
def self.type: () -> :flip_flop_node
|
1262
|
+
end
|
1263
|
+
|
1264
|
+
# Represents a floating point number literal.
|
1265
|
+
#
|
1266
|
+
# 1.0
|
1267
|
+
# ^^^
|
1268
|
+
class FloatNode < Node
|
1269
|
+
include _Node
|
1270
|
+
|
1271
|
+
attr_reader value: Float
|
1272
|
+
|
1273
|
+
def initialize: (Source source, Float value, Location location) -> void
|
1274
|
+
def copy: (?value: Float, ?location: Location) -> FloatNode
|
1275
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location }
|
1276
|
+
def type: () -> :float_node
|
1277
|
+
| ...
|
1278
|
+
def self.type: () -> :float_node
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
# Represents the use of the `for` keyword.
|
1282
|
+
#
|
1283
|
+
# for i in a end
|
1284
|
+
# ^^^^^^^^^^^^^^
|
1285
|
+
class ForNode < Node
|
1286
|
+
include _Node
|
1287
|
+
|
1288
|
+
attr_reader index: Prism::node
|
1289
|
+
attr_reader collection: Prism::node
|
1290
|
+
attr_reader statements: StatementsNode?
|
1291
|
+
attr_reader for_keyword_loc: Location
|
1292
|
+
attr_reader in_keyword_loc: Location
|
1293
|
+
attr_reader do_keyword_loc: Location?
|
1294
|
+
attr_reader end_keyword_loc: Location
|
1295
|
+
|
1296
|
+
def initialize: (Source source, Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void
|
1297
|
+
def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode
|
1298
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location }
|
1299
|
+
def for_keyword: () -> String
|
1300
|
+
def in_keyword: () -> String
|
1301
|
+
def do_keyword: () -> String?
|
1302
|
+
def end_keyword: () -> String
|
1303
|
+
def type: () -> :for_node
|
1304
|
+
| ...
|
1305
|
+
def self.type: () -> :for_node
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
# Represents forwarding all arguments to this method to another method.
|
1309
|
+
#
|
1310
|
+
# def foo(...)
|
1311
|
+
# bar(...)
|
1312
|
+
# ^^^
|
1313
|
+
# end
|
1314
|
+
class ForwardingArgumentsNode < Node
|
1315
|
+
include _Node
|
1316
|
+
|
1317
|
+
|
1318
|
+
def initialize: (Source source, Location location) -> void
|
1319
|
+
def copy: (?location: Location) -> ForwardingArgumentsNode
|
1320
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
1321
|
+
def type: () -> :forwarding_arguments_node
|
1322
|
+
| ...
|
1323
|
+
def self.type: () -> :forwarding_arguments_node
|
1324
|
+
end
|
1325
|
+
|
1326
|
+
# Represents the use of the forwarding parameter in a method, block, or lambda declaration.
|
1327
|
+
#
|
1328
|
+
# def foo(...)
|
1329
|
+
# ^^^
|
1330
|
+
# end
|
1331
|
+
class ForwardingParameterNode < Node
|
1332
|
+
include _Node
|
1333
|
+
|
1334
|
+
|
1335
|
+
def initialize: (Source source, Location location) -> void
|
1336
|
+
def copy: (?location: Location) -> ForwardingParameterNode
|
1337
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
1338
|
+
def type: () -> :forwarding_parameter_node
|
1339
|
+
| ...
|
1340
|
+
def self.type: () -> :forwarding_parameter_node
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
# Represents the use of the `super` keyword without parentheses or arguments.
|
1344
|
+
#
|
1345
|
+
# super
|
1346
|
+
# ^^^^^
|
1347
|
+
class ForwardingSuperNode < Node
|
1348
|
+
include _Node
|
1349
|
+
|
1350
|
+
attr_reader block: BlockNode?
|
1351
|
+
|
1352
|
+
def initialize: (Source source, BlockNode? block, Location location) -> void
|
1353
|
+
def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode
|
1354
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location }
|
1355
|
+
def type: () -> :forwarding_super_node
|
1356
|
+
| ...
|
1357
|
+
def self.type: () -> :forwarding_super_node
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# Represents the use of the `&&=` operator for assignment to a global variable.
|
1361
|
+
#
|
1362
|
+
# $target &&= value
|
1363
|
+
# ^^^^^^^^^^^^^^^^^
|
1364
|
+
class GlobalVariableAndWriteNode < Node
|
1365
|
+
include _Node
|
1366
|
+
|
1367
|
+
attr_reader name: Symbol
|
1368
|
+
attr_reader name_loc: Location
|
1369
|
+
attr_reader operator_loc: Location
|
1370
|
+
attr_reader value: Prism::node
|
1371
|
+
|
1372
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
1373
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode
|
1374
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
1375
|
+
def operator: () -> String
|
1376
|
+
def type: () -> :global_variable_and_write_node
|
1377
|
+
| ...
|
1378
|
+
def self.type: () -> :global_variable_and_write_node
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
# Represents assigning to a global variable using an operator that isn't `=`.
|
1382
|
+
#
|
1383
|
+
# $target += value
|
1384
|
+
# ^^^^^^^^^^^^^^^^
|
1385
|
+
class GlobalVariableOperatorWriteNode < Node
|
1386
|
+
include _Node
|
1387
|
+
|
1388
|
+
attr_reader name: Symbol
|
1389
|
+
attr_reader name_loc: Location
|
1390
|
+
attr_reader binary_operator_loc: Location
|
1391
|
+
attr_reader value: Prism::node
|
1392
|
+
attr_reader binary_operator: Symbol
|
1393
|
+
|
1394
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void
|
1395
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode
|
1396
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location }
|
1397
|
+
def type: () -> :global_variable_operator_write_node
|
1398
|
+
| ...
|
1399
|
+
def self.type: () -> :global_variable_operator_write_node
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
# Represents the use of the `||=` operator for assignment to a global variable.
|
1403
|
+
#
|
1404
|
+
# $target ||= value
|
1405
|
+
# ^^^^^^^^^^^^^^^^^
|
1406
|
+
class GlobalVariableOrWriteNode < Node
|
1407
|
+
include _Node
|
1408
|
+
|
1409
|
+
attr_reader name: Symbol
|
1410
|
+
attr_reader name_loc: Location
|
1411
|
+
attr_reader operator_loc: Location
|
1412
|
+
attr_reader value: Prism::node
|
1413
|
+
|
1414
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
1415
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode
|
1416
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
1417
|
+
def operator: () -> String
|
1418
|
+
def type: () -> :global_variable_or_write_node
|
1419
|
+
| ...
|
1420
|
+
def self.type: () -> :global_variable_or_write_node
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Represents referencing a global variable.
|
1424
|
+
#
|
1425
|
+
# $foo
|
1426
|
+
# ^^^^
|
1427
|
+
class GlobalVariableReadNode < Node
|
1428
|
+
include _Node
|
1429
|
+
|
1430
|
+
attr_reader name: Symbol
|
1431
|
+
|
1432
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1433
|
+
def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode
|
1434
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1435
|
+
def type: () -> :global_variable_read_node
|
1436
|
+
| ...
|
1437
|
+
def self.type: () -> :global_variable_read_node
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# Represents writing to a global variable in a context that doesn't have an explicit value.
|
1441
|
+
#
|
1442
|
+
# $foo, $bar = baz
|
1443
|
+
# ^^^^ ^^^^
|
1444
|
+
class GlobalVariableTargetNode < Node
|
1445
|
+
include _Node
|
1446
|
+
|
1447
|
+
attr_reader name: Symbol
|
1448
|
+
|
1449
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1450
|
+
def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode
|
1451
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1452
|
+
def type: () -> :global_variable_target_node
|
1453
|
+
| ...
|
1454
|
+
def self.type: () -> :global_variable_target_node
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
# Represents writing to a global variable.
|
1458
|
+
#
|
1459
|
+
# $foo = 1
|
1460
|
+
# ^^^^^^^^
|
1461
|
+
class GlobalVariableWriteNode < Node
|
1462
|
+
include _Node
|
1463
|
+
|
1464
|
+
attr_reader name: Symbol
|
1465
|
+
attr_reader name_loc: Location
|
1466
|
+
attr_reader value: Prism::node
|
1467
|
+
attr_reader operator_loc: Location
|
1468
|
+
|
1469
|
+
def initialize: (Source source, Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void
|
1470
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode
|
1471
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location }
|
1472
|
+
def operator: () -> String
|
1473
|
+
def type: () -> :global_variable_write_node
|
1474
|
+
| ...
|
1475
|
+
def self.type: () -> :global_variable_write_node
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
# Represents a hash literal.
|
1479
|
+
#
|
1480
|
+
# { a => b }
|
1481
|
+
# ^^^^^^^^^^
|
1482
|
+
class HashNode < Node
|
1483
|
+
include _Node
|
1484
|
+
|
1485
|
+
attr_reader opening_loc: Location
|
1486
|
+
attr_reader elements: Array[AssocNode | AssocSplatNode]
|
1487
|
+
attr_reader closing_loc: Location
|
1488
|
+
|
1489
|
+
def initialize: (Source source, Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void
|
1490
|
+
def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode
|
1491
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location }
|
1492
|
+
def opening: () -> String
|
1493
|
+
def closing: () -> String
|
1494
|
+
def type: () -> :hash_node
|
1495
|
+
| ...
|
1496
|
+
def self.type: () -> :hash_node
|
1497
|
+
end
|
1498
|
+
|
1499
|
+
# Represents a hash pattern in pattern matching.
|
1500
|
+
#
|
1501
|
+
# foo => { a: 1, b: 2 }
|
1502
|
+
# ^^^^^^^^^^^^^^
|
1503
|
+
#
|
1504
|
+
# foo => { a: 1, b: 2, **c }
|
1505
|
+
# ^^^^^^^^^^^^^^^^^^^
|
1506
|
+
class HashPatternNode < Node
|
1507
|
+
include _Node
|
1508
|
+
|
1509
|
+
attr_reader constant: Prism::node?
|
1510
|
+
attr_reader elements: Array[AssocNode]
|
1511
|
+
attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil
|
1512
|
+
attr_reader opening_loc: Location?
|
1513
|
+
attr_reader closing_loc: Location?
|
1514
|
+
|
1515
|
+
def initialize: (Source source, Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void
|
1516
|
+
def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode
|
1517
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location }
|
1518
|
+
def opening: () -> String?
|
1519
|
+
def closing: () -> String?
|
1520
|
+
def type: () -> :hash_pattern_node
|
1521
|
+
| ...
|
1522
|
+
def self.type: () -> :hash_pattern_node
|
1523
|
+
end
|
1524
|
+
|
1525
|
+
# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression.
|
1526
|
+
#
|
1527
|
+
# bar if foo
|
1528
|
+
# ^^^^^^^^^^
|
1529
|
+
#
|
1530
|
+
# if foo then bar end
|
1531
|
+
# ^^^^^^^^^^^^^^^^^^^
|
1532
|
+
#
|
1533
|
+
# foo ? bar : baz
|
1534
|
+
# ^^^^^^^^^^^^^^^
|
1535
|
+
class IfNode < Node
|
1536
|
+
include _Node
|
1537
|
+
|
1538
|
+
attr_reader if_keyword_loc: Location?
|
1539
|
+
attr_reader predicate: Prism::node
|
1540
|
+
attr_reader then_keyword_loc: Location?
|
1541
|
+
attr_reader statements: StatementsNode?
|
1542
|
+
attr_reader consequent: Prism::node?
|
1543
|
+
attr_reader end_keyword_loc: Location?
|
1544
|
+
|
1545
|
+
def initialize: (Source source, Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void
|
1546
|
+
def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode
|
1547
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location }
|
1548
|
+
def if_keyword: () -> String?
|
1549
|
+
def then_keyword: () -> String?
|
1550
|
+
def end_keyword: () -> String?
|
1551
|
+
def type: () -> :if_node
|
1552
|
+
| ...
|
1553
|
+
def self.type: () -> :if_node
|
1554
|
+
end
|
1555
|
+
|
1556
|
+
# Represents an imaginary number literal.
|
1557
|
+
#
|
1558
|
+
# 1.0i
|
1559
|
+
# ^^^^
|
1560
|
+
class ImaginaryNode < Node
|
1561
|
+
include _Node
|
1562
|
+
|
1563
|
+
attr_reader numeric: FloatNode | IntegerNode | RationalNode
|
1564
|
+
|
1565
|
+
def initialize: (Source source, FloatNode | IntegerNode | RationalNode numeric, Location location) -> void
|
1566
|
+
def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode
|
1567
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location }
|
1568
|
+
def type: () -> :imaginary_node
|
1569
|
+
| ...
|
1570
|
+
def self.type: () -> :imaginary_node
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
|
1574
|
+
#
|
1575
|
+
# { foo: }
|
1576
|
+
# ^^^^
|
1577
|
+
#
|
1578
|
+
# { Foo: }
|
1579
|
+
# ^^^^
|
1580
|
+
#
|
1581
|
+
# foo in { bar: }
|
1582
|
+
# ^^^^
|
1583
|
+
class ImplicitNode < Node
|
1584
|
+
include _Node
|
1585
|
+
|
1586
|
+
attr_reader value: Prism::node
|
1587
|
+
|
1588
|
+
def initialize: (Source source, Prism::node value, Location location) -> void
|
1589
|
+
def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode
|
1590
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location }
|
1591
|
+
def type: () -> :implicit_node
|
1592
|
+
| ...
|
1593
|
+
def self.type: () -> :implicit_node
|
1594
|
+
end
|
1595
|
+
|
1596
|
+
# Represents using a trailing comma to indicate an implicit rest parameter.
|
1597
|
+
#
|
1598
|
+
# foo { |bar,| }
|
1599
|
+
# ^
|
1600
|
+
#
|
1601
|
+
# foo in [bar,]
|
1602
|
+
# ^
|
1603
|
+
#
|
1604
|
+
# for foo, in bar do end
|
1605
|
+
# ^
|
1606
|
+
#
|
1607
|
+
# foo, = bar
|
1608
|
+
# ^
|
1609
|
+
class ImplicitRestNode < Node
|
1610
|
+
include _Node
|
1611
|
+
|
1612
|
+
|
1613
|
+
def initialize: (Source source, Location location) -> void
|
1614
|
+
def copy: (?location: Location) -> ImplicitRestNode
|
1615
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
1616
|
+
def type: () -> :implicit_rest_node
|
1617
|
+
| ...
|
1618
|
+
def self.type: () -> :implicit_rest_node
|
1619
|
+
end
|
1620
|
+
|
1621
|
+
# Represents the use of the `in` keyword in a case statement.
|
1622
|
+
#
|
1623
|
+
# case a; in b then c end
|
1624
|
+
# ^^^^^^^^^^^
|
1625
|
+
class InNode < Node
|
1626
|
+
include _Node
|
1627
|
+
|
1628
|
+
attr_reader pattern: Prism::node
|
1629
|
+
attr_reader statements: StatementsNode?
|
1630
|
+
attr_reader in_loc: Location
|
1631
|
+
attr_reader then_loc: Location?
|
1632
|
+
|
1633
|
+
def initialize: (Source source, Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void
|
1634
|
+
def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode
|
1635
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location }
|
1636
|
+
def in: () -> String
|
1637
|
+
def then: () -> String?
|
1638
|
+
def type: () -> :in_node
|
1639
|
+
| ...
|
1640
|
+
def self.type: () -> :in_node
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
# Represents the use of the `&&=` operator on a call to the `[]` method.
|
1644
|
+
#
|
1645
|
+
# foo.bar[baz] &&= value
|
1646
|
+
# ^^^^^^^^^^^^^^^^^^^^^^
|
1647
|
+
class IndexAndWriteNode < Node
|
1648
|
+
include _Node
|
1649
|
+
|
1650
|
+
attr_reader flags: Integer
|
1651
|
+
attr_reader receiver: Prism::node?
|
1652
|
+
attr_reader call_operator_loc: Location?
|
1653
|
+
attr_reader opening_loc: Location
|
1654
|
+
attr_reader arguments: ArgumentsNode?
|
1655
|
+
attr_reader closing_loc: Location
|
1656
|
+
attr_reader block: Prism::node?
|
1657
|
+
attr_reader operator_loc: Location
|
1658
|
+
attr_reader value: Prism::node
|
1659
|
+
|
1660
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void
|
1661
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode
|
1662
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location }
|
1663
|
+
def safe_navigation?: () -> bool
|
1664
|
+
def variable_call?: () -> bool
|
1665
|
+
def attribute_write?: () -> bool
|
1666
|
+
def ignore_visibility?: () -> bool
|
1667
|
+
def call_operator: () -> String?
|
1668
|
+
def opening: () -> String
|
1669
|
+
def closing: () -> String
|
1670
|
+
def operator: () -> String
|
1671
|
+
def type: () -> :index_and_write_node
|
1672
|
+
| ...
|
1673
|
+
def self.type: () -> :index_and_write_node
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
# Represents the use of an assignment operator on a call to `[]`.
|
1677
|
+
#
|
1678
|
+
# foo.bar[baz] += value
|
1679
|
+
# ^^^^^^^^^^^^^^^^^^^^^
|
1680
|
+
class IndexOperatorWriteNode < Node
|
1681
|
+
include _Node
|
1682
|
+
|
1683
|
+
attr_reader flags: Integer
|
1684
|
+
attr_reader receiver: Prism::node?
|
1685
|
+
attr_reader call_operator_loc: Location?
|
1686
|
+
attr_reader opening_loc: Location
|
1687
|
+
attr_reader arguments: ArgumentsNode?
|
1688
|
+
attr_reader closing_loc: Location
|
1689
|
+
attr_reader block: Prism::node?
|
1690
|
+
attr_reader binary_operator: Symbol
|
1691
|
+
attr_reader binary_operator_loc: Location
|
1692
|
+
attr_reader value: Prism::node
|
1693
|
+
|
1694
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void
|
1695
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode
|
1696
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location }
|
1697
|
+
def safe_navigation?: () -> bool
|
1698
|
+
def variable_call?: () -> bool
|
1699
|
+
def attribute_write?: () -> bool
|
1700
|
+
def ignore_visibility?: () -> bool
|
1701
|
+
def call_operator: () -> String?
|
1702
|
+
def opening: () -> String
|
1703
|
+
def closing: () -> String
|
1704
|
+
def type: () -> :index_operator_write_node
|
1705
|
+
| ...
|
1706
|
+
def self.type: () -> :index_operator_write_node
|
1707
|
+
end
|
1708
|
+
|
1709
|
+
# Represents the use of the `||=` operator on a call to `[]`.
|
1710
|
+
#
|
1711
|
+
# foo.bar[baz] ||= value
|
1712
|
+
# ^^^^^^^^^^^^^^^^^^^^^^
|
1713
|
+
class IndexOrWriteNode < Node
|
1714
|
+
include _Node
|
1715
|
+
|
1716
|
+
attr_reader flags: Integer
|
1717
|
+
attr_reader receiver: Prism::node?
|
1718
|
+
attr_reader call_operator_loc: Location?
|
1719
|
+
attr_reader opening_loc: Location
|
1720
|
+
attr_reader arguments: ArgumentsNode?
|
1721
|
+
attr_reader closing_loc: Location
|
1722
|
+
attr_reader block: Prism::node?
|
1723
|
+
attr_reader operator_loc: Location
|
1724
|
+
attr_reader value: Prism::node
|
1725
|
+
|
1726
|
+
def initialize: (Source source, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void
|
1727
|
+
def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode
|
1728
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location }
|
1729
|
+
def safe_navigation?: () -> bool
|
1730
|
+
def variable_call?: () -> bool
|
1731
|
+
def attribute_write?: () -> bool
|
1732
|
+
def ignore_visibility?: () -> bool
|
1733
|
+
def call_operator: () -> String?
|
1734
|
+
def opening: () -> String
|
1735
|
+
def closing: () -> String
|
1736
|
+
def operator: () -> String
|
1737
|
+
def type: () -> :index_or_write_node
|
1738
|
+
| ...
|
1739
|
+
def self.type: () -> :index_or_write_node
|
1740
|
+
end
|
1741
|
+
|
1742
|
+
# Represents assigning to an index.
|
1743
|
+
#
|
1744
|
+
# foo[bar], = 1
|
1745
|
+
# ^^^^^^^^
|
1746
|
+
#
|
1747
|
+
# begin
|
1748
|
+
# rescue => foo[bar]
|
1749
|
+
# ^^^^^^^^
|
1750
|
+
# end
|
1751
|
+
#
|
1752
|
+
# for foo[bar] in baz do end
|
1753
|
+
# ^^^^^^^^
|
1754
|
+
class IndexTargetNode < Node
|
1755
|
+
include _Node
|
1756
|
+
|
1757
|
+
attr_reader flags: Integer
|
1758
|
+
attr_reader receiver: Prism::node
|
1759
|
+
attr_reader opening_loc: Location
|
1760
|
+
attr_reader arguments: ArgumentsNode?
|
1761
|
+
attr_reader closing_loc: Location
|
1762
|
+
attr_reader block: Prism::node?
|
1763
|
+
|
1764
|
+
def initialize: (Source source, Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void
|
1765
|
+
def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode
|
1766
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location }
|
1767
|
+
def safe_navigation?: () -> bool
|
1768
|
+
def variable_call?: () -> bool
|
1769
|
+
def attribute_write?: () -> bool
|
1770
|
+
def ignore_visibility?: () -> bool
|
1771
|
+
def opening: () -> String
|
1772
|
+
def closing: () -> String
|
1773
|
+
def type: () -> :index_target_node
|
1774
|
+
| ...
|
1775
|
+
def self.type: () -> :index_target_node
|
1776
|
+
end
|
1777
|
+
|
1778
|
+
# Represents the use of the `&&=` operator for assignment to an instance variable.
|
1779
|
+
#
|
1780
|
+
# @target &&= value
|
1781
|
+
# ^^^^^^^^^^^^^^^^^
|
1782
|
+
class InstanceVariableAndWriteNode < Node
|
1783
|
+
include _Node
|
1784
|
+
|
1785
|
+
attr_reader name: Symbol
|
1786
|
+
attr_reader name_loc: Location
|
1787
|
+
attr_reader operator_loc: Location
|
1788
|
+
attr_reader value: Prism::node
|
1789
|
+
|
1790
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
1791
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode
|
1792
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
1793
|
+
def operator: () -> String
|
1794
|
+
def type: () -> :instance_variable_and_write_node
|
1795
|
+
| ...
|
1796
|
+
def self.type: () -> :instance_variable_and_write_node
|
1797
|
+
end
|
1798
|
+
|
1799
|
+
# Represents assigning to an instance variable using an operator that isn't `=`.
|
1800
|
+
#
|
1801
|
+
# @target += value
|
1802
|
+
# ^^^^^^^^^^^^^^^^
|
1803
|
+
class InstanceVariableOperatorWriteNode < Node
|
1804
|
+
include _Node
|
1805
|
+
|
1806
|
+
attr_reader name: Symbol
|
1807
|
+
attr_reader name_loc: Location
|
1808
|
+
attr_reader binary_operator_loc: Location
|
1809
|
+
attr_reader value: Prism::node
|
1810
|
+
attr_reader binary_operator: Symbol
|
1811
|
+
|
1812
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void
|
1813
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode
|
1814
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location }
|
1815
|
+
def type: () -> :instance_variable_operator_write_node
|
1816
|
+
| ...
|
1817
|
+
def self.type: () -> :instance_variable_operator_write_node
|
1818
|
+
end
|
1819
|
+
|
1820
|
+
# Represents the use of the `||=` operator for assignment to an instance variable.
|
1821
|
+
#
|
1822
|
+
# @target ||= value
|
1823
|
+
# ^^^^^^^^^^^^^^^^^
|
1824
|
+
class InstanceVariableOrWriteNode < Node
|
1825
|
+
include _Node
|
1826
|
+
|
1827
|
+
attr_reader name: Symbol
|
1828
|
+
attr_reader name_loc: Location
|
1829
|
+
attr_reader operator_loc: Location
|
1830
|
+
attr_reader value: Prism::node
|
1831
|
+
|
1832
|
+
def initialize: (Source source, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
1833
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode
|
1834
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
1835
|
+
def operator: () -> String
|
1836
|
+
def type: () -> :instance_variable_or_write_node
|
1837
|
+
| ...
|
1838
|
+
def self.type: () -> :instance_variable_or_write_node
|
1839
|
+
end
|
1840
|
+
|
1841
|
+
# Represents referencing an instance variable.
|
1842
|
+
#
|
1843
|
+
# @foo
|
1844
|
+
# ^^^^
|
1845
|
+
class InstanceVariableReadNode < Node
|
1846
|
+
include _Node
|
1847
|
+
|
1848
|
+
attr_reader name: Symbol
|
1849
|
+
|
1850
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1851
|
+
def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode
|
1852
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1853
|
+
def type: () -> :instance_variable_read_node
|
1854
|
+
| ...
|
1855
|
+
def self.type: () -> :instance_variable_read_node
|
1856
|
+
end
|
1857
|
+
|
1858
|
+
# Represents writing to an instance variable in a context that doesn't have an explicit value.
|
1859
|
+
#
|
1860
|
+
# @foo, @bar = baz
|
1861
|
+
# ^^^^ ^^^^
|
1862
|
+
class InstanceVariableTargetNode < Node
|
1863
|
+
include _Node
|
1864
|
+
|
1865
|
+
attr_reader name: Symbol
|
1866
|
+
|
1867
|
+
def initialize: (Source source, Symbol name, Location location) -> void
|
1868
|
+
def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode
|
1869
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location }
|
1870
|
+
def type: () -> :instance_variable_target_node
|
1871
|
+
| ...
|
1872
|
+
def self.type: () -> :instance_variable_target_node
|
1873
|
+
end
|
1874
|
+
|
1875
|
+
# Represents writing to an instance variable.
|
1876
|
+
#
|
1877
|
+
# @foo = 1
|
1878
|
+
# ^^^^^^^^
|
1879
|
+
class InstanceVariableWriteNode < Node
|
1880
|
+
include _Node
|
1881
|
+
|
1882
|
+
attr_reader name: Symbol
|
1883
|
+
attr_reader name_loc: Location
|
1884
|
+
attr_reader value: Prism::node
|
1885
|
+
attr_reader operator_loc: Location
|
1886
|
+
|
1887
|
+
def initialize: (Source source, Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void
|
1888
|
+
def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode
|
1889
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location }
|
1890
|
+
def operator: () -> String
|
1891
|
+
def type: () -> :instance_variable_write_node
|
1892
|
+
| ...
|
1893
|
+
def self.type: () -> :instance_variable_write_node
|
1894
|
+
end
|
1895
|
+
|
1896
|
+
# Represents an integer number literal.
|
1897
|
+
#
|
1898
|
+
# 1
|
1899
|
+
# ^
|
1900
|
+
class IntegerNode < Node
|
1901
|
+
include _Node
|
1902
|
+
|
1903
|
+
attr_reader flags: Integer
|
1904
|
+
attr_reader value: Integer
|
1905
|
+
|
1906
|
+
def initialize: (Source source, Integer flags, Integer value, Location location) -> void
|
1907
|
+
def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode
|
1908
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location }
|
1909
|
+
def binary?: () -> bool
|
1910
|
+
def decimal?: () -> bool
|
1911
|
+
def octal?: () -> bool
|
1912
|
+
def hexadecimal?: () -> bool
|
1913
|
+
def type: () -> :integer_node
|
1914
|
+
| ...
|
1915
|
+
def self.type: () -> :integer_node
|
1916
|
+
end
|
1917
|
+
|
1918
|
+
# 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.
|
1919
|
+
#
|
1920
|
+
# if /foo #{bar} baz/ then end
|
1921
|
+
# ^^^^^^^^^^^^^^^^
|
1922
|
+
class InterpolatedMatchLastLineNode < Node
|
1923
|
+
include _Node
|
1924
|
+
|
1925
|
+
attr_reader flags: Integer
|
1926
|
+
attr_reader opening_loc: Location
|
1927
|
+
attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode]
|
1928
|
+
attr_reader closing_loc: Location
|
1929
|
+
|
1930
|
+
def initialize: (Source source, Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void
|
1931
|
+
def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode
|
1932
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location }
|
1933
|
+
def ignore_case?: () -> bool
|
1934
|
+
def extended?: () -> bool
|
1935
|
+
def multi_line?: () -> bool
|
1936
|
+
def once?: () -> bool
|
1937
|
+
def euc_jp?: () -> bool
|
1938
|
+
def ascii_8bit?: () -> bool
|
1939
|
+
def windows_31j?: () -> bool
|
1940
|
+
def utf_8?: () -> bool
|
1941
|
+
def forced_utf8_encoding?: () -> bool
|
1942
|
+
def forced_binary_encoding?: () -> bool
|
1943
|
+
def forced_us_ascii_encoding?: () -> bool
|
1944
|
+
def opening: () -> String
|
1945
|
+
def closing: () -> String
|
1946
|
+
def type: () -> :interpolated_match_last_line_node
|
1947
|
+
| ...
|
1948
|
+
def self.type: () -> :interpolated_match_last_line_node
|
1949
|
+
end
|
1950
|
+
|
1951
|
+
# Represents a regular expression literal that contains interpolation.
|
1952
|
+
#
|
1953
|
+
# /foo #{bar} baz/
|
1954
|
+
# ^^^^^^^^^^^^^^^^
|
1955
|
+
class InterpolatedRegularExpressionNode < Node
|
1956
|
+
include _Node
|
1957
|
+
|
1958
|
+
attr_reader flags: Integer
|
1959
|
+
attr_reader opening_loc: Location
|
1960
|
+
attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode]
|
1961
|
+
attr_reader closing_loc: Location
|
1962
|
+
|
1963
|
+
def initialize: (Source source, Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void
|
1964
|
+
def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode
|
1965
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location }
|
1966
|
+
def ignore_case?: () -> bool
|
1967
|
+
def extended?: () -> bool
|
1968
|
+
def multi_line?: () -> bool
|
1969
|
+
def once?: () -> bool
|
1970
|
+
def euc_jp?: () -> bool
|
1971
|
+
def ascii_8bit?: () -> bool
|
1972
|
+
def windows_31j?: () -> bool
|
1973
|
+
def utf_8?: () -> bool
|
1974
|
+
def forced_utf8_encoding?: () -> bool
|
1975
|
+
def forced_binary_encoding?: () -> bool
|
1976
|
+
def forced_us_ascii_encoding?: () -> bool
|
1977
|
+
def opening: () -> String
|
1978
|
+
def closing: () -> String
|
1979
|
+
def type: () -> :interpolated_regular_expression_node
|
1980
|
+
| ...
|
1981
|
+
def self.type: () -> :interpolated_regular_expression_node
|
1982
|
+
end
|
1983
|
+
|
1984
|
+
# Represents a string literal that contains interpolation.
|
1985
|
+
#
|
1986
|
+
# "foo #{bar} baz"
|
1987
|
+
# ^^^^^^^^^^^^^^^^
|
1988
|
+
class InterpolatedStringNode < Node
|
1989
|
+
include _Node
|
1990
|
+
|
1991
|
+
attr_reader flags: Integer
|
1992
|
+
attr_reader opening_loc: Location?
|
1993
|
+
attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode]
|
1994
|
+
attr_reader closing_loc: Location?
|
1995
|
+
|
1996
|
+
def initialize: (Source source, Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void
|
1997
|
+
def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode
|
1998
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location }
|
1999
|
+
def frozen?: () -> bool
|
2000
|
+
def mutable?: () -> bool
|
2001
|
+
def opening: () -> String?
|
2002
|
+
def closing: () -> String?
|
2003
|
+
def type: () -> :interpolated_string_node
|
2004
|
+
| ...
|
2005
|
+
def self.type: () -> :interpolated_string_node
|
2006
|
+
end
|
2007
|
+
|
2008
|
+
# Represents a symbol literal that contains interpolation.
|
2009
|
+
#
|
2010
|
+
# :"foo #{bar} baz"
|
2011
|
+
# ^^^^^^^^^^^^^^^^^
|
2012
|
+
class InterpolatedSymbolNode < Node
|
2013
|
+
include _Node
|
2014
|
+
|
2015
|
+
attr_reader opening_loc: Location?
|
2016
|
+
attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode]
|
2017
|
+
attr_reader closing_loc: Location?
|
2018
|
+
|
2019
|
+
def initialize: (Source source, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void
|
2020
|
+
def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode
|
2021
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location }
|
2022
|
+
def opening: () -> String?
|
2023
|
+
def closing: () -> String?
|
2024
|
+
def type: () -> :interpolated_symbol_node
|
2025
|
+
| ...
|
2026
|
+
def self.type: () -> :interpolated_symbol_node
|
2027
|
+
end
|
2028
|
+
|
2029
|
+
# Represents an xstring literal that contains interpolation.
|
2030
|
+
#
|
2031
|
+
# `foo #{bar} baz`
|
2032
|
+
# ^^^^^^^^^^^^^^^^
|
2033
|
+
class InterpolatedXStringNode < Node
|
2034
|
+
include _Node
|
2035
|
+
|
2036
|
+
attr_reader opening_loc: Location
|
2037
|
+
attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode]
|
2038
|
+
attr_reader closing_loc: Location
|
2039
|
+
|
2040
|
+
def initialize: (Source source, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void
|
2041
|
+
def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode
|
2042
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location }
|
2043
|
+
def opening: () -> String
|
2044
|
+
def closing: () -> String
|
2045
|
+
def type: () -> :interpolated_x_string_node
|
2046
|
+
| ...
|
2047
|
+
def self.type: () -> :interpolated_x_string_node
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda.
|
2051
|
+
#
|
2052
|
+
# -> { it + it }
|
2053
|
+
# ^^^^^^^^^^^^^^
|
2054
|
+
class ItParametersNode < Node
|
2055
|
+
include _Node
|
2056
|
+
|
2057
|
+
|
2058
|
+
def initialize: (Source source, Location location) -> void
|
2059
|
+
def copy: (?location: Location) -> ItParametersNode
|
2060
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2061
|
+
def type: () -> :it_parameters_node
|
2062
|
+
| ...
|
2063
|
+
def self.type: () -> :it_parameters_node
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
# Represents a hash literal without opening and closing braces.
|
2067
|
+
#
|
2068
|
+
# foo(a: b)
|
2069
|
+
# ^^^^
|
2070
|
+
class KeywordHashNode < Node
|
2071
|
+
include _Node
|
2072
|
+
|
2073
|
+
attr_reader flags: Integer
|
2074
|
+
attr_reader elements: Array[AssocNode | AssocSplatNode]
|
2075
|
+
|
2076
|
+
def initialize: (Source source, Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void
|
2077
|
+
def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode
|
2078
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location }
|
2079
|
+
def symbol_keys?: () -> bool
|
2080
|
+
def type: () -> :keyword_hash_node
|
2081
|
+
| ...
|
2082
|
+
def self.type: () -> :keyword_hash_node
|
2083
|
+
end
|
2084
|
+
|
2085
|
+
# Represents a keyword rest parameter to a method, block, or lambda definition.
|
2086
|
+
#
|
2087
|
+
# def a(**b)
|
2088
|
+
# ^^^
|
2089
|
+
# end
|
2090
|
+
class KeywordRestParameterNode < Node
|
2091
|
+
include _Node
|
2092
|
+
|
2093
|
+
attr_reader flags: Integer
|
2094
|
+
attr_reader name: Symbol?
|
2095
|
+
attr_reader name_loc: Location?
|
2096
|
+
attr_reader operator_loc: Location
|
2097
|
+
|
2098
|
+
def initialize: (Source source, Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void
|
2099
|
+
def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode
|
2100
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location }
|
2101
|
+
def repeated_parameter?: () -> bool
|
2102
|
+
def operator: () -> String
|
2103
|
+
def type: () -> :keyword_rest_parameter_node
|
2104
|
+
| ...
|
2105
|
+
def self.type: () -> :keyword_rest_parameter_node
|
2106
|
+
end
|
2107
|
+
|
2108
|
+
# Represents using a lambda literal (not the lambda method call).
|
2109
|
+
#
|
2110
|
+
# ->(value) { value * 2 }
|
2111
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^
|
2112
|
+
class LambdaNode < Node
|
2113
|
+
include _Node
|
2114
|
+
|
2115
|
+
attr_reader locals: Array[Symbol]
|
2116
|
+
attr_reader operator_loc: Location
|
2117
|
+
attr_reader opening_loc: Location
|
2118
|
+
attr_reader closing_loc: Location
|
2119
|
+
attr_reader parameters: Prism::node?
|
2120
|
+
attr_reader body: Prism::node?
|
2121
|
+
|
2122
|
+
def initialize: (Source source, Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void
|
2123
|
+
def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode
|
2124
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location }
|
2125
|
+
def operator: () -> String
|
2126
|
+
def opening: () -> String
|
2127
|
+
def closing: () -> String
|
2128
|
+
def type: () -> :lambda_node
|
2129
|
+
| ...
|
2130
|
+
def self.type: () -> :lambda_node
|
2131
|
+
end
|
2132
|
+
|
2133
|
+
# Represents the use of the `&&=` operator for assignment to a local variable.
|
2134
|
+
#
|
2135
|
+
# target &&= value
|
2136
|
+
# ^^^^^^^^^^^^^^^^
|
2137
|
+
class LocalVariableAndWriteNode < Node
|
2138
|
+
include _Node
|
2139
|
+
|
2140
|
+
attr_reader name_loc: Location
|
2141
|
+
attr_reader operator_loc: Location
|
2142
|
+
attr_reader value: Prism::node
|
2143
|
+
attr_reader name: Symbol
|
2144
|
+
attr_reader depth: Integer
|
2145
|
+
|
2146
|
+
def initialize: (Source source, Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void
|
2147
|
+
def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode
|
2148
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location }
|
2149
|
+
def operator: () -> String
|
2150
|
+
def type: () -> :local_variable_and_write_node
|
2151
|
+
| ...
|
2152
|
+
def self.type: () -> :local_variable_and_write_node
|
2153
|
+
end
|
2154
|
+
|
2155
|
+
# Represents assigning to a local variable using an operator that isn't `=`.
|
2156
|
+
#
|
2157
|
+
# target += value
|
2158
|
+
# ^^^^^^^^^^^^^^^
|
2159
|
+
class LocalVariableOperatorWriteNode < Node
|
2160
|
+
include _Node
|
2161
|
+
|
2162
|
+
attr_reader name_loc: Location
|
2163
|
+
attr_reader binary_operator_loc: Location
|
2164
|
+
attr_reader value: Prism::node
|
2165
|
+
attr_reader name: Symbol
|
2166
|
+
attr_reader binary_operator: Symbol
|
2167
|
+
attr_reader depth: Integer
|
2168
|
+
|
2169
|
+
def initialize: (Source source, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void
|
2170
|
+
def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode
|
2171
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location }
|
2172
|
+
def type: () -> :local_variable_operator_write_node
|
2173
|
+
| ...
|
2174
|
+
def self.type: () -> :local_variable_operator_write_node
|
2175
|
+
end
|
2176
|
+
|
2177
|
+
# Represents the use of the `||=` operator for assignment to a local variable.
|
2178
|
+
#
|
2179
|
+
# target ||= value
|
2180
|
+
# ^^^^^^^^^^^^^^^^
|
2181
|
+
class LocalVariableOrWriteNode < Node
|
2182
|
+
include _Node
|
2183
|
+
|
2184
|
+
attr_reader name_loc: Location
|
2185
|
+
attr_reader operator_loc: Location
|
2186
|
+
attr_reader value: Prism::node
|
2187
|
+
attr_reader name: Symbol
|
2188
|
+
attr_reader depth: Integer
|
2189
|
+
|
2190
|
+
def initialize: (Source source, Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void
|
2191
|
+
def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode
|
2192
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location }
|
2193
|
+
def operator: () -> String
|
2194
|
+
def type: () -> :local_variable_or_write_node
|
2195
|
+
| ...
|
2196
|
+
def self.type: () -> :local_variable_or_write_node
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
# 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.
|
2200
|
+
#
|
2201
|
+
# foo
|
2202
|
+
# ^^^
|
2203
|
+
class LocalVariableReadNode < Node
|
2204
|
+
include _Node
|
2205
|
+
|
2206
|
+
attr_reader name: Symbol
|
2207
|
+
attr_reader depth: Integer
|
2208
|
+
|
2209
|
+
def initialize: (Source source, Symbol name, Integer depth, Location location) -> void
|
2210
|
+
def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode
|
2211
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location }
|
2212
|
+
def type: () -> :local_variable_read_node
|
2213
|
+
| ...
|
2214
|
+
def self.type: () -> :local_variable_read_node
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
# Represents writing to a local variable in a context that doesn't have an explicit value.
|
2218
|
+
#
|
2219
|
+
# foo, bar = baz
|
2220
|
+
# ^^^ ^^^
|
2221
|
+
class LocalVariableTargetNode < Node
|
2222
|
+
include _Node
|
2223
|
+
|
2224
|
+
attr_reader name: Symbol
|
2225
|
+
attr_reader depth: Integer
|
2226
|
+
|
2227
|
+
def initialize: (Source source, Symbol name, Integer depth, Location location) -> void
|
2228
|
+
def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode
|
2229
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location }
|
2230
|
+
def type: () -> :local_variable_target_node
|
2231
|
+
| ...
|
2232
|
+
def self.type: () -> :local_variable_target_node
|
2233
|
+
end
|
2234
|
+
|
2235
|
+
# Represents writing to a local variable.
|
2236
|
+
#
|
2237
|
+
# foo = 1
|
2238
|
+
# ^^^^^^^
|
2239
|
+
class LocalVariableWriteNode < Node
|
2240
|
+
include _Node
|
2241
|
+
|
2242
|
+
attr_reader name: Symbol
|
2243
|
+
attr_reader depth: Integer
|
2244
|
+
attr_reader name_loc: Location
|
2245
|
+
attr_reader value: Prism::node
|
2246
|
+
attr_reader operator_loc: Location
|
2247
|
+
|
2248
|
+
def initialize: (Source source, Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void
|
2249
|
+
def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode
|
2250
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location }
|
2251
|
+
def operator: () -> String
|
2252
|
+
def type: () -> :local_variable_write_node
|
2253
|
+
| ...
|
2254
|
+
def self.type: () -> :local_variable_write_node
|
2255
|
+
end
|
2256
|
+
|
2257
|
+
# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
|
2258
|
+
#
|
2259
|
+
# if /foo/i then end
|
2260
|
+
# ^^^^^^
|
2261
|
+
class MatchLastLineNode < Node
|
2262
|
+
include _Node
|
2263
|
+
|
2264
|
+
attr_reader flags: Integer
|
2265
|
+
attr_reader opening_loc: Location
|
2266
|
+
attr_reader content_loc: Location
|
2267
|
+
attr_reader closing_loc: Location
|
2268
|
+
attr_reader unescaped: String
|
2269
|
+
|
2270
|
+
def initialize: (Source source, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void
|
2271
|
+
def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode
|
2272
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location }
|
2273
|
+
def ignore_case?: () -> bool
|
2274
|
+
def extended?: () -> bool
|
2275
|
+
def multi_line?: () -> bool
|
2276
|
+
def once?: () -> bool
|
2277
|
+
def euc_jp?: () -> bool
|
2278
|
+
def ascii_8bit?: () -> bool
|
2279
|
+
def windows_31j?: () -> bool
|
2280
|
+
def utf_8?: () -> bool
|
2281
|
+
def forced_utf8_encoding?: () -> bool
|
2282
|
+
def forced_binary_encoding?: () -> bool
|
2283
|
+
def forced_us_ascii_encoding?: () -> bool
|
2284
|
+
def opening: () -> String
|
2285
|
+
def content: () -> String
|
2286
|
+
def closing: () -> String
|
2287
|
+
def type: () -> :match_last_line_node
|
2288
|
+
| ...
|
2289
|
+
def self.type: () -> :match_last_line_node
|
2290
|
+
end
|
2291
|
+
|
2292
|
+
# Represents the use of the modifier `in` operator.
|
2293
|
+
#
|
2294
|
+
# foo in bar
|
2295
|
+
# ^^^^^^^^^^
|
2296
|
+
class MatchPredicateNode < Node
|
2297
|
+
include _Node
|
2298
|
+
|
2299
|
+
attr_reader value: Prism::node
|
2300
|
+
attr_reader pattern: Prism::node
|
2301
|
+
attr_reader operator_loc: Location
|
2302
|
+
|
2303
|
+
def initialize: (Source source, Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void
|
2304
|
+
def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode
|
2305
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location }
|
2306
|
+
def operator: () -> String
|
2307
|
+
def type: () -> :match_predicate_node
|
2308
|
+
| ...
|
2309
|
+
def self.type: () -> :match_predicate_node
|
2310
|
+
end
|
2311
|
+
|
2312
|
+
# Represents the use of the `=>` operator.
|
2313
|
+
#
|
2314
|
+
# foo => bar
|
2315
|
+
# ^^^^^^^^^^
|
2316
|
+
class MatchRequiredNode < Node
|
2317
|
+
include _Node
|
2318
|
+
|
2319
|
+
attr_reader value: Prism::node
|
2320
|
+
attr_reader pattern: Prism::node
|
2321
|
+
attr_reader operator_loc: Location
|
2322
|
+
|
2323
|
+
def initialize: (Source source, Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void
|
2324
|
+
def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode
|
2325
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location }
|
2326
|
+
def operator: () -> String
|
2327
|
+
def type: () -> :match_required_node
|
2328
|
+
| ...
|
2329
|
+
def self.type: () -> :match_required_node
|
2330
|
+
end
|
2331
|
+
|
2332
|
+
# Represents writing local variables using a regular expression match with named capture groups.
|
2333
|
+
#
|
2334
|
+
# /(?<foo>bar)/ =~ baz
|
2335
|
+
# ^^^^^^^^^^^^^^^^^^^^
|
2336
|
+
class MatchWriteNode < Node
|
2337
|
+
include _Node
|
2338
|
+
|
2339
|
+
attr_reader call: CallNode
|
2340
|
+
attr_reader targets: Array[LocalVariableTargetNode]
|
2341
|
+
|
2342
|
+
def initialize: (Source source, CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void
|
2343
|
+
def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode
|
2344
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location }
|
2345
|
+
def type: () -> :match_write_node
|
2346
|
+
| ...
|
2347
|
+
def self.type: () -> :match_write_node
|
2348
|
+
end
|
2349
|
+
|
2350
|
+
# Represents a node that is missing from the source and results in a syntax error.
|
2351
|
+
class MissingNode < Node
|
2352
|
+
include _Node
|
2353
|
+
|
2354
|
+
|
2355
|
+
def initialize: (Source source, Location location) -> void
|
2356
|
+
def copy: (?location: Location) -> MissingNode
|
2357
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2358
|
+
def type: () -> :missing_node
|
2359
|
+
| ...
|
2360
|
+
def self.type: () -> :missing_node
|
2361
|
+
end
|
2362
|
+
|
2363
|
+
# Represents a module declaration involving the `module` keyword.
|
2364
|
+
#
|
2365
|
+
# module Foo end
|
2366
|
+
# ^^^^^^^^^^^^^^
|
2367
|
+
class ModuleNode < Node
|
2368
|
+
include _Node
|
2369
|
+
|
2370
|
+
attr_reader locals: Array[Symbol]
|
2371
|
+
attr_reader module_keyword_loc: Location
|
2372
|
+
attr_reader constant_path: Prism::node
|
2373
|
+
attr_reader body: Prism::node?
|
2374
|
+
attr_reader end_keyword_loc: Location
|
2375
|
+
attr_reader name: Symbol
|
2376
|
+
|
2377
|
+
def initialize: (Source source, Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void
|
2378
|
+
def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode
|
2379
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location }
|
2380
|
+
def module_keyword: () -> String
|
2381
|
+
def end_keyword: () -> String
|
2382
|
+
def type: () -> :module_node
|
2383
|
+
| ...
|
2384
|
+
def self.type: () -> :module_node
|
2385
|
+
end
|
2386
|
+
|
2387
|
+
# Represents a multi-target expression.
|
2388
|
+
#
|
2389
|
+
# a, (b, c) = 1, 2, 3
|
2390
|
+
# ^^^^^^
|
2391
|
+
class MultiTargetNode < Node
|
2392
|
+
include _Node
|
2393
|
+
|
2394
|
+
attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode]
|
2395
|
+
attr_reader rest: Prism::node?
|
2396
|
+
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode]
|
2397
|
+
attr_reader lparen_loc: Location?
|
2398
|
+
attr_reader rparen_loc: Location?
|
2399
|
+
|
2400
|
+
def initialize: (Source source, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void
|
2401
|
+
def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode
|
2402
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location }
|
2403
|
+
def lparen: () -> String?
|
2404
|
+
def rparen: () -> String?
|
2405
|
+
def type: () -> :multi_target_node
|
2406
|
+
| ...
|
2407
|
+
def self.type: () -> :multi_target_node
|
2408
|
+
end
|
2409
|
+
|
2410
|
+
# Represents a write to a multi-target expression.
|
2411
|
+
#
|
2412
|
+
# a, b, c = 1, 2, 3
|
2413
|
+
# ^^^^^^^^^^^^^^^^^
|
2414
|
+
class MultiWriteNode < Node
|
2415
|
+
include _Node
|
2416
|
+
|
2417
|
+
attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode]
|
2418
|
+
attr_reader rest: Prism::node?
|
2419
|
+
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode]
|
2420
|
+
attr_reader lparen_loc: Location?
|
2421
|
+
attr_reader rparen_loc: Location?
|
2422
|
+
attr_reader operator_loc: Location
|
2423
|
+
attr_reader value: Prism::node
|
2424
|
+
|
2425
|
+
def initialize: (Source source, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void
|
2426
|
+
def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode
|
2427
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location }
|
2428
|
+
def lparen: () -> String?
|
2429
|
+
def rparen: () -> String?
|
2430
|
+
def operator: () -> String
|
2431
|
+
def type: () -> :multi_write_node
|
2432
|
+
| ...
|
2433
|
+
def self.type: () -> :multi_write_node
|
2434
|
+
end
|
2435
|
+
|
2436
|
+
# Represents the use of the `next` keyword.
|
2437
|
+
#
|
2438
|
+
# next 1
|
2439
|
+
# ^^^^^^
|
2440
|
+
class NextNode < Node
|
2441
|
+
include _Node
|
2442
|
+
|
2443
|
+
attr_reader arguments: ArgumentsNode?
|
2444
|
+
attr_reader keyword_loc: Location
|
2445
|
+
|
2446
|
+
def initialize: (Source source, ArgumentsNode? arguments, Location keyword_loc, Location location) -> void
|
2447
|
+
def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode
|
2448
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location }
|
2449
|
+
def keyword: () -> String
|
2450
|
+
def type: () -> :next_node
|
2451
|
+
| ...
|
2452
|
+
def self.type: () -> :next_node
|
2453
|
+
end
|
2454
|
+
|
2455
|
+
# Represents the use of the `nil` keyword.
|
2456
|
+
#
|
2457
|
+
# nil
|
2458
|
+
# ^^^
|
2459
|
+
class NilNode < Node
|
2460
|
+
include _Node
|
2461
|
+
|
2462
|
+
|
2463
|
+
def initialize: (Source source, Location location) -> void
|
2464
|
+
def copy: (?location: Location) -> NilNode
|
2465
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2466
|
+
def type: () -> :nil_node
|
2467
|
+
| ...
|
2468
|
+
def self.type: () -> :nil_node
|
2469
|
+
end
|
2470
|
+
|
2471
|
+
# Represents the use of `**nil` inside method arguments.
|
2472
|
+
#
|
2473
|
+
# def a(**nil)
|
2474
|
+
# ^^^^^
|
2475
|
+
# end
|
2476
|
+
class NoKeywordsParameterNode < Node
|
2477
|
+
include _Node
|
2478
|
+
|
2479
|
+
attr_reader operator_loc: Location
|
2480
|
+
attr_reader keyword_loc: Location
|
2481
|
+
|
2482
|
+
def initialize: (Source source, Location operator_loc, Location keyword_loc, Location location) -> void
|
2483
|
+
def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode
|
2484
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location }
|
2485
|
+
def operator: () -> String
|
2486
|
+
def keyword: () -> String
|
2487
|
+
def type: () -> :no_keywords_parameter_node
|
2488
|
+
| ...
|
2489
|
+
def self.type: () -> :no_keywords_parameter_node
|
2490
|
+
end
|
2491
|
+
|
2492
|
+
# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
|
2493
|
+
#
|
2494
|
+
# -> { _1 + _2 }
|
2495
|
+
# ^^^^^^^^^^^^^^
|
2496
|
+
class NumberedParametersNode < Node
|
2497
|
+
include _Node
|
2498
|
+
|
2499
|
+
attr_reader maximum: Integer
|
2500
|
+
|
2501
|
+
def initialize: (Source source, Integer maximum, Location location) -> void
|
2502
|
+
def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode
|
2503
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location }
|
2504
|
+
def type: () -> :numbered_parameters_node
|
2505
|
+
| ...
|
2506
|
+
def self.type: () -> :numbered_parameters_node
|
2507
|
+
end
|
2508
|
+
|
2509
|
+
# Represents reading a numbered reference to a capture in the previous match.
|
2510
|
+
#
|
2511
|
+
# $1
|
2512
|
+
# ^^
|
2513
|
+
class NumberedReferenceReadNode < Node
|
2514
|
+
include _Node
|
2515
|
+
|
2516
|
+
attr_reader number: Integer
|
2517
|
+
|
2518
|
+
def initialize: (Source source, Integer number, Location location) -> void
|
2519
|
+
def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode
|
2520
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location }
|
2521
|
+
def type: () -> :numbered_reference_read_node
|
2522
|
+
| ...
|
2523
|
+
def self.type: () -> :numbered_reference_read_node
|
2524
|
+
end
|
2525
|
+
|
2526
|
+
# Represents an optional keyword parameter to a method, block, or lambda definition.
|
2527
|
+
#
|
2528
|
+
# def a(b: 1)
|
2529
|
+
# ^^^^
|
2530
|
+
# end
|
2531
|
+
class OptionalKeywordParameterNode < Node
|
2532
|
+
include _Node
|
2533
|
+
|
2534
|
+
attr_reader flags: Integer
|
2535
|
+
attr_reader name: Symbol
|
2536
|
+
attr_reader name_loc: Location
|
2537
|
+
attr_reader value: Prism::node
|
2538
|
+
|
2539
|
+
def initialize: (Source source, Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void
|
2540
|
+
def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode
|
2541
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location }
|
2542
|
+
def repeated_parameter?: () -> bool
|
2543
|
+
def type: () -> :optional_keyword_parameter_node
|
2544
|
+
| ...
|
2545
|
+
def self.type: () -> :optional_keyword_parameter_node
|
2546
|
+
end
|
2547
|
+
|
2548
|
+
# Represents an optional parameter to a method, block, or lambda definition.
|
2549
|
+
#
|
2550
|
+
# def a(b = 1)
|
2551
|
+
# ^^^^^
|
2552
|
+
# end
|
2553
|
+
class OptionalParameterNode < Node
|
2554
|
+
include _Node
|
2555
|
+
|
2556
|
+
attr_reader flags: Integer
|
2557
|
+
attr_reader name: Symbol
|
2558
|
+
attr_reader name_loc: Location
|
2559
|
+
attr_reader operator_loc: Location
|
2560
|
+
attr_reader value: Prism::node
|
2561
|
+
|
2562
|
+
def initialize: (Source source, Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void
|
2563
|
+
def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode
|
2564
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location }
|
2565
|
+
def repeated_parameter?: () -> bool
|
2566
|
+
def operator: () -> String
|
2567
|
+
def type: () -> :optional_parameter_node
|
2568
|
+
| ...
|
2569
|
+
def self.type: () -> :optional_parameter_node
|
2570
|
+
end
|
2571
|
+
|
2572
|
+
# Represents the use of the `||` operator or the `or` keyword.
|
2573
|
+
#
|
2574
|
+
# left or right
|
2575
|
+
# ^^^^^^^^^^^^^
|
2576
|
+
class OrNode < Node
|
2577
|
+
include _Node
|
2578
|
+
|
2579
|
+
attr_reader left: Prism::node
|
2580
|
+
attr_reader right: Prism::node
|
2581
|
+
attr_reader operator_loc: Location
|
2582
|
+
|
2583
|
+
def initialize: (Source source, Prism::node left, Prism::node right, Location operator_loc, Location location) -> void
|
2584
|
+
def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode
|
2585
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location }
|
2586
|
+
def operator: () -> String
|
2587
|
+
def type: () -> :or_node
|
2588
|
+
| ...
|
2589
|
+
def self.type: () -> :or_node
|
2590
|
+
end
|
2591
|
+
|
2592
|
+
# Represents the list of parameters on a method, block, or lambda definition.
|
2593
|
+
#
|
2594
|
+
# def a(b, c, d)
|
2595
|
+
# ^^^^^^^
|
2596
|
+
# end
|
2597
|
+
class ParametersNode < Node
|
2598
|
+
include _Node
|
2599
|
+
|
2600
|
+
attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode]
|
2601
|
+
attr_reader optionals: Array[OptionalParameterNode]
|
2602
|
+
attr_reader rest: RestParameterNode | ImplicitRestNode | nil
|
2603
|
+
attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode]
|
2604
|
+
attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode]
|
2605
|
+
attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil
|
2606
|
+
attr_reader block: BlockParameterNode?
|
2607
|
+
|
2608
|
+
def initialize: (Source source, Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void
|
2609
|
+
def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode
|
2610
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location }
|
2611
|
+
def type: () -> :parameters_node
|
2612
|
+
| ...
|
2613
|
+
def self.type: () -> :parameters_node
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
# Represents a parenthesized expression
|
2617
|
+
#
|
2618
|
+
# (10 + 34)
|
2619
|
+
# ^^^^^^^^^
|
2620
|
+
class ParenthesesNode < Node
|
2621
|
+
include _Node
|
2622
|
+
|
2623
|
+
attr_reader body: Prism::node?
|
2624
|
+
attr_reader opening_loc: Location
|
2625
|
+
attr_reader closing_loc: Location
|
2626
|
+
|
2627
|
+
def initialize: (Source source, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void
|
2628
|
+
def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode
|
2629
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location }
|
2630
|
+
def opening: () -> String
|
2631
|
+
def closing: () -> String
|
2632
|
+
def type: () -> :parentheses_node
|
2633
|
+
| ...
|
2634
|
+
def self.type: () -> :parentheses_node
|
2635
|
+
end
|
2636
|
+
|
2637
|
+
# Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
|
2638
|
+
#
|
2639
|
+
# foo in ^(bar)
|
2640
|
+
# ^^^^^^
|
2641
|
+
class PinnedExpressionNode < Node
|
2642
|
+
include _Node
|
2643
|
+
|
2644
|
+
attr_reader expression: Prism::node
|
2645
|
+
attr_reader operator_loc: Location
|
2646
|
+
attr_reader lparen_loc: Location
|
2647
|
+
attr_reader rparen_loc: Location
|
2648
|
+
|
2649
|
+
def initialize: (Source source, Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void
|
2650
|
+
def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode
|
2651
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location }
|
2652
|
+
def operator: () -> String
|
2653
|
+
def lparen: () -> String
|
2654
|
+
def rparen: () -> String
|
2655
|
+
def type: () -> :pinned_expression_node
|
2656
|
+
| ...
|
2657
|
+
def self.type: () -> :pinned_expression_node
|
2658
|
+
end
|
2659
|
+
|
2660
|
+
# Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
|
2661
|
+
#
|
2662
|
+
# foo in ^bar
|
2663
|
+
# ^^^^
|
2664
|
+
class PinnedVariableNode < Node
|
2665
|
+
include _Node
|
2666
|
+
|
2667
|
+
attr_reader variable: Prism::node
|
2668
|
+
attr_reader operator_loc: Location
|
2669
|
+
|
2670
|
+
def initialize: (Source source, Prism::node variable, Location operator_loc, Location location) -> void
|
2671
|
+
def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode
|
2672
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location }
|
2673
|
+
def operator: () -> String
|
2674
|
+
def type: () -> :pinned_variable_node
|
2675
|
+
| ...
|
2676
|
+
def self.type: () -> :pinned_variable_node
|
2677
|
+
end
|
2678
|
+
|
2679
|
+
# Represents the use of the `END` keyword.
|
2680
|
+
#
|
2681
|
+
# END { foo }
|
2682
|
+
# ^^^^^^^^^^^
|
2683
|
+
class PostExecutionNode < Node
|
2684
|
+
include _Node
|
2685
|
+
|
2686
|
+
attr_reader statements: StatementsNode?
|
2687
|
+
attr_reader keyword_loc: Location
|
2688
|
+
attr_reader opening_loc: Location
|
2689
|
+
attr_reader closing_loc: Location
|
2690
|
+
|
2691
|
+
def initialize: (Source source, StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void
|
2692
|
+
def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode
|
2693
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location }
|
2694
|
+
def keyword: () -> String
|
2695
|
+
def opening: () -> String
|
2696
|
+
def closing: () -> String
|
2697
|
+
def type: () -> :post_execution_node
|
2698
|
+
| ...
|
2699
|
+
def self.type: () -> :post_execution_node
|
2700
|
+
end
|
2701
|
+
|
2702
|
+
# Represents the use of the `BEGIN` keyword.
|
2703
|
+
#
|
2704
|
+
# BEGIN { foo }
|
2705
|
+
# ^^^^^^^^^^^^^
|
2706
|
+
class PreExecutionNode < Node
|
2707
|
+
include _Node
|
2708
|
+
|
2709
|
+
attr_reader statements: StatementsNode?
|
2710
|
+
attr_reader keyword_loc: Location
|
2711
|
+
attr_reader opening_loc: Location
|
2712
|
+
attr_reader closing_loc: Location
|
2713
|
+
|
2714
|
+
def initialize: (Source source, StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void
|
2715
|
+
def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode
|
2716
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location }
|
2717
|
+
def keyword: () -> String
|
2718
|
+
def opening: () -> String
|
2719
|
+
def closing: () -> String
|
2720
|
+
def type: () -> :pre_execution_node
|
2721
|
+
| ...
|
2722
|
+
def self.type: () -> :pre_execution_node
|
2723
|
+
end
|
2724
|
+
|
2725
|
+
# The top level node of any parse tree.
|
2726
|
+
class ProgramNode < Node
|
2727
|
+
include _Node
|
2728
|
+
|
2729
|
+
attr_reader locals: Array[Symbol]
|
2730
|
+
attr_reader statements: StatementsNode
|
2731
|
+
|
2732
|
+
def initialize: (Source source, Array[Symbol] locals, StatementsNode statements, Location location) -> void
|
2733
|
+
def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode
|
2734
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location }
|
2735
|
+
def type: () -> :program_node
|
2736
|
+
| ...
|
2737
|
+
def self.type: () -> :program_node
|
2738
|
+
end
|
2739
|
+
|
2740
|
+
# Represents the use of the `..` or `...` operators.
|
2741
|
+
#
|
2742
|
+
# 1..2
|
2743
|
+
# ^^^^
|
2744
|
+
#
|
2745
|
+
# c if a =~ /left/ ... b =~ /right/
|
2746
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2747
|
+
class RangeNode < Node
|
2748
|
+
include _Node
|
2749
|
+
|
2750
|
+
attr_reader flags: Integer
|
2751
|
+
attr_reader left: Prism::node?
|
2752
|
+
attr_reader right: Prism::node?
|
2753
|
+
attr_reader operator_loc: Location
|
2754
|
+
|
2755
|
+
def initialize: (Source source, Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void
|
2756
|
+
def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode
|
2757
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location }
|
2758
|
+
def exclude_end?: () -> bool
|
2759
|
+
def operator: () -> String
|
2760
|
+
def type: () -> :range_node
|
2761
|
+
| ...
|
2762
|
+
def self.type: () -> :range_node
|
2763
|
+
end
|
2764
|
+
|
2765
|
+
# Represents a rational number literal.
|
2766
|
+
#
|
2767
|
+
# 1.0r
|
2768
|
+
# ^^^^
|
2769
|
+
class RationalNode < Node
|
2770
|
+
include _Node
|
2771
|
+
|
2772
|
+
attr_reader numeric: Prism::node
|
2773
|
+
|
2774
|
+
def initialize: (Source source, Prism::node numeric, Location location) -> void
|
2775
|
+
def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode
|
2776
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location }
|
2777
|
+
def type: () -> :rational_node
|
2778
|
+
| ...
|
2779
|
+
def self.type: () -> :rational_node
|
2780
|
+
end
|
2781
|
+
|
2782
|
+
# Represents the use of the `redo` keyword.
|
2783
|
+
#
|
2784
|
+
# redo
|
2785
|
+
# ^^^^
|
2786
|
+
class RedoNode < Node
|
2787
|
+
include _Node
|
2788
|
+
|
2789
|
+
|
2790
|
+
def initialize: (Source source, Location location) -> void
|
2791
|
+
def copy: (?location: Location) -> RedoNode
|
2792
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2793
|
+
def type: () -> :redo_node
|
2794
|
+
| ...
|
2795
|
+
def self.type: () -> :redo_node
|
2796
|
+
end
|
2797
|
+
|
2798
|
+
# Represents a regular expression literal with no interpolation.
|
2799
|
+
#
|
2800
|
+
# /foo/i
|
2801
|
+
# ^^^^^^
|
2802
|
+
class RegularExpressionNode < Node
|
2803
|
+
include _Node
|
2804
|
+
|
2805
|
+
attr_reader flags: Integer
|
2806
|
+
attr_reader opening_loc: Location
|
2807
|
+
attr_reader content_loc: Location
|
2808
|
+
attr_reader closing_loc: Location
|
2809
|
+
attr_reader unescaped: String
|
2810
|
+
|
2811
|
+
def initialize: (Source source, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void
|
2812
|
+
def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode
|
2813
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location }
|
2814
|
+
def ignore_case?: () -> bool
|
2815
|
+
def extended?: () -> bool
|
2816
|
+
def multi_line?: () -> bool
|
2817
|
+
def once?: () -> bool
|
2818
|
+
def euc_jp?: () -> bool
|
2819
|
+
def ascii_8bit?: () -> bool
|
2820
|
+
def windows_31j?: () -> bool
|
2821
|
+
def utf_8?: () -> bool
|
2822
|
+
def forced_utf8_encoding?: () -> bool
|
2823
|
+
def forced_binary_encoding?: () -> bool
|
2824
|
+
def forced_us_ascii_encoding?: () -> bool
|
2825
|
+
def opening: () -> String
|
2826
|
+
def content: () -> String
|
2827
|
+
def closing: () -> String
|
2828
|
+
def type: () -> :regular_expression_node
|
2829
|
+
| ...
|
2830
|
+
def self.type: () -> :regular_expression_node
|
2831
|
+
end
|
2832
|
+
|
2833
|
+
# Represents a required keyword parameter to a method, block, or lambda definition.
|
2834
|
+
#
|
2835
|
+
# def a(b: )
|
2836
|
+
# ^^
|
2837
|
+
# end
|
2838
|
+
class RequiredKeywordParameterNode < Node
|
2839
|
+
include _Node
|
2840
|
+
|
2841
|
+
attr_reader flags: Integer
|
2842
|
+
attr_reader name: Symbol
|
2843
|
+
attr_reader name_loc: Location
|
2844
|
+
|
2845
|
+
def initialize: (Source source, Integer flags, Symbol name, Location name_loc, Location location) -> void
|
2846
|
+
def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode
|
2847
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location }
|
2848
|
+
def repeated_parameter?: () -> bool
|
2849
|
+
def type: () -> :required_keyword_parameter_node
|
2850
|
+
| ...
|
2851
|
+
def self.type: () -> :required_keyword_parameter_node
|
2852
|
+
end
|
2853
|
+
|
2854
|
+
# Represents a required parameter to a method, block, or lambda definition.
|
2855
|
+
#
|
2856
|
+
# def a(b)
|
2857
|
+
# ^
|
2858
|
+
# end
|
2859
|
+
class RequiredParameterNode < Node
|
2860
|
+
include _Node
|
2861
|
+
|
2862
|
+
attr_reader flags: Integer
|
2863
|
+
attr_reader name: Symbol
|
2864
|
+
|
2865
|
+
def initialize: (Source source, Integer flags, Symbol name, Location location) -> void
|
2866
|
+
def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode
|
2867
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location }
|
2868
|
+
def repeated_parameter?: () -> bool
|
2869
|
+
def type: () -> :required_parameter_node
|
2870
|
+
| ...
|
2871
|
+
def self.type: () -> :required_parameter_node
|
2872
|
+
end
|
2873
|
+
|
2874
|
+
# Represents an expression modified with a rescue.
|
2875
|
+
#
|
2876
|
+
# foo rescue nil
|
2877
|
+
# ^^^^^^^^^^^^^^
|
2878
|
+
class RescueModifierNode < Node
|
2879
|
+
include _Node
|
2880
|
+
|
2881
|
+
attr_reader expression: Prism::node
|
2882
|
+
attr_reader keyword_loc: Location
|
2883
|
+
attr_reader rescue_expression: Prism::node
|
2884
|
+
|
2885
|
+
def initialize: (Source source, Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void
|
2886
|
+
def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode
|
2887
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location }
|
2888
|
+
def keyword: () -> String
|
2889
|
+
def type: () -> :rescue_modifier_node
|
2890
|
+
| ...
|
2891
|
+
def self.type: () -> :rescue_modifier_node
|
2892
|
+
end
|
2893
|
+
|
2894
|
+
# Represents a rescue statement.
|
2895
|
+
#
|
2896
|
+
# begin
|
2897
|
+
# rescue Foo, *splat, Bar => ex
|
2898
|
+
# foo
|
2899
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2900
|
+
# end
|
2901
|
+
#
|
2902
|
+
# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field.
|
2903
|
+
class RescueNode < Node
|
2904
|
+
include _Node
|
2905
|
+
|
2906
|
+
attr_reader keyword_loc: Location
|
2907
|
+
attr_reader exceptions: Array[Prism::node]
|
2908
|
+
attr_reader operator_loc: Location?
|
2909
|
+
attr_reader reference: Prism::node?
|
2910
|
+
attr_reader statements: StatementsNode?
|
2911
|
+
attr_reader consequent: RescueNode?
|
2912
|
+
|
2913
|
+
def initialize: (Source source, Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void
|
2914
|
+
def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode
|
2915
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location }
|
2916
|
+
def keyword: () -> String
|
2917
|
+
def operator: () -> String?
|
2918
|
+
def type: () -> :rescue_node
|
2919
|
+
| ...
|
2920
|
+
def self.type: () -> :rescue_node
|
2921
|
+
end
|
2922
|
+
|
2923
|
+
# Represents a rest parameter to a method, block, or lambda definition.
|
2924
|
+
#
|
2925
|
+
# def a(*b)
|
2926
|
+
# ^^
|
2927
|
+
# end
|
2928
|
+
class RestParameterNode < Node
|
2929
|
+
include _Node
|
2930
|
+
|
2931
|
+
attr_reader flags: Integer
|
2932
|
+
attr_reader name: Symbol?
|
2933
|
+
attr_reader name_loc: Location?
|
2934
|
+
attr_reader operator_loc: Location
|
2935
|
+
|
2936
|
+
def initialize: (Source source, Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void
|
2937
|
+
def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode
|
2938
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location }
|
2939
|
+
def repeated_parameter?: () -> bool
|
2940
|
+
def operator: () -> String
|
2941
|
+
def type: () -> :rest_parameter_node
|
2942
|
+
| ...
|
2943
|
+
def self.type: () -> :rest_parameter_node
|
2944
|
+
end
|
2945
|
+
|
2946
|
+
# Represents the use of the `retry` keyword.
|
2947
|
+
#
|
2948
|
+
# retry
|
2949
|
+
# ^^^^^
|
2950
|
+
class RetryNode < Node
|
2951
|
+
include _Node
|
2952
|
+
|
2953
|
+
|
2954
|
+
def initialize: (Source source, Location location) -> void
|
2955
|
+
def copy: (?location: Location) -> RetryNode
|
2956
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2957
|
+
def type: () -> :retry_node
|
2958
|
+
| ...
|
2959
|
+
def self.type: () -> :retry_node
|
2960
|
+
end
|
2961
|
+
|
2962
|
+
# Represents the use of the `return` keyword.
|
2963
|
+
#
|
2964
|
+
# return 1
|
2965
|
+
# ^^^^^^^^
|
2966
|
+
class ReturnNode < Node
|
2967
|
+
include _Node
|
2968
|
+
|
2969
|
+
attr_reader flags: Integer
|
2970
|
+
attr_reader keyword_loc: Location
|
2971
|
+
attr_reader arguments: ArgumentsNode?
|
2972
|
+
|
2973
|
+
def initialize: (Source source, Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void
|
2974
|
+
def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode
|
2975
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location }
|
2976
|
+
def redundant?: () -> bool
|
2977
|
+
def keyword: () -> String
|
2978
|
+
def type: () -> :return_node
|
2979
|
+
| ...
|
2980
|
+
def self.type: () -> :return_node
|
2981
|
+
end
|
2982
|
+
|
2983
|
+
# Represents the `self` keyword.
|
2984
|
+
#
|
2985
|
+
# self
|
2986
|
+
# ^^^^
|
2987
|
+
class SelfNode < Node
|
2988
|
+
include _Node
|
2989
|
+
|
2990
|
+
|
2991
|
+
def initialize: (Source source, Location location) -> void
|
2992
|
+
def copy: (?location: Location) -> SelfNode
|
2993
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
2994
|
+
def type: () -> :self_node
|
2995
|
+
| ...
|
2996
|
+
def self.type: () -> :self_node
|
2997
|
+
end
|
2998
|
+
|
2999
|
+
# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
|
3000
|
+
#
|
3001
|
+
# # shareable_constant_value: literal
|
3002
|
+
# C = { a: 1 }
|
3003
|
+
# ^^^^^^^^^^^^
|
3004
|
+
class ShareableConstantNode < Node
|
3005
|
+
include _Node
|
3006
|
+
|
3007
|
+
attr_reader flags: Integer
|
3008
|
+
attr_reader write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode
|
3009
|
+
|
3010
|
+
def initialize: (Source source, Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void
|
3011
|
+
def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode
|
3012
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location }
|
3013
|
+
def literal?: () -> bool
|
3014
|
+
def experimental_everything?: () -> bool
|
3015
|
+
def experimental_copy?: () -> bool
|
3016
|
+
def type: () -> :shareable_constant_node
|
3017
|
+
| ...
|
3018
|
+
def self.type: () -> :shareable_constant_node
|
3019
|
+
end
|
3020
|
+
|
3021
|
+
# Represents a singleton class declaration involving the `class` keyword.
|
3022
|
+
#
|
3023
|
+
# class << self end
|
3024
|
+
# ^^^^^^^^^^^^^^^^^
|
3025
|
+
class SingletonClassNode < Node
|
3026
|
+
include _Node
|
3027
|
+
|
3028
|
+
attr_reader locals: Array[Symbol]
|
3029
|
+
attr_reader class_keyword_loc: Location
|
3030
|
+
attr_reader operator_loc: Location
|
3031
|
+
attr_reader expression: Prism::node
|
3032
|
+
attr_reader body: Prism::node?
|
3033
|
+
attr_reader end_keyword_loc: Location
|
3034
|
+
|
3035
|
+
def initialize: (Source source, Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void
|
3036
|
+
def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode
|
3037
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location }
|
3038
|
+
def class_keyword: () -> String
|
3039
|
+
def operator: () -> String
|
3040
|
+
def end_keyword: () -> String
|
3041
|
+
def type: () -> :singleton_class_node
|
3042
|
+
| ...
|
3043
|
+
def self.type: () -> :singleton_class_node
|
3044
|
+
end
|
3045
|
+
|
3046
|
+
# Represents the use of the `__ENCODING__` keyword.
|
3047
|
+
#
|
3048
|
+
# __ENCODING__
|
3049
|
+
# ^^^^^^^^^^^^
|
3050
|
+
class SourceEncodingNode < Node
|
3051
|
+
include _Node
|
3052
|
+
|
3053
|
+
|
3054
|
+
def initialize: (Source source, Location location) -> void
|
3055
|
+
def copy: (?location: Location) -> SourceEncodingNode
|
3056
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
3057
|
+
def type: () -> :source_encoding_node
|
3058
|
+
| ...
|
3059
|
+
def self.type: () -> :source_encoding_node
|
3060
|
+
end
|
3061
|
+
|
3062
|
+
# Represents the use of the `__FILE__` keyword.
|
3063
|
+
#
|
3064
|
+
# __FILE__
|
3065
|
+
# ^^^^^^^^
|
3066
|
+
class SourceFileNode < Node
|
3067
|
+
include _Node
|
3068
|
+
|
3069
|
+
attr_reader flags: Integer
|
3070
|
+
attr_reader filepath: String
|
3071
|
+
|
3072
|
+
def initialize: (Source source, Integer flags, String filepath, Location location) -> void
|
3073
|
+
def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode
|
3074
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location }
|
3075
|
+
def forced_utf8_encoding?: () -> bool
|
3076
|
+
def forced_binary_encoding?: () -> bool
|
3077
|
+
def frozen?: () -> bool
|
3078
|
+
def mutable?: () -> bool
|
3079
|
+
def type: () -> :source_file_node
|
3080
|
+
| ...
|
3081
|
+
def self.type: () -> :source_file_node
|
3082
|
+
end
|
3083
|
+
|
3084
|
+
# Represents the use of the `__LINE__` keyword.
|
3085
|
+
#
|
3086
|
+
# __LINE__
|
3087
|
+
# ^^^^^^^^
|
3088
|
+
class SourceLineNode < Node
|
3089
|
+
include _Node
|
3090
|
+
|
3091
|
+
|
3092
|
+
def initialize: (Source source, Location location) -> void
|
3093
|
+
def copy: (?location: Location) -> SourceLineNode
|
3094
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
3095
|
+
def type: () -> :source_line_node
|
3096
|
+
| ...
|
3097
|
+
def self.type: () -> :source_line_node
|
3098
|
+
end
|
3099
|
+
|
3100
|
+
# Represents the use of the splat operator.
|
3101
|
+
#
|
3102
|
+
# [*a]
|
3103
|
+
# ^^
|
3104
|
+
class SplatNode < Node
|
3105
|
+
include _Node
|
3106
|
+
|
3107
|
+
attr_reader operator_loc: Location
|
3108
|
+
attr_reader expression: Prism::node?
|
3109
|
+
|
3110
|
+
def initialize: (Source source, Location operator_loc, Prism::node? expression, Location location) -> void
|
3111
|
+
def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode
|
3112
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location }
|
3113
|
+
def operator: () -> String
|
3114
|
+
def type: () -> :splat_node
|
3115
|
+
| ...
|
3116
|
+
def self.type: () -> :splat_node
|
3117
|
+
end
|
3118
|
+
|
3119
|
+
# Represents a set of statements contained within some scope.
|
3120
|
+
#
|
3121
|
+
# foo; bar; baz
|
3122
|
+
# ^^^^^^^^^^^^^
|
3123
|
+
class StatementsNode < Node
|
3124
|
+
include _Node
|
3125
|
+
|
3126
|
+
attr_reader body: Array[Prism::node]
|
3127
|
+
|
3128
|
+
def initialize: (Source source, Array[Prism::node] body, Location location) -> void
|
3129
|
+
def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode
|
3130
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location }
|
3131
|
+
def type: () -> :statements_node
|
3132
|
+
| ...
|
3133
|
+
def self.type: () -> :statements_node
|
3134
|
+
end
|
3135
|
+
|
3136
|
+
# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
|
3137
|
+
#
|
3138
|
+
# "foo"
|
3139
|
+
# ^^^^^
|
3140
|
+
#
|
3141
|
+
# %w[foo]
|
3142
|
+
# ^^^
|
3143
|
+
#
|
3144
|
+
# "foo #{bar} baz"
|
3145
|
+
# ^^^^ ^^^^
|
3146
|
+
class StringNode < Node
|
3147
|
+
include _Node
|
3148
|
+
|
3149
|
+
attr_reader flags: Integer
|
3150
|
+
attr_reader opening_loc: Location?
|
3151
|
+
attr_reader content_loc: Location
|
3152
|
+
attr_reader closing_loc: Location?
|
3153
|
+
attr_reader unescaped: String
|
3154
|
+
|
3155
|
+
def initialize: (Source source, Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void
|
3156
|
+
def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode
|
3157
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location }
|
3158
|
+
def forced_utf8_encoding?: () -> bool
|
3159
|
+
def forced_binary_encoding?: () -> bool
|
3160
|
+
def frozen?: () -> bool
|
3161
|
+
def mutable?: () -> bool
|
3162
|
+
def opening: () -> String?
|
3163
|
+
def content: () -> String
|
3164
|
+
def closing: () -> String?
|
3165
|
+
def type: () -> :string_node
|
3166
|
+
| ...
|
3167
|
+
def self.type: () -> :string_node
|
3168
|
+
end
|
3169
|
+
|
3170
|
+
# Represents the use of the `super` keyword with parentheses or arguments.
|
3171
|
+
#
|
3172
|
+
# super()
|
3173
|
+
# ^^^^^^^
|
3174
|
+
#
|
3175
|
+
# super foo, bar
|
3176
|
+
# ^^^^^^^^^^^^^^
|
3177
|
+
class SuperNode < Node
|
3178
|
+
include _Node
|
3179
|
+
|
3180
|
+
attr_reader keyword_loc: Location
|
3181
|
+
attr_reader lparen_loc: Location?
|
3182
|
+
attr_reader arguments: ArgumentsNode?
|
3183
|
+
attr_reader rparen_loc: Location?
|
3184
|
+
attr_reader block: Prism::node?
|
3185
|
+
|
3186
|
+
def initialize: (Source source, Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void
|
3187
|
+
def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode
|
3188
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location }
|
3189
|
+
def keyword: () -> String
|
3190
|
+
def lparen: () -> String?
|
3191
|
+
def rparen: () -> String?
|
3192
|
+
def type: () -> :super_node
|
3193
|
+
| ...
|
3194
|
+
def self.type: () -> :super_node
|
3195
|
+
end
|
3196
|
+
|
3197
|
+
# Represents a symbol literal or a symbol contained within a `%i` list.
|
3198
|
+
#
|
3199
|
+
# :foo
|
3200
|
+
# ^^^^
|
3201
|
+
#
|
3202
|
+
# %i[foo]
|
3203
|
+
# ^^^
|
3204
|
+
class SymbolNode < Node
|
3205
|
+
include _Node
|
3206
|
+
|
3207
|
+
attr_reader flags: Integer
|
3208
|
+
attr_reader opening_loc: Location?
|
3209
|
+
attr_reader value_loc: Location?
|
3210
|
+
attr_reader closing_loc: Location?
|
3211
|
+
attr_reader unescaped: String
|
3212
|
+
|
3213
|
+
def initialize: (Source source, Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void
|
3214
|
+
def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode
|
3215
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location }
|
3216
|
+
def forced_utf8_encoding?: () -> bool
|
3217
|
+
def forced_binary_encoding?: () -> bool
|
3218
|
+
def forced_us_ascii_encoding?: () -> bool
|
3219
|
+
def opening: () -> String?
|
3220
|
+
def value: () -> String?
|
3221
|
+
def closing: () -> String?
|
3222
|
+
def type: () -> :symbol_node
|
3223
|
+
| ...
|
3224
|
+
def self.type: () -> :symbol_node
|
3225
|
+
end
|
3226
|
+
|
3227
|
+
# Represents the use of the literal `true` keyword.
|
3228
|
+
#
|
3229
|
+
# true
|
3230
|
+
# ^^^^
|
3231
|
+
class TrueNode < Node
|
3232
|
+
include _Node
|
3233
|
+
|
3234
|
+
|
3235
|
+
def initialize: (Source source, Location location) -> void
|
3236
|
+
def copy: (?location: Location) -> TrueNode
|
3237
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { location: Location }
|
3238
|
+
def type: () -> :true_node
|
3239
|
+
| ...
|
3240
|
+
def self.type: () -> :true_node
|
3241
|
+
end
|
3242
|
+
|
3243
|
+
# Represents the use of the `undef` keyword.
|
3244
|
+
#
|
3245
|
+
# undef :foo, :bar, :baz
|
3246
|
+
# ^^^^^^^^^^^^^^^^^^^^^^
|
3247
|
+
class UndefNode < Node
|
3248
|
+
include _Node
|
3249
|
+
|
3250
|
+
attr_reader names: Array[SymbolNode | InterpolatedSymbolNode]
|
3251
|
+
attr_reader keyword_loc: Location
|
3252
|
+
|
3253
|
+
def initialize: (Source source, Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void
|
3254
|
+
def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode
|
3255
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location }
|
3256
|
+
def keyword: () -> String
|
3257
|
+
def type: () -> :undef_node
|
3258
|
+
| ...
|
3259
|
+
def self.type: () -> :undef_node
|
3260
|
+
end
|
3261
|
+
|
3262
|
+
# Represents the use of the `unless` keyword, either in the block form or the modifier form.
|
3263
|
+
#
|
3264
|
+
# bar unless foo
|
3265
|
+
# ^^^^^^^^^^^^^^
|
3266
|
+
#
|
3267
|
+
# unless foo then bar end
|
3268
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^
|
3269
|
+
class UnlessNode < Node
|
3270
|
+
include _Node
|
3271
|
+
|
3272
|
+
attr_reader keyword_loc: Location
|
3273
|
+
attr_reader predicate: Prism::node
|
3274
|
+
attr_reader then_keyword_loc: Location?
|
3275
|
+
attr_reader statements: StatementsNode?
|
3276
|
+
attr_reader consequent: ElseNode?
|
3277
|
+
attr_reader end_keyword_loc: Location?
|
3278
|
+
|
3279
|
+
def initialize: (Source source, Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void
|
3280
|
+
def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode
|
3281
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location }
|
3282
|
+
def keyword: () -> String
|
3283
|
+
def then_keyword: () -> String?
|
3284
|
+
def end_keyword: () -> String?
|
3285
|
+
def type: () -> :unless_node
|
3286
|
+
| ...
|
3287
|
+
def self.type: () -> :unless_node
|
3288
|
+
end
|
3289
|
+
|
3290
|
+
# Represents the use of the `until` keyword, either in the block form or the modifier form.
|
3291
|
+
#
|
3292
|
+
# bar until foo
|
3293
|
+
# ^^^^^^^^^^^^^
|
3294
|
+
#
|
3295
|
+
# until foo do bar end
|
3296
|
+
# ^^^^^^^^^^^^^^^^^^^^
|
3297
|
+
class UntilNode < Node
|
3298
|
+
include _Node
|
3299
|
+
|
3300
|
+
attr_reader flags: Integer
|
3301
|
+
attr_reader keyword_loc: Location
|
3302
|
+
attr_reader closing_loc: Location?
|
3303
|
+
attr_reader predicate: Prism::node
|
3304
|
+
attr_reader statements: StatementsNode?
|
3305
|
+
|
3306
|
+
def initialize: (Source source, Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void
|
3307
|
+
def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode
|
3308
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location }
|
3309
|
+
def begin_modifier?: () -> bool
|
3310
|
+
def keyword: () -> String
|
3311
|
+
def closing: () -> String?
|
3312
|
+
def type: () -> :until_node
|
3313
|
+
| ...
|
3314
|
+
def self.type: () -> :until_node
|
3315
|
+
end
|
3316
|
+
|
3317
|
+
# Represents the use of the `when` keyword within a case statement.
|
3318
|
+
#
|
3319
|
+
# case true
|
3320
|
+
# when true
|
3321
|
+
# ^^^^^^^^^
|
3322
|
+
# end
|
3323
|
+
class WhenNode < Node
|
3324
|
+
include _Node
|
3325
|
+
|
3326
|
+
attr_reader keyword_loc: Location
|
3327
|
+
attr_reader conditions: Array[Prism::node]
|
3328
|
+
attr_reader then_keyword_loc: Location?
|
3329
|
+
attr_reader statements: StatementsNode?
|
3330
|
+
|
3331
|
+
def initialize: (Source source, Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void
|
3332
|
+
def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode
|
3333
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location }
|
3334
|
+
def keyword: () -> String
|
3335
|
+
def then_keyword: () -> String?
|
3336
|
+
def type: () -> :when_node
|
3337
|
+
| ...
|
3338
|
+
def self.type: () -> :when_node
|
3339
|
+
end
|
3340
|
+
|
3341
|
+
# Represents the use of the `while` keyword, either in the block form or the modifier form.
|
3342
|
+
#
|
3343
|
+
# bar while foo
|
3344
|
+
# ^^^^^^^^^^^^^
|
3345
|
+
#
|
3346
|
+
# while foo do bar end
|
3347
|
+
# ^^^^^^^^^^^^^^^^^^^^
|
3348
|
+
class WhileNode < Node
|
3349
|
+
include _Node
|
3350
|
+
|
3351
|
+
attr_reader flags: Integer
|
3352
|
+
attr_reader keyword_loc: Location
|
3353
|
+
attr_reader closing_loc: Location?
|
3354
|
+
attr_reader predicate: Prism::node
|
3355
|
+
attr_reader statements: StatementsNode?
|
3356
|
+
|
3357
|
+
def initialize: (Source source, Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void
|
3358
|
+
def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode
|
3359
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location }
|
3360
|
+
def begin_modifier?: () -> bool
|
3361
|
+
def keyword: () -> String
|
3362
|
+
def closing: () -> String?
|
3363
|
+
def type: () -> :while_node
|
3364
|
+
| ...
|
3365
|
+
def self.type: () -> :while_node
|
3366
|
+
end
|
3367
|
+
|
3368
|
+
# Represents an xstring literal with no interpolation.
|
3369
|
+
#
|
3370
|
+
# `foo`
|
3371
|
+
# ^^^^^
|
3372
|
+
class XStringNode < Node
|
3373
|
+
include _Node
|
3374
|
+
|
3375
|
+
attr_reader flags: Integer
|
3376
|
+
attr_reader opening_loc: Location
|
3377
|
+
attr_reader content_loc: Location
|
3378
|
+
attr_reader closing_loc: Location
|
3379
|
+
attr_reader unescaped: String
|
3380
|
+
|
3381
|
+
def initialize: (Source source, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void
|
3382
|
+
def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode
|
3383
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location }
|
3384
|
+
def forced_utf8_encoding?: () -> bool
|
3385
|
+
def forced_binary_encoding?: () -> bool
|
3386
|
+
def opening: () -> String
|
3387
|
+
def content: () -> String
|
3388
|
+
def closing: () -> String
|
3389
|
+
def type: () -> :x_string_node
|
3390
|
+
| ...
|
3391
|
+
def self.type: () -> :x_string_node
|
3392
|
+
end
|
3393
|
+
|
3394
|
+
# Represents the use of the `yield` keyword.
|
3395
|
+
#
|
3396
|
+
# yield 1
|
3397
|
+
# ^^^^^^^
|
3398
|
+
class YieldNode < Node
|
3399
|
+
include _Node
|
3400
|
+
|
3401
|
+
attr_reader keyword_loc: Location
|
3402
|
+
attr_reader lparen_loc: Location?
|
3403
|
+
attr_reader arguments: ArgumentsNode?
|
3404
|
+
attr_reader rparen_loc: Location?
|
3405
|
+
|
3406
|
+
def initialize: (Source source, Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void
|
3407
|
+
def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode
|
3408
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location }
|
3409
|
+
def keyword: () -> String
|
3410
|
+
def lparen: () -> String?
|
3411
|
+
def rparen: () -> String?
|
3412
|
+
def type: () -> :yield_node
|
3413
|
+
| ...
|
3414
|
+
def self.type: () -> :yield_node
|
3415
|
+
end
|
3416
|
+
|
3417
|
+
# Flags for arguments nodes.
|
3418
|
+
module ArgumentsNodeFlags
|
3419
|
+
# if arguments contain keywords
|
3420
|
+
CONTAINS_KEYWORDS: Integer
|
3421
|
+
# if arguments contain keyword splat
|
3422
|
+
CONTAINS_KEYWORD_SPLAT: Integer
|
3423
|
+
end
|
3424
|
+
|
3425
|
+
# Flags for array nodes.
|
3426
|
+
module ArrayNodeFlags
|
3427
|
+
# if array contains splat nodes
|
3428
|
+
CONTAINS_SPLAT: Integer
|
3429
|
+
end
|
3430
|
+
|
3431
|
+
# Flags for call nodes.
|
3432
|
+
module CallNodeFlags
|
3433
|
+
# &. operator
|
3434
|
+
SAFE_NAVIGATION: Integer
|
3435
|
+
# a call that could have been a local variable
|
3436
|
+
VARIABLE_CALL: Integer
|
3437
|
+
# a call that is an attribute write, so the value being written should be returned
|
3438
|
+
ATTRIBUTE_WRITE: Integer
|
3439
|
+
# a call that ignores method visibility
|
3440
|
+
IGNORE_VISIBILITY: Integer
|
3441
|
+
end
|
3442
|
+
|
3443
|
+
# Flags for nodes that have unescaped content.
|
3444
|
+
module EncodingFlags
|
3445
|
+
# internal bytes forced the encoding to UTF-8
|
3446
|
+
FORCED_UTF8_ENCODING: Integer
|
3447
|
+
# internal bytes forced the encoding to binary
|
3448
|
+
FORCED_BINARY_ENCODING: Integer
|
3449
|
+
end
|
3450
|
+
|
3451
|
+
# Flags for integer nodes that correspond to the base of the integer.
|
3452
|
+
module IntegerBaseFlags
|
3453
|
+
# 0b prefix
|
3454
|
+
BINARY: Integer
|
3455
|
+
# 0d or no prefix
|
3456
|
+
DECIMAL: Integer
|
3457
|
+
# 0o or 0 prefix
|
3458
|
+
OCTAL: Integer
|
3459
|
+
# 0x prefix
|
3460
|
+
HEXADECIMAL: Integer
|
3461
|
+
end
|
3462
|
+
|
3463
|
+
# Flags for interpolated string nodes that indicated mutability if they are also marked as literals.
|
3464
|
+
module InterpolatedStringNodeFlags
|
3465
|
+
# frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`
|
3466
|
+
FROZEN: Integer
|
3467
|
+
# mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`
|
3468
|
+
MUTABLE: Integer
|
3469
|
+
end
|
3470
|
+
|
3471
|
+
# Flags for keyword hash nodes.
|
3472
|
+
module KeywordHashNodeFlags
|
3473
|
+
# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments
|
3474
|
+
SYMBOL_KEYS: Integer
|
3475
|
+
end
|
3476
|
+
|
3477
|
+
# Flags for while and until loop nodes.
|
3478
|
+
module LoopFlags
|
3479
|
+
# a loop after a begin statement, so the body is executed first before the condition
|
3480
|
+
BEGIN_MODIFIER: Integer
|
3481
|
+
end
|
3482
|
+
|
3483
|
+
# Flags for parameter nodes.
|
3484
|
+
module ParameterFlags
|
3485
|
+
# a parameter name that has been repeated in the method signature
|
3486
|
+
REPEATED_PARAMETER: Integer
|
3487
|
+
end
|
3488
|
+
|
3489
|
+
# Flags for range and flip-flop nodes.
|
3490
|
+
module RangeFlags
|
3491
|
+
# ... operator
|
3492
|
+
EXCLUDE_END: Integer
|
3493
|
+
end
|
3494
|
+
|
3495
|
+
# Flags for regular expression and match last line nodes.
|
3496
|
+
module RegularExpressionFlags
|
3497
|
+
# i - ignores the case of characters when matching
|
3498
|
+
IGNORE_CASE: Integer
|
3499
|
+
# x - ignores whitespace and allows comments in regular expressions
|
3500
|
+
EXTENDED: Integer
|
3501
|
+
# m - allows $ to match the end of lines within strings
|
3502
|
+
MULTI_LINE: Integer
|
3503
|
+
# o - only interpolates values into the regular expression once
|
3504
|
+
ONCE: Integer
|
3505
|
+
# e - forces the EUC-JP encoding
|
3506
|
+
EUC_JP: Integer
|
3507
|
+
# n - forces the ASCII-8BIT encoding
|
3508
|
+
ASCII_8BIT: Integer
|
3509
|
+
# s - forces the Windows-31J encoding
|
3510
|
+
WINDOWS_31J: Integer
|
3511
|
+
# u - forces the UTF-8 encoding
|
3512
|
+
UTF_8: Integer
|
3513
|
+
# internal bytes forced the encoding to UTF-8
|
3514
|
+
FORCED_UTF8_ENCODING: Integer
|
3515
|
+
# internal bytes forced the encoding to binary
|
3516
|
+
FORCED_BINARY_ENCODING: Integer
|
3517
|
+
# internal bytes forced the encoding to US-ASCII
|
3518
|
+
FORCED_US_ASCII_ENCODING: Integer
|
3519
|
+
end
|
3520
|
+
|
3521
|
+
# Flags for return nodes.
|
3522
|
+
module ReturnNodeFlags
|
3523
|
+
# a return statement that is redundant because it is the last statement in a method
|
3524
|
+
REDUNDANT: Integer
|
3525
|
+
end
|
3526
|
+
|
3527
|
+
# Flags for shareable constant nodes.
|
3528
|
+
module ShareableConstantNodeFlags
|
3529
|
+
# constant writes that should be modified with shareable constant value literal
|
3530
|
+
LITERAL: Integer
|
3531
|
+
# constant writes that should be modified with shareable constant value experimental everything
|
3532
|
+
EXPERIMENTAL_EVERYTHING: Integer
|
3533
|
+
# constant writes that should be modified with shareable constant value experimental copy
|
3534
|
+
EXPERIMENTAL_COPY: Integer
|
3535
|
+
end
|
3536
|
+
|
3537
|
+
# Flags for string nodes.
|
3538
|
+
module StringFlags
|
3539
|
+
# internal bytes forced the encoding to UTF-8
|
3540
|
+
FORCED_UTF8_ENCODING: Integer
|
3541
|
+
# internal bytes forced the encoding to binary
|
3542
|
+
FORCED_BINARY_ENCODING: Integer
|
3543
|
+
# frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`
|
3544
|
+
FROZEN: Integer
|
3545
|
+
# mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`
|
3546
|
+
MUTABLE: Integer
|
3547
|
+
end
|
3548
|
+
|
3549
|
+
# Flags for symbol nodes.
|
3550
|
+
module SymbolFlags
|
3551
|
+
# internal bytes forced the encoding to UTF-8
|
3552
|
+
FORCED_UTF8_ENCODING: Integer
|
3553
|
+
# internal bytes forced the encoding to binary
|
3554
|
+
FORCED_BINARY_ENCODING: Integer
|
3555
|
+
# internal bytes forced the encoding to US-ASCII
|
3556
|
+
FORCED_US_ASCII_ENCODING: Integer
|
3557
|
+
end
|
3558
|
+
end
|