jruby-prism-parser 0.23.0.pre.SNAPSHOT-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +401 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +62 -0
- data/LICENSE.md +7 -0
- data/Makefile +101 -0
- data/README.md +98 -0
- data/config.yml +2902 -0
- data/docs/build_system.md +91 -0
- data/docs/configuration.md +64 -0
- data/docs/cruby_compilation.md +27 -0
- data/docs/design.md +53 -0
- data/docs/encoding.md +121 -0
- data/docs/fuzzing.md +88 -0
- data/docs/heredocs.md +36 -0
- data/docs/javascript.md +118 -0
- data/docs/local_variable_depth.md +229 -0
- data/docs/mapping.md +117 -0
- data/docs/parser_translation.md +34 -0
- data/docs/parsing_rules.md +19 -0
- data/docs/releasing.md +98 -0
- data/docs/ripper.md +36 -0
- data/docs/ruby_api.md +43 -0
- data/docs/ruby_parser_translation.md +19 -0
- data/docs/serialization.md +209 -0
- data/docs/testing.md +55 -0
- data/ext/prism/api_node.c +5098 -0
- data/ext/prism/api_pack.c +267 -0
- data/ext/prism/extconf.rb +110 -0
- data/ext/prism/extension.c +1155 -0
- data/ext/prism/extension.h +18 -0
- data/include/prism/ast.h +5807 -0
- data/include/prism/defines.h +102 -0
- data/include/prism/diagnostic.h +339 -0
- data/include/prism/encoding.h +265 -0
- data/include/prism/node.h +57 -0
- data/include/prism/options.h +230 -0
- data/include/prism/pack.h +152 -0
- data/include/prism/parser.h +732 -0
- data/include/prism/prettyprint.h +26 -0
- data/include/prism/regexp.h +33 -0
- data/include/prism/util/pm_buffer.h +155 -0
- data/include/prism/util/pm_char.h +205 -0
- data/include/prism/util/pm_constant_pool.h +209 -0
- data/include/prism/util/pm_list.h +97 -0
- data/include/prism/util/pm_memchr.h +29 -0
- data/include/prism/util/pm_newline_list.h +93 -0
- data/include/prism/util/pm_state_stack.h +42 -0
- data/include/prism/util/pm_string.h +150 -0
- data/include/prism/util/pm_string_list.h +44 -0
- data/include/prism/util/pm_strncasecmp.h +32 -0
- data/include/prism/util/pm_strpbrk.h +46 -0
- data/include/prism/version.h +29 -0
- data/include/prism.h +289 -0
- data/jruby-prism.jar +0 -0
- data/lib/prism/compiler.rb +486 -0
- data/lib/prism/debug.rb +206 -0
- data/lib/prism/desugar_compiler.rb +207 -0
- data/lib/prism/dispatcher.rb +2150 -0
- data/lib/prism/dot_visitor.rb +4634 -0
- data/lib/prism/dsl.rb +785 -0
- data/lib/prism/ffi.rb +346 -0
- data/lib/prism/lex_compat.rb +908 -0
- data/lib/prism/mutation_compiler.rb +753 -0
- data/lib/prism/node.rb +17864 -0
- data/lib/prism/node_ext.rb +212 -0
- data/lib/prism/node_inspector.rb +68 -0
- data/lib/prism/pack.rb +224 -0
- data/lib/prism/parse_result/comments.rb +177 -0
- data/lib/prism/parse_result/newlines.rb +64 -0
- data/lib/prism/parse_result.rb +498 -0
- data/lib/prism/pattern.rb +250 -0
- data/lib/prism/serialize.rb +1354 -0
- data/lib/prism/translation/parser/compiler.rb +1838 -0
- data/lib/prism/translation/parser/lexer.rb +335 -0
- data/lib/prism/translation/parser/rubocop.rb +37 -0
- data/lib/prism/translation/parser.rb +178 -0
- data/lib/prism/translation/ripper.rb +577 -0
- data/lib/prism/translation/ruby_parser.rb +1521 -0
- data/lib/prism/translation.rb +11 -0
- data/lib/prism/version.rb +3 -0
- data/lib/prism/visitor.rb +495 -0
- data/lib/prism.rb +99 -0
- data/prism.gemspec +135 -0
- data/rbi/prism.rbi +7767 -0
- data/rbi/prism_static.rbi +207 -0
- data/sig/prism.rbs +4773 -0
- data/sig/prism_static.rbs +201 -0
- data/src/diagnostic.c +400 -0
- data/src/encoding.c +5132 -0
- data/src/node.c +2786 -0
- data/src/options.c +213 -0
- data/src/pack.c +493 -0
- data/src/prettyprint.c +8881 -0
- data/src/prism.c +18406 -0
- data/src/regexp.c +638 -0
- data/src/serialize.c +1554 -0
- data/src/token_type.c +700 -0
- data/src/util/pm_buffer.c +190 -0
- data/src/util/pm_char.c +318 -0
- data/src/util/pm_constant_pool.c +322 -0
- data/src/util/pm_list.c +49 -0
- data/src/util/pm_memchr.c +35 -0
- data/src/util/pm_newline_list.c +84 -0
- data/src/util/pm_state_stack.c +25 -0
- data/src/util/pm_string.c +203 -0
- data/src/util/pm_string_list.c +28 -0
- data/src/util/pm_strncasecmp.c +24 -0
- data/src/util/pm_strpbrk.c +180 -0
- metadata +156 -0
@@ -0,0 +1,2150 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
=begin
|
3
|
+
This file is generated by the templates/template.rb script and should not be
|
4
|
+
modified manually. See templates/lib/prism/dispatcher.rb.erb
|
5
|
+
if you are looking to modify the template
|
6
|
+
=end
|
7
|
+
|
8
|
+
module Prism
|
9
|
+
# The dispatcher class fires events for nodes that are found while walking an
|
10
|
+
# AST to all registered listeners. It's useful for performing different types
|
11
|
+
# of analysis on the AST while only having to walk the tree once.
|
12
|
+
#
|
13
|
+
# To use the dispatcher, you would first instantiate it and register listeners
|
14
|
+
# for the events you're interested in:
|
15
|
+
#
|
16
|
+
# class OctalListener
|
17
|
+
# def on_integer_node_enter(node)
|
18
|
+
# if node.octal? && !node.slice.start_with?("0o")
|
19
|
+
# warn("Octal integers should be written with the 0o prefix")
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# dispatcher = Dispatcher.new
|
25
|
+
# dispatcher.register(listener, :on_integer_node_enter)
|
26
|
+
#
|
27
|
+
# Then, you can walk any number of trees and dispatch events to the listeners:
|
28
|
+
#
|
29
|
+
# result = Prism.parse("001 + 002 + 003")
|
30
|
+
# dispatcher.dispatch(result.value)
|
31
|
+
#
|
32
|
+
# Optionally, you can also use `#dispatch_once` to dispatch enter and leave
|
33
|
+
# events for a single node without recursing further down the tree. This can
|
34
|
+
# be useful in circumstances where you want to reuse the listeners you already
|
35
|
+
# have registers but want to stop walking the tree at a certain point.
|
36
|
+
#
|
37
|
+
# integer = result.value.statements.body.first.receiver.receiver
|
38
|
+
# dispatcher.dispatch_once(integer)
|
39
|
+
#
|
40
|
+
class Dispatcher < Visitor
|
41
|
+
# attr_reader listeners: Hash[Symbol, Array[Listener]]
|
42
|
+
attr_reader :listeners
|
43
|
+
|
44
|
+
# Initialize a new dispatcher.
|
45
|
+
def initialize
|
46
|
+
@listeners = {}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Register a listener for one or more events.
|
50
|
+
#
|
51
|
+
# def register: (Listener, *Symbol) -> void
|
52
|
+
def register(listener, *events)
|
53
|
+
events.each { |event| (listeners[event] ||= []) << listener }
|
54
|
+
end
|
55
|
+
|
56
|
+
# Walks `root` dispatching events to all registered listeners.
|
57
|
+
#
|
58
|
+
# def dispatch: (Node) -> void
|
59
|
+
alias dispatch visit
|
60
|
+
|
61
|
+
# Dispatches a single event for `node` to all registered listeners.
|
62
|
+
#
|
63
|
+
# def dispatch_once: (Node) -> void
|
64
|
+
def dispatch_once(node)
|
65
|
+
node.accept(DispatchOnce.new(listeners))
|
66
|
+
end
|
67
|
+
|
68
|
+
# Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue
|
69
|
+
# walking the tree.
|
70
|
+
def visit_alias_global_variable_node(node)
|
71
|
+
listeners[:on_alias_global_variable_node_enter]&.each { |listener| listener.on_alias_global_variable_node_enter(node) }
|
72
|
+
super
|
73
|
+
listeners[:on_alias_global_variable_node_leave]&.each { |listener| listener.on_alias_global_variable_node_leave(node) }
|
74
|
+
end
|
75
|
+
|
76
|
+
# Dispatch enter and leave events for AliasMethodNode nodes and continue
|
77
|
+
# walking the tree.
|
78
|
+
def visit_alias_method_node(node)
|
79
|
+
listeners[:on_alias_method_node_enter]&.each { |listener| listener.on_alias_method_node_enter(node) }
|
80
|
+
super
|
81
|
+
listeners[:on_alias_method_node_leave]&.each { |listener| listener.on_alias_method_node_leave(node) }
|
82
|
+
end
|
83
|
+
|
84
|
+
# Dispatch enter and leave events for AlternationPatternNode nodes and continue
|
85
|
+
# walking the tree.
|
86
|
+
def visit_alternation_pattern_node(node)
|
87
|
+
listeners[:on_alternation_pattern_node_enter]&.each { |listener| listener.on_alternation_pattern_node_enter(node) }
|
88
|
+
super
|
89
|
+
listeners[:on_alternation_pattern_node_leave]&.each { |listener| listener.on_alternation_pattern_node_leave(node) }
|
90
|
+
end
|
91
|
+
|
92
|
+
# Dispatch enter and leave events for AndNode nodes and continue
|
93
|
+
# walking the tree.
|
94
|
+
def visit_and_node(node)
|
95
|
+
listeners[:on_and_node_enter]&.each { |listener| listener.on_and_node_enter(node) }
|
96
|
+
super
|
97
|
+
listeners[:on_and_node_leave]&.each { |listener| listener.on_and_node_leave(node) }
|
98
|
+
end
|
99
|
+
|
100
|
+
# Dispatch enter and leave events for ArgumentsNode nodes and continue
|
101
|
+
# walking the tree.
|
102
|
+
def visit_arguments_node(node)
|
103
|
+
listeners[:on_arguments_node_enter]&.each { |listener| listener.on_arguments_node_enter(node) }
|
104
|
+
super
|
105
|
+
listeners[:on_arguments_node_leave]&.each { |listener| listener.on_arguments_node_leave(node) }
|
106
|
+
end
|
107
|
+
|
108
|
+
# Dispatch enter and leave events for ArrayNode nodes and continue
|
109
|
+
# walking the tree.
|
110
|
+
def visit_array_node(node)
|
111
|
+
listeners[:on_array_node_enter]&.each { |listener| listener.on_array_node_enter(node) }
|
112
|
+
super
|
113
|
+
listeners[:on_array_node_leave]&.each { |listener| listener.on_array_node_leave(node) }
|
114
|
+
end
|
115
|
+
|
116
|
+
# Dispatch enter and leave events for ArrayPatternNode nodes and continue
|
117
|
+
# walking the tree.
|
118
|
+
def visit_array_pattern_node(node)
|
119
|
+
listeners[:on_array_pattern_node_enter]&.each { |listener| listener.on_array_pattern_node_enter(node) }
|
120
|
+
super
|
121
|
+
listeners[:on_array_pattern_node_leave]&.each { |listener| listener.on_array_pattern_node_leave(node) }
|
122
|
+
end
|
123
|
+
|
124
|
+
# Dispatch enter and leave events for AssocNode nodes and continue
|
125
|
+
# walking the tree.
|
126
|
+
def visit_assoc_node(node)
|
127
|
+
listeners[:on_assoc_node_enter]&.each { |listener| listener.on_assoc_node_enter(node) }
|
128
|
+
super
|
129
|
+
listeners[:on_assoc_node_leave]&.each { |listener| listener.on_assoc_node_leave(node) }
|
130
|
+
end
|
131
|
+
|
132
|
+
# Dispatch enter and leave events for AssocSplatNode nodes and continue
|
133
|
+
# walking the tree.
|
134
|
+
def visit_assoc_splat_node(node)
|
135
|
+
listeners[:on_assoc_splat_node_enter]&.each { |listener| listener.on_assoc_splat_node_enter(node) }
|
136
|
+
super
|
137
|
+
listeners[:on_assoc_splat_node_leave]&.each { |listener| listener.on_assoc_splat_node_leave(node) }
|
138
|
+
end
|
139
|
+
|
140
|
+
# Dispatch enter and leave events for BackReferenceReadNode nodes and continue
|
141
|
+
# walking the tree.
|
142
|
+
def visit_back_reference_read_node(node)
|
143
|
+
listeners[:on_back_reference_read_node_enter]&.each { |listener| listener.on_back_reference_read_node_enter(node) }
|
144
|
+
super
|
145
|
+
listeners[:on_back_reference_read_node_leave]&.each { |listener| listener.on_back_reference_read_node_leave(node) }
|
146
|
+
end
|
147
|
+
|
148
|
+
# Dispatch enter and leave events for BeginNode nodes and continue
|
149
|
+
# walking the tree.
|
150
|
+
def visit_begin_node(node)
|
151
|
+
listeners[:on_begin_node_enter]&.each { |listener| listener.on_begin_node_enter(node) }
|
152
|
+
super
|
153
|
+
listeners[:on_begin_node_leave]&.each { |listener| listener.on_begin_node_leave(node) }
|
154
|
+
end
|
155
|
+
|
156
|
+
# Dispatch enter and leave events for BlockArgumentNode nodes and continue
|
157
|
+
# walking the tree.
|
158
|
+
def visit_block_argument_node(node)
|
159
|
+
listeners[:on_block_argument_node_enter]&.each { |listener| listener.on_block_argument_node_enter(node) }
|
160
|
+
super
|
161
|
+
listeners[:on_block_argument_node_leave]&.each { |listener| listener.on_block_argument_node_leave(node) }
|
162
|
+
end
|
163
|
+
|
164
|
+
# Dispatch enter and leave events for BlockLocalVariableNode nodes and continue
|
165
|
+
# walking the tree.
|
166
|
+
def visit_block_local_variable_node(node)
|
167
|
+
listeners[:on_block_local_variable_node_enter]&.each { |listener| listener.on_block_local_variable_node_enter(node) }
|
168
|
+
super
|
169
|
+
listeners[:on_block_local_variable_node_leave]&.each { |listener| listener.on_block_local_variable_node_leave(node) }
|
170
|
+
end
|
171
|
+
|
172
|
+
# Dispatch enter and leave events for BlockNode nodes and continue
|
173
|
+
# walking the tree.
|
174
|
+
def visit_block_node(node)
|
175
|
+
listeners[:on_block_node_enter]&.each { |listener| listener.on_block_node_enter(node) }
|
176
|
+
super
|
177
|
+
listeners[:on_block_node_leave]&.each { |listener| listener.on_block_node_leave(node) }
|
178
|
+
end
|
179
|
+
|
180
|
+
# Dispatch enter and leave events for BlockParameterNode nodes and continue
|
181
|
+
# walking the tree.
|
182
|
+
def visit_block_parameter_node(node)
|
183
|
+
listeners[:on_block_parameter_node_enter]&.each { |listener| listener.on_block_parameter_node_enter(node) }
|
184
|
+
super
|
185
|
+
listeners[:on_block_parameter_node_leave]&.each { |listener| listener.on_block_parameter_node_leave(node) }
|
186
|
+
end
|
187
|
+
|
188
|
+
# Dispatch enter and leave events for BlockParametersNode nodes and continue
|
189
|
+
# walking the tree.
|
190
|
+
def visit_block_parameters_node(node)
|
191
|
+
listeners[:on_block_parameters_node_enter]&.each { |listener| listener.on_block_parameters_node_enter(node) }
|
192
|
+
super
|
193
|
+
listeners[:on_block_parameters_node_leave]&.each { |listener| listener.on_block_parameters_node_leave(node) }
|
194
|
+
end
|
195
|
+
|
196
|
+
# Dispatch enter and leave events for BreakNode nodes and continue
|
197
|
+
# walking the tree.
|
198
|
+
def visit_break_node(node)
|
199
|
+
listeners[:on_break_node_enter]&.each { |listener| listener.on_break_node_enter(node) }
|
200
|
+
super
|
201
|
+
listeners[:on_break_node_leave]&.each { |listener| listener.on_break_node_leave(node) }
|
202
|
+
end
|
203
|
+
|
204
|
+
# Dispatch enter and leave events for CallAndWriteNode nodes and continue
|
205
|
+
# walking the tree.
|
206
|
+
def visit_call_and_write_node(node)
|
207
|
+
listeners[:on_call_and_write_node_enter]&.each { |listener| listener.on_call_and_write_node_enter(node) }
|
208
|
+
super
|
209
|
+
listeners[:on_call_and_write_node_leave]&.each { |listener| listener.on_call_and_write_node_leave(node) }
|
210
|
+
end
|
211
|
+
|
212
|
+
# Dispatch enter and leave events for CallNode nodes and continue
|
213
|
+
# walking the tree.
|
214
|
+
def visit_call_node(node)
|
215
|
+
listeners[:on_call_node_enter]&.each { |listener| listener.on_call_node_enter(node) }
|
216
|
+
super
|
217
|
+
listeners[:on_call_node_leave]&.each { |listener| listener.on_call_node_leave(node) }
|
218
|
+
end
|
219
|
+
|
220
|
+
# Dispatch enter and leave events for CallOperatorWriteNode nodes and continue
|
221
|
+
# walking the tree.
|
222
|
+
def visit_call_operator_write_node(node)
|
223
|
+
listeners[:on_call_operator_write_node_enter]&.each { |listener| listener.on_call_operator_write_node_enter(node) }
|
224
|
+
super
|
225
|
+
listeners[:on_call_operator_write_node_leave]&.each { |listener| listener.on_call_operator_write_node_leave(node) }
|
226
|
+
end
|
227
|
+
|
228
|
+
# Dispatch enter and leave events for CallOrWriteNode nodes and continue
|
229
|
+
# walking the tree.
|
230
|
+
def visit_call_or_write_node(node)
|
231
|
+
listeners[:on_call_or_write_node_enter]&.each { |listener| listener.on_call_or_write_node_enter(node) }
|
232
|
+
super
|
233
|
+
listeners[:on_call_or_write_node_leave]&.each { |listener| listener.on_call_or_write_node_leave(node) }
|
234
|
+
end
|
235
|
+
|
236
|
+
# Dispatch enter and leave events for CallTargetNode nodes and continue
|
237
|
+
# walking the tree.
|
238
|
+
def visit_call_target_node(node)
|
239
|
+
listeners[:on_call_target_node_enter]&.each { |listener| listener.on_call_target_node_enter(node) }
|
240
|
+
super
|
241
|
+
listeners[:on_call_target_node_leave]&.each { |listener| listener.on_call_target_node_leave(node) }
|
242
|
+
end
|
243
|
+
|
244
|
+
# Dispatch enter and leave events for CapturePatternNode nodes and continue
|
245
|
+
# walking the tree.
|
246
|
+
def visit_capture_pattern_node(node)
|
247
|
+
listeners[:on_capture_pattern_node_enter]&.each { |listener| listener.on_capture_pattern_node_enter(node) }
|
248
|
+
super
|
249
|
+
listeners[:on_capture_pattern_node_leave]&.each { |listener| listener.on_capture_pattern_node_leave(node) }
|
250
|
+
end
|
251
|
+
|
252
|
+
# Dispatch enter and leave events for CaseMatchNode nodes and continue
|
253
|
+
# walking the tree.
|
254
|
+
def visit_case_match_node(node)
|
255
|
+
listeners[:on_case_match_node_enter]&.each { |listener| listener.on_case_match_node_enter(node) }
|
256
|
+
super
|
257
|
+
listeners[:on_case_match_node_leave]&.each { |listener| listener.on_case_match_node_leave(node) }
|
258
|
+
end
|
259
|
+
|
260
|
+
# Dispatch enter and leave events for CaseNode nodes and continue
|
261
|
+
# walking the tree.
|
262
|
+
def visit_case_node(node)
|
263
|
+
listeners[:on_case_node_enter]&.each { |listener| listener.on_case_node_enter(node) }
|
264
|
+
super
|
265
|
+
listeners[:on_case_node_leave]&.each { |listener| listener.on_case_node_leave(node) }
|
266
|
+
end
|
267
|
+
|
268
|
+
# Dispatch enter and leave events for ClassNode nodes and continue
|
269
|
+
# walking the tree.
|
270
|
+
def visit_class_node(node)
|
271
|
+
listeners[:on_class_node_enter]&.each { |listener| listener.on_class_node_enter(node) }
|
272
|
+
super
|
273
|
+
listeners[:on_class_node_leave]&.each { |listener| listener.on_class_node_leave(node) }
|
274
|
+
end
|
275
|
+
|
276
|
+
# Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue
|
277
|
+
# walking the tree.
|
278
|
+
def visit_class_variable_and_write_node(node)
|
279
|
+
listeners[:on_class_variable_and_write_node_enter]&.each { |listener| listener.on_class_variable_and_write_node_enter(node) }
|
280
|
+
super
|
281
|
+
listeners[:on_class_variable_and_write_node_leave]&.each { |listener| listener.on_class_variable_and_write_node_leave(node) }
|
282
|
+
end
|
283
|
+
|
284
|
+
# Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue
|
285
|
+
# walking the tree.
|
286
|
+
def visit_class_variable_operator_write_node(node)
|
287
|
+
listeners[:on_class_variable_operator_write_node_enter]&.each { |listener| listener.on_class_variable_operator_write_node_enter(node) }
|
288
|
+
super
|
289
|
+
listeners[:on_class_variable_operator_write_node_leave]&.each { |listener| listener.on_class_variable_operator_write_node_leave(node) }
|
290
|
+
end
|
291
|
+
|
292
|
+
# Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue
|
293
|
+
# walking the tree.
|
294
|
+
def visit_class_variable_or_write_node(node)
|
295
|
+
listeners[:on_class_variable_or_write_node_enter]&.each { |listener| listener.on_class_variable_or_write_node_enter(node) }
|
296
|
+
super
|
297
|
+
listeners[:on_class_variable_or_write_node_leave]&.each { |listener| listener.on_class_variable_or_write_node_leave(node) }
|
298
|
+
end
|
299
|
+
|
300
|
+
# Dispatch enter and leave events for ClassVariableReadNode nodes and continue
|
301
|
+
# walking the tree.
|
302
|
+
def visit_class_variable_read_node(node)
|
303
|
+
listeners[:on_class_variable_read_node_enter]&.each { |listener| listener.on_class_variable_read_node_enter(node) }
|
304
|
+
super
|
305
|
+
listeners[:on_class_variable_read_node_leave]&.each { |listener| listener.on_class_variable_read_node_leave(node) }
|
306
|
+
end
|
307
|
+
|
308
|
+
# Dispatch enter and leave events for ClassVariableTargetNode nodes and continue
|
309
|
+
# walking the tree.
|
310
|
+
def visit_class_variable_target_node(node)
|
311
|
+
listeners[:on_class_variable_target_node_enter]&.each { |listener| listener.on_class_variable_target_node_enter(node) }
|
312
|
+
super
|
313
|
+
listeners[:on_class_variable_target_node_leave]&.each { |listener| listener.on_class_variable_target_node_leave(node) }
|
314
|
+
end
|
315
|
+
|
316
|
+
# Dispatch enter and leave events for ClassVariableWriteNode nodes and continue
|
317
|
+
# walking the tree.
|
318
|
+
def visit_class_variable_write_node(node)
|
319
|
+
listeners[:on_class_variable_write_node_enter]&.each { |listener| listener.on_class_variable_write_node_enter(node) }
|
320
|
+
super
|
321
|
+
listeners[:on_class_variable_write_node_leave]&.each { |listener| listener.on_class_variable_write_node_leave(node) }
|
322
|
+
end
|
323
|
+
|
324
|
+
# Dispatch enter and leave events for ConstantAndWriteNode nodes and continue
|
325
|
+
# walking the tree.
|
326
|
+
def visit_constant_and_write_node(node)
|
327
|
+
listeners[:on_constant_and_write_node_enter]&.each { |listener| listener.on_constant_and_write_node_enter(node) }
|
328
|
+
super
|
329
|
+
listeners[:on_constant_and_write_node_leave]&.each { |listener| listener.on_constant_and_write_node_leave(node) }
|
330
|
+
end
|
331
|
+
|
332
|
+
# Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue
|
333
|
+
# walking the tree.
|
334
|
+
def visit_constant_operator_write_node(node)
|
335
|
+
listeners[:on_constant_operator_write_node_enter]&.each { |listener| listener.on_constant_operator_write_node_enter(node) }
|
336
|
+
super
|
337
|
+
listeners[:on_constant_operator_write_node_leave]&.each { |listener| listener.on_constant_operator_write_node_leave(node) }
|
338
|
+
end
|
339
|
+
|
340
|
+
# Dispatch enter and leave events for ConstantOrWriteNode nodes and continue
|
341
|
+
# walking the tree.
|
342
|
+
def visit_constant_or_write_node(node)
|
343
|
+
listeners[:on_constant_or_write_node_enter]&.each { |listener| listener.on_constant_or_write_node_enter(node) }
|
344
|
+
super
|
345
|
+
listeners[:on_constant_or_write_node_leave]&.each { |listener| listener.on_constant_or_write_node_leave(node) }
|
346
|
+
end
|
347
|
+
|
348
|
+
# Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue
|
349
|
+
# walking the tree.
|
350
|
+
def visit_constant_path_and_write_node(node)
|
351
|
+
listeners[:on_constant_path_and_write_node_enter]&.each { |listener| listener.on_constant_path_and_write_node_enter(node) }
|
352
|
+
super
|
353
|
+
listeners[:on_constant_path_and_write_node_leave]&.each { |listener| listener.on_constant_path_and_write_node_leave(node) }
|
354
|
+
end
|
355
|
+
|
356
|
+
# Dispatch enter and leave events for ConstantPathNode nodes and continue
|
357
|
+
# walking the tree.
|
358
|
+
def visit_constant_path_node(node)
|
359
|
+
listeners[:on_constant_path_node_enter]&.each { |listener| listener.on_constant_path_node_enter(node) }
|
360
|
+
super
|
361
|
+
listeners[:on_constant_path_node_leave]&.each { |listener| listener.on_constant_path_node_leave(node) }
|
362
|
+
end
|
363
|
+
|
364
|
+
# Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue
|
365
|
+
# walking the tree.
|
366
|
+
def visit_constant_path_operator_write_node(node)
|
367
|
+
listeners[:on_constant_path_operator_write_node_enter]&.each { |listener| listener.on_constant_path_operator_write_node_enter(node) }
|
368
|
+
super
|
369
|
+
listeners[:on_constant_path_operator_write_node_leave]&.each { |listener| listener.on_constant_path_operator_write_node_leave(node) }
|
370
|
+
end
|
371
|
+
|
372
|
+
# Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue
|
373
|
+
# walking the tree.
|
374
|
+
def visit_constant_path_or_write_node(node)
|
375
|
+
listeners[:on_constant_path_or_write_node_enter]&.each { |listener| listener.on_constant_path_or_write_node_enter(node) }
|
376
|
+
super
|
377
|
+
listeners[:on_constant_path_or_write_node_leave]&.each { |listener| listener.on_constant_path_or_write_node_leave(node) }
|
378
|
+
end
|
379
|
+
|
380
|
+
# Dispatch enter and leave events for ConstantPathTargetNode nodes and continue
|
381
|
+
# walking the tree.
|
382
|
+
def visit_constant_path_target_node(node)
|
383
|
+
listeners[:on_constant_path_target_node_enter]&.each { |listener| listener.on_constant_path_target_node_enter(node) }
|
384
|
+
super
|
385
|
+
listeners[:on_constant_path_target_node_leave]&.each { |listener| listener.on_constant_path_target_node_leave(node) }
|
386
|
+
end
|
387
|
+
|
388
|
+
# Dispatch enter and leave events for ConstantPathWriteNode nodes and continue
|
389
|
+
# walking the tree.
|
390
|
+
def visit_constant_path_write_node(node)
|
391
|
+
listeners[:on_constant_path_write_node_enter]&.each { |listener| listener.on_constant_path_write_node_enter(node) }
|
392
|
+
super
|
393
|
+
listeners[:on_constant_path_write_node_leave]&.each { |listener| listener.on_constant_path_write_node_leave(node) }
|
394
|
+
end
|
395
|
+
|
396
|
+
# Dispatch enter and leave events for ConstantReadNode nodes and continue
|
397
|
+
# walking the tree.
|
398
|
+
def visit_constant_read_node(node)
|
399
|
+
listeners[:on_constant_read_node_enter]&.each { |listener| listener.on_constant_read_node_enter(node) }
|
400
|
+
super
|
401
|
+
listeners[:on_constant_read_node_leave]&.each { |listener| listener.on_constant_read_node_leave(node) }
|
402
|
+
end
|
403
|
+
|
404
|
+
# Dispatch enter and leave events for ConstantTargetNode nodes and continue
|
405
|
+
# walking the tree.
|
406
|
+
def visit_constant_target_node(node)
|
407
|
+
listeners[:on_constant_target_node_enter]&.each { |listener| listener.on_constant_target_node_enter(node) }
|
408
|
+
super
|
409
|
+
listeners[:on_constant_target_node_leave]&.each { |listener| listener.on_constant_target_node_leave(node) }
|
410
|
+
end
|
411
|
+
|
412
|
+
# Dispatch enter and leave events for ConstantWriteNode nodes and continue
|
413
|
+
# walking the tree.
|
414
|
+
def visit_constant_write_node(node)
|
415
|
+
listeners[:on_constant_write_node_enter]&.each { |listener| listener.on_constant_write_node_enter(node) }
|
416
|
+
super
|
417
|
+
listeners[:on_constant_write_node_leave]&.each { |listener| listener.on_constant_write_node_leave(node) }
|
418
|
+
end
|
419
|
+
|
420
|
+
# Dispatch enter and leave events for DefNode nodes and continue
|
421
|
+
# walking the tree.
|
422
|
+
def visit_def_node(node)
|
423
|
+
listeners[:on_def_node_enter]&.each { |listener| listener.on_def_node_enter(node) }
|
424
|
+
super
|
425
|
+
listeners[:on_def_node_leave]&.each { |listener| listener.on_def_node_leave(node) }
|
426
|
+
end
|
427
|
+
|
428
|
+
# Dispatch enter and leave events for DefinedNode nodes and continue
|
429
|
+
# walking the tree.
|
430
|
+
def visit_defined_node(node)
|
431
|
+
listeners[:on_defined_node_enter]&.each { |listener| listener.on_defined_node_enter(node) }
|
432
|
+
super
|
433
|
+
listeners[:on_defined_node_leave]&.each { |listener| listener.on_defined_node_leave(node) }
|
434
|
+
end
|
435
|
+
|
436
|
+
# Dispatch enter and leave events for ElseNode nodes and continue
|
437
|
+
# walking the tree.
|
438
|
+
def visit_else_node(node)
|
439
|
+
listeners[:on_else_node_enter]&.each { |listener| listener.on_else_node_enter(node) }
|
440
|
+
super
|
441
|
+
listeners[:on_else_node_leave]&.each { |listener| listener.on_else_node_leave(node) }
|
442
|
+
end
|
443
|
+
|
444
|
+
# Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue
|
445
|
+
# walking the tree.
|
446
|
+
def visit_embedded_statements_node(node)
|
447
|
+
listeners[:on_embedded_statements_node_enter]&.each { |listener| listener.on_embedded_statements_node_enter(node) }
|
448
|
+
super
|
449
|
+
listeners[:on_embedded_statements_node_leave]&.each { |listener| listener.on_embedded_statements_node_leave(node) }
|
450
|
+
end
|
451
|
+
|
452
|
+
# Dispatch enter and leave events for EmbeddedVariableNode nodes and continue
|
453
|
+
# walking the tree.
|
454
|
+
def visit_embedded_variable_node(node)
|
455
|
+
listeners[:on_embedded_variable_node_enter]&.each { |listener| listener.on_embedded_variable_node_enter(node) }
|
456
|
+
super
|
457
|
+
listeners[:on_embedded_variable_node_leave]&.each { |listener| listener.on_embedded_variable_node_leave(node) }
|
458
|
+
end
|
459
|
+
|
460
|
+
# Dispatch enter and leave events for EnsureNode nodes and continue
|
461
|
+
# walking the tree.
|
462
|
+
def visit_ensure_node(node)
|
463
|
+
listeners[:on_ensure_node_enter]&.each { |listener| listener.on_ensure_node_enter(node) }
|
464
|
+
super
|
465
|
+
listeners[:on_ensure_node_leave]&.each { |listener| listener.on_ensure_node_leave(node) }
|
466
|
+
end
|
467
|
+
|
468
|
+
# Dispatch enter and leave events for FalseNode nodes and continue
|
469
|
+
# walking the tree.
|
470
|
+
def visit_false_node(node)
|
471
|
+
listeners[:on_false_node_enter]&.each { |listener| listener.on_false_node_enter(node) }
|
472
|
+
super
|
473
|
+
listeners[:on_false_node_leave]&.each { |listener| listener.on_false_node_leave(node) }
|
474
|
+
end
|
475
|
+
|
476
|
+
# Dispatch enter and leave events for FindPatternNode nodes and continue
|
477
|
+
# walking the tree.
|
478
|
+
def visit_find_pattern_node(node)
|
479
|
+
listeners[:on_find_pattern_node_enter]&.each { |listener| listener.on_find_pattern_node_enter(node) }
|
480
|
+
super
|
481
|
+
listeners[:on_find_pattern_node_leave]&.each { |listener| listener.on_find_pattern_node_leave(node) }
|
482
|
+
end
|
483
|
+
|
484
|
+
# Dispatch enter and leave events for FlipFlopNode nodes and continue
|
485
|
+
# walking the tree.
|
486
|
+
def visit_flip_flop_node(node)
|
487
|
+
listeners[:on_flip_flop_node_enter]&.each { |listener| listener.on_flip_flop_node_enter(node) }
|
488
|
+
super
|
489
|
+
listeners[:on_flip_flop_node_leave]&.each { |listener| listener.on_flip_flop_node_leave(node) }
|
490
|
+
end
|
491
|
+
|
492
|
+
# Dispatch enter and leave events for FloatNode nodes and continue
|
493
|
+
# walking the tree.
|
494
|
+
def visit_float_node(node)
|
495
|
+
listeners[:on_float_node_enter]&.each { |listener| listener.on_float_node_enter(node) }
|
496
|
+
super
|
497
|
+
listeners[:on_float_node_leave]&.each { |listener| listener.on_float_node_leave(node) }
|
498
|
+
end
|
499
|
+
|
500
|
+
# Dispatch enter and leave events for ForNode nodes and continue
|
501
|
+
# walking the tree.
|
502
|
+
def visit_for_node(node)
|
503
|
+
listeners[:on_for_node_enter]&.each { |listener| listener.on_for_node_enter(node) }
|
504
|
+
super
|
505
|
+
listeners[:on_for_node_leave]&.each { |listener| listener.on_for_node_leave(node) }
|
506
|
+
end
|
507
|
+
|
508
|
+
# Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue
|
509
|
+
# walking the tree.
|
510
|
+
def visit_forwarding_arguments_node(node)
|
511
|
+
listeners[:on_forwarding_arguments_node_enter]&.each { |listener| listener.on_forwarding_arguments_node_enter(node) }
|
512
|
+
super
|
513
|
+
listeners[:on_forwarding_arguments_node_leave]&.each { |listener| listener.on_forwarding_arguments_node_leave(node) }
|
514
|
+
end
|
515
|
+
|
516
|
+
# Dispatch enter and leave events for ForwardingParameterNode nodes and continue
|
517
|
+
# walking the tree.
|
518
|
+
def visit_forwarding_parameter_node(node)
|
519
|
+
listeners[:on_forwarding_parameter_node_enter]&.each { |listener| listener.on_forwarding_parameter_node_enter(node) }
|
520
|
+
super
|
521
|
+
listeners[:on_forwarding_parameter_node_leave]&.each { |listener| listener.on_forwarding_parameter_node_leave(node) }
|
522
|
+
end
|
523
|
+
|
524
|
+
# Dispatch enter and leave events for ForwardingSuperNode nodes and continue
|
525
|
+
# walking the tree.
|
526
|
+
def visit_forwarding_super_node(node)
|
527
|
+
listeners[:on_forwarding_super_node_enter]&.each { |listener| listener.on_forwarding_super_node_enter(node) }
|
528
|
+
super
|
529
|
+
listeners[:on_forwarding_super_node_leave]&.each { |listener| listener.on_forwarding_super_node_leave(node) }
|
530
|
+
end
|
531
|
+
|
532
|
+
# Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue
|
533
|
+
# walking the tree.
|
534
|
+
def visit_global_variable_and_write_node(node)
|
535
|
+
listeners[:on_global_variable_and_write_node_enter]&.each { |listener| listener.on_global_variable_and_write_node_enter(node) }
|
536
|
+
super
|
537
|
+
listeners[:on_global_variable_and_write_node_leave]&.each { |listener| listener.on_global_variable_and_write_node_leave(node) }
|
538
|
+
end
|
539
|
+
|
540
|
+
# Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue
|
541
|
+
# walking the tree.
|
542
|
+
def visit_global_variable_operator_write_node(node)
|
543
|
+
listeners[:on_global_variable_operator_write_node_enter]&.each { |listener| listener.on_global_variable_operator_write_node_enter(node) }
|
544
|
+
super
|
545
|
+
listeners[:on_global_variable_operator_write_node_leave]&.each { |listener| listener.on_global_variable_operator_write_node_leave(node) }
|
546
|
+
end
|
547
|
+
|
548
|
+
# Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue
|
549
|
+
# walking the tree.
|
550
|
+
def visit_global_variable_or_write_node(node)
|
551
|
+
listeners[:on_global_variable_or_write_node_enter]&.each { |listener| listener.on_global_variable_or_write_node_enter(node) }
|
552
|
+
super
|
553
|
+
listeners[:on_global_variable_or_write_node_leave]&.each { |listener| listener.on_global_variable_or_write_node_leave(node) }
|
554
|
+
end
|
555
|
+
|
556
|
+
# Dispatch enter and leave events for GlobalVariableReadNode nodes and continue
|
557
|
+
# walking the tree.
|
558
|
+
def visit_global_variable_read_node(node)
|
559
|
+
listeners[:on_global_variable_read_node_enter]&.each { |listener| listener.on_global_variable_read_node_enter(node) }
|
560
|
+
super
|
561
|
+
listeners[:on_global_variable_read_node_leave]&.each { |listener| listener.on_global_variable_read_node_leave(node) }
|
562
|
+
end
|
563
|
+
|
564
|
+
# Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue
|
565
|
+
# walking the tree.
|
566
|
+
def visit_global_variable_target_node(node)
|
567
|
+
listeners[:on_global_variable_target_node_enter]&.each { |listener| listener.on_global_variable_target_node_enter(node) }
|
568
|
+
super
|
569
|
+
listeners[:on_global_variable_target_node_leave]&.each { |listener| listener.on_global_variable_target_node_leave(node) }
|
570
|
+
end
|
571
|
+
|
572
|
+
# Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue
|
573
|
+
# walking the tree.
|
574
|
+
def visit_global_variable_write_node(node)
|
575
|
+
listeners[:on_global_variable_write_node_enter]&.each { |listener| listener.on_global_variable_write_node_enter(node) }
|
576
|
+
super
|
577
|
+
listeners[:on_global_variable_write_node_leave]&.each { |listener| listener.on_global_variable_write_node_leave(node) }
|
578
|
+
end
|
579
|
+
|
580
|
+
# Dispatch enter and leave events for HashNode nodes and continue
|
581
|
+
# walking the tree.
|
582
|
+
def visit_hash_node(node)
|
583
|
+
listeners[:on_hash_node_enter]&.each { |listener| listener.on_hash_node_enter(node) }
|
584
|
+
super
|
585
|
+
listeners[:on_hash_node_leave]&.each { |listener| listener.on_hash_node_leave(node) }
|
586
|
+
end
|
587
|
+
|
588
|
+
# Dispatch enter and leave events for HashPatternNode nodes and continue
|
589
|
+
# walking the tree.
|
590
|
+
def visit_hash_pattern_node(node)
|
591
|
+
listeners[:on_hash_pattern_node_enter]&.each { |listener| listener.on_hash_pattern_node_enter(node) }
|
592
|
+
super
|
593
|
+
listeners[:on_hash_pattern_node_leave]&.each { |listener| listener.on_hash_pattern_node_leave(node) }
|
594
|
+
end
|
595
|
+
|
596
|
+
# Dispatch enter and leave events for IfNode nodes and continue
|
597
|
+
# walking the tree.
|
598
|
+
def visit_if_node(node)
|
599
|
+
listeners[:on_if_node_enter]&.each { |listener| listener.on_if_node_enter(node) }
|
600
|
+
super
|
601
|
+
listeners[:on_if_node_leave]&.each { |listener| listener.on_if_node_leave(node) }
|
602
|
+
end
|
603
|
+
|
604
|
+
# Dispatch enter and leave events for ImaginaryNode nodes and continue
|
605
|
+
# walking the tree.
|
606
|
+
def visit_imaginary_node(node)
|
607
|
+
listeners[:on_imaginary_node_enter]&.each { |listener| listener.on_imaginary_node_enter(node) }
|
608
|
+
super
|
609
|
+
listeners[:on_imaginary_node_leave]&.each { |listener| listener.on_imaginary_node_leave(node) }
|
610
|
+
end
|
611
|
+
|
612
|
+
# Dispatch enter and leave events for ImplicitNode nodes and continue
|
613
|
+
# walking the tree.
|
614
|
+
def visit_implicit_node(node)
|
615
|
+
listeners[:on_implicit_node_enter]&.each { |listener| listener.on_implicit_node_enter(node) }
|
616
|
+
super
|
617
|
+
listeners[:on_implicit_node_leave]&.each { |listener| listener.on_implicit_node_leave(node) }
|
618
|
+
end
|
619
|
+
|
620
|
+
# Dispatch enter and leave events for ImplicitRestNode nodes and continue
|
621
|
+
# walking the tree.
|
622
|
+
def visit_implicit_rest_node(node)
|
623
|
+
listeners[:on_implicit_rest_node_enter]&.each { |listener| listener.on_implicit_rest_node_enter(node) }
|
624
|
+
super
|
625
|
+
listeners[:on_implicit_rest_node_leave]&.each { |listener| listener.on_implicit_rest_node_leave(node) }
|
626
|
+
end
|
627
|
+
|
628
|
+
# Dispatch enter and leave events for InNode nodes and continue
|
629
|
+
# walking the tree.
|
630
|
+
def visit_in_node(node)
|
631
|
+
listeners[:on_in_node_enter]&.each { |listener| listener.on_in_node_enter(node) }
|
632
|
+
super
|
633
|
+
listeners[:on_in_node_leave]&.each { |listener| listener.on_in_node_leave(node) }
|
634
|
+
end
|
635
|
+
|
636
|
+
# Dispatch enter and leave events for IndexAndWriteNode nodes and continue
|
637
|
+
# walking the tree.
|
638
|
+
def visit_index_and_write_node(node)
|
639
|
+
listeners[:on_index_and_write_node_enter]&.each { |listener| listener.on_index_and_write_node_enter(node) }
|
640
|
+
super
|
641
|
+
listeners[:on_index_and_write_node_leave]&.each { |listener| listener.on_index_and_write_node_leave(node) }
|
642
|
+
end
|
643
|
+
|
644
|
+
# Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue
|
645
|
+
# walking the tree.
|
646
|
+
def visit_index_operator_write_node(node)
|
647
|
+
listeners[:on_index_operator_write_node_enter]&.each { |listener| listener.on_index_operator_write_node_enter(node) }
|
648
|
+
super
|
649
|
+
listeners[:on_index_operator_write_node_leave]&.each { |listener| listener.on_index_operator_write_node_leave(node) }
|
650
|
+
end
|
651
|
+
|
652
|
+
# Dispatch enter and leave events for IndexOrWriteNode nodes and continue
|
653
|
+
# walking the tree.
|
654
|
+
def visit_index_or_write_node(node)
|
655
|
+
listeners[:on_index_or_write_node_enter]&.each { |listener| listener.on_index_or_write_node_enter(node) }
|
656
|
+
super
|
657
|
+
listeners[:on_index_or_write_node_leave]&.each { |listener| listener.on_index_or_write_node_leave(node) }
|
658
|
+
end
|
659
|
+
|
660
|
+
# Dispatch enter and leave events for IndexTargetNode nodes and continue
|
661
|
+
# walking the tree.
|
662
|
+
def visit_index_target_node(node)
|
663
|
+
listeners[:on_index_target_node_enter]&.each { |listener| listener.on_index_target_node_enter(node) }
|
664
|
+
super
|
665
|
+
listeners[:on_index_target_node_leave]&.each { |listener| listener.on_index_target_node_leave(node) }
|
666
|
+
end
|
667
|
+
|
668
|
+
# Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue
|
669
|
+
# walking the tree.
|
670
|
+
def visit_instance_variable_and_write_node(node)
|
671
|
+
listeners[:on_instance_variable_and_write_node_enter]&.each { |listener| listener.on_instance_variable_and_write_node_enter(node) }
|
672
|
+
super
|
673
|
+
listeners[:on_instance_variable_and_write_node_leave]&.each { |listener| listener.on_instance_variable_and_write_node_leave(node) }
|
674
|
+
end
|
675
|
+
|
676
|
+
# Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue
|
677
|
+
# walking the tree.
|
678
|
+
def visit_instance_variable_operator_write_node(node)
|
679
|
+
listeners[:on_instance_variable_operator_write_node_enter]&.each { |listener| listener.on_instance_variable_operator_write_node_enter(node) }
|
680
|
+
super
|
681
|
+
listeners[:on_instance_variable_operator_write_node_leave]&.each { |listener| listener.on_instance_variable_operator_write_node_leave(node) }
|
682
|
+
end
|
683
|
+
|
684
|
+
# Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue
|
685
|
+
# walking the tree.
|
686
|
+
def visit_instance_variable_or_write_node(node)
|
687
|
+
listeners[:on_instance_variable_or_write_node_enter]&.each { |listener| listener.on_instance_variable_or_write_node_enter(node) }
|
688
|
+
super
|
689
|
+
listeners[:on_instance_variable_or_write_node_leave]&.each { |listener| listener.on_instance_variable_or_write_node_leave(node) }
|
690
|
+
end
|
691
|
+
|
692
|
+
# Dispatch enter and leave events for InstanceVariableReadNode nodes and continue
|
693
|
+
# walking the tree.
|
694
|
+
def visit_instance_variable_read_node(node)
|
695
|
+
listeners[:on_instance_variable_read_node_enter]&.each { |listener| listener.on_instance_variable_read_node_enter(node) }
|
696
|
+
super
|
697
|
+
listeners[:on_instance_variable_read_node_leave]&.each { |listener| listener.on_instance_variable_read_node_leave(node) }
|
698
|
+
end
|
699
|
+
|
700
|
+
# Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue
|
701
|
+
# walking the tree.
|
702
|
+
def visit_instance_variable_target_node(node)
|
703
|
+
listeners[:on_instance_variable_target_node_enter]&.each { |listener| listener.on_instance_variable_target_node_enter(node) }
|
704
|
+
super
|
705
|
+
listeners[:on_instance_variable_target_node_leave]&.each { |listener| listener.on_instance_variable_target_node_leave(node) }
|
706
|
+
end
|
707
|
+
|
708
|
+
# Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue
|
709
|
+
# walking the tree.
|
710
|
+
def visit_instance_variable_write_node(node)
|
711
|
+
listeners[:on_instance_variable_write_node_enter]&.each { |listener| listener.on_instance_variable_write_node_enter(node) }
|
712
|
+
super
|
713
|
+
listeners[:on_instance_variable_write_node_leave]&.each { |listener| listener.on_instance_variable_write_node_leave(node) }
|
714
|
+
end
|
715
|
+
|
716
|
+
# Dispatch enter and leave events for IntegerNode nodes and continue
|
717
|
+
# walking the tree.
|
718
|
+
def visit_integer_node(node)
|
719
|
+
listeners[:on_integer_node_enter]&.each { |listener| listener.on_integer_node_enter(node) }
|
720
|
+
super
|
721
|
+
listeners[:on_integer_node_leave]&.each { |listener| listener.on_integer_node_leave(node) }
|
722
|
+
end
|
723
|
+
|
724
|
+
# Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue
|
725
|
+
# walking the tree.
|
726
|
+
def visit_interpolated_match_last_line_node(node)
|
727
|
+
listeners[:on_interpolated_match_last_line_node_enter]&.each { |listener| listener.on_interpolated_match_last_line_node_enter(node) }
|
728
|
+
super
|
729
|
+
listeners[:on_interpolated_match_last_line_node_leave]&.each { |listener| listener.on_interpolated_match_last_line_node_leave(node) }
|
730
|
+
end
|
731
|
+
|
732
|
+
# Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue
|
733
|
+
# walking the tree.
|
734
|
+
def visit_interpolated_regular_expression_node(node)
|
735
|
+
listeners[:on_interpolated_regular_expression_node_enter]&.each { |listener| listener.on_interpolated_regular_expression_node_enter(node) }
|
736
|
+
super
|
737
|
+
listeners[:on_interpolated_regular_expression_node_leave]&.each { |listener| listener.on_interpolated_regular_expression_node_leave(node) }
|
738
|
+
end
|
739
|
+
|
740
|
+
# Dispatch enter and leave events for InterpolatedStringNode nodes and continue
|
741
|
+
# walking the tree.
|
742
|
+
def visit_interpolated_string_node(node)
|
743
|
+
listeners[:on_interpolated_string_node_enter]&.each { |listener| listener.on_interpolated_string_node_enter(node) }
|
744
|
+
super
|
745
|
+
listeners[:on_interpolated_string_node_leave]&.each { |listener| listener.on_interpolated_string_node_leave(node) }
|
746
|
+
end
|
747
|
+
|
748
|
+
# Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue
|
749
|
+
# walking the tree.
|
750
|
+
def visit_interpolated_symbol_node(node)
|
751
|
+
listeners[:on_interpolated_symbol_node_enter]&.each { |listener| listener.on_interpolated_symbol_node_enter(node) }
|
752
|
+
super
|
753
|
+
listeners[:on_interpolated_symbol_node_leave]&.each { |listener| listener.on_interpolated_symbol_node_leave(node) }
|
754
|
+
end
|
755
|
+
|
756
|
+
# Dispatch enter and leave events for InterpolatedXStringNode nodes and continue
|
757
|
+
# walking the tree.
|
758
|
+
def visit_interpolated_x_string_node(node)
|
759
|
+
listeners[:on_interpolated_x_string_node_enter]&.each { |listener| listener.on_interpolated_x_string_node_enter(node) }
|
760
|
+
super
|
761
|
+
listeners[:on_interpolated_x_string_node_leave]&.each { |listener| listener.on_interpolated_x_string_node_leave(node) }
|
762
|
+
end
|
763
|
+
|
764
|
+
# Dispatch enter and leave events for KeywordHashNode nodes and continue
|
765
|
+
# walking the tree.
|
766
|
+
def visit_keyword_hash_node(node)
|
767
|
+
listeners[:on_keyword_hash_node_enter]&.each { |listener| listener.on_keyword_hash_node_enter(node) }
|
768
|
+
super
|
769
|
+
listeners[:on_keyword_hash_node_leave]&.each { |listener| listener.on_keyword_hash_node_leave(node) }
|
770
|
+
end
|
771
|
+
|
772
|
+
# Dispatch enter and leave events for KeywordRestParameterNode nodes and continue
|
773
|
+
# walking the tree.
|
774
|
+
def visit_keyword_rest_parameter_node(node)
|
775
|
+
listeners[:on_keyword_rest_parameter_node_enter]&.each { |listener| listener.on_keyword_rest_parameter_node_enter(node) }
|
776
|
+
super
|
777
|
+
listeners[:on_keyword_rest_parameter_node_leave]&.each { |listener| listener.on_keyword_rest_parameter_node_leave(node) }
|
778
|
+
end
|
779
|
+
|
780
|
+
# Dispatch enter and leave events for LambdaNode nodes and continue
|
781
|
+
# walking the tree.
|
782
|
+
def visit_lambda_node(node)
|
783
|
+
listeners[:on_lambda_node_enter]&.each { |listener| listener.on_lambda_node_enter(node) }
|
784
|
+
super
|
785
|
+
listeners[:on_lambda_node_leave]&.each { |listener| listener.on_lambda_node_leave(node) }
|
786
|
+
end
|
787
|
+
|
788
|
+
# Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue
|
789
|
+
# walking the tree.
|
790
|
+
def visit_local_variable_and_write_node(node)
|
791
|
+
listeners[:on_local_variable_and_write_node_enter]&.each { |listener| listener.on_local_variable_and_write_node_enter(node) }
|
792
|
+
super
|
793
|
+
listeners[:on_local_variable_and_write_node_leave]&.each { |listener| listener.on_local_variable_and_write_node_leave(node) }
|
794
|
+
end
|
795
|
+
|
796
|
+
# Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue
|
797
|
+
# walking the tree.
|
798
|
+
def visit_local_variable_operator_write_node(node)
|
799
|
+
listeners[:on_local_variable_operator_write_node_enter]&.each { |listener| listener.on_local_variable_operator_write_node_enter(node) }
|
800
|
+
super
|
801
|
+
listeners[:on_local_variable_operator_write_node_leave]&.each { |listener| listener.on_local_variable_operator_write_node_leave(node) }
|
802
|
+
end
|
803
|
+
|
804
|
+
# Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue
|
805
|
+
# walking the tree.
|
806
|
+
def visit_local_variable_or_write_node(node)
|
807
|
+
listeners[:on_local_variable_or_write_node_enter]&.each { |listener| listener.on_local_variable_or_write_node_enter(node) }
|
808
|
+
super
|
809
|
+
listeners[:on_local_variable_or_write_node_leave]&.each { |listener| listener.on_local_variable_or_write_node_leave(node) }
|
810
|
+
end
|
811
|
+
|
812
|
+
# Dispatch enter and leave events for LocalVariableReadNode nodes and continue
|
813
|
+
# walking the tree.
|
814
|
+
def visit_local_variable_read_node(node)
|
815
|
+
listeners[:on_local_variable_read_node_enter]&.each { |listener| listener.on_local_variable_read_node_enter(node) }
|
816
|
+
super
|
817
|
+
listeners[:on_local_variable_read_node_leave]&.each { |listener| listener.on_local_variable_read_node_leave(node) }
|
818
|
+
end
|
819
|
+
|
820
|
+
# Dispatch enter and leave events for LocalVariableTargetNode nodes and continue
|
821
|
+
# walking the tree.
|
822
|
+
def visit_local_variable_target_node(node)
|
823
|
+
listeners[:on_local_variable_target_node_enter]&.each { |listener| listener.on_local_variable_target_node_enter(node) }
|
824
|
+
super
|
825
|
+
listeners[:on_local_variable_target_node_leave]&.each { |listener| listener.on_local_variable_target_node_leave(node) }
|
826
|
+
end
|
827
|
+
|
828
|
+
# Dispatch enter and leave events for LocalVariableWriteNode nodes and continue
|
829
|
+
# walking the tree.
|
830
|
+
def visit_local_variable_write_node(node)
|
831
|
+
listeners[:on_local_variable_write_node_enter]&.each { |listener| listener.on_local_variable_write_node_enter(node) }
|
832
|
+
super
|
833
|
+
listeners[:on_local_variable_write_node_leave]&.each { |listener| listener.on_local_variable_write_node_leave(node) }
|
834
|
+
end
|
835
|
+
|
836
|
+
# Dispatch enter and leave events for MatchLastLineNode nodes and continue
|
837
|
+
# walking the tree.
|
838
|
+
def visit_match_last_line_node(node)
|
839
|
+
listeners[:on_match_last_line_node_enter]&.each { |listener| listener.on_match_last_line_node_enter(node) }
|
840
|
+
super
|
841
|
+
listeners[:on_match_last_line_node_leave]&.each { |listener| listener.on_match_last_line_node_leave(node) }
|
842
|
+
end
|
843
|
+
|
844
|
+
# Dispatch enter and leave events for MatchPredicateNode nodes and continue
|
845
|
+
# walking the tree.
|
846
|
+
def visit_match_predicate_node(node)
|
847
|
+
listeners[:on_match_predicate_node_enter]&.each { |listener| listener.on_match_predicate_node_enter(node) }
|
848
|
+
super
|
849
|
+
listeners[:on_match_predicate_node_leave]&.each { |listener| listener.on_match_predicate_node_leave(node) }
|
850
|
+
end
|
851
|
+
|
852
|
+
# Dispatch enter and leave events for MatchRequiredNode nodes and continue
|
853
|
+
# walking the tree.
|
854
|
+
def visit_match_required_node(node)
|
855
|
+
listeners[:on_match_required_node_enter]&.each { |listener| listener.on_match_required_node_enter(node) }
|
856
|
+
super
|
857
|
+
listeners[:on_match_required_node_leave]&.each { |listener| listener.on_match_required_node_leave(node) }
|
858
|
+
end
|
859
|
+
|
860
|
+
# Dispatch enter and leave events for MatchWriteNode nodes and continue
|
861
|
+
# walking the tree.
|
862
|
+
def visit_match_write_node(node)
|
863
|
+
listeners[:on_match_write_node_enter]&.each { |listener| listener.on_match_write_node_enter(node) }
|
864
|
+
super
|
865
|
+
listeners[:on_match_write_node_leave]&.each { |listener| listener.on_match_write_node_leave(node) }
|
866
|
+
end
|
867
|
+
|
868
|
+
# Dispatch enter and leave events for MissingNode nodes and continue
|
869
|
+
# walking the tree.
|
870
|
+
def visit_missing_node(node)
|
871
|
+
listeners[:on_missing_node_enter]&.each { |listener| listener.on_missing_node_enter(node) }
|
872
|
+
super
|
873
|
+
listeners[:on_missing_node_leave]&.each { |listener| listener.on_missing_node_leave(node) }
|
874
|
+
end
|
875
|
+
|
876
|
+
# Dispatch enter and leave events for ModuleNode nodes and continue
|
877
|
+
# walking the tree.
|
878
|
+
def visit_module_node(node)
|
879
|
+
listeners[:on_module_node_enter]&.each { |listener| listener.on_module_node_enter(node) }
|
880
|
+
super
|
881
|
+
listeners[:on_module_node_leave]&.each { |listener| listener.on_module_node_leave(node) }
|
882
|
+
end
|
883
|
+
|
884
|
+
# Dispatch enter and leave events for MultiTargetNode nodes and continue
|
885
|
+
# walking the tree.
|
886
|
+
def visit_multi_target_node(node)
|
887
|
+
listeners[:on_multi_target_node_enter]&.each { |listener| listener.on_multi_target_node_enter(node) }
|
888
|
+
super
|
889
|
+
listeners[:on_multi_target_node_leave]&.each { |listener| listener.on_multi_target_node_leave(node) }
|
890
|
+
end
|
891
|
+
|
892
|
+
# Dispatch enter and leave events for MultiWriteNode nodes and continue
|
893
|
+
# walking the tree.
|
894
|
+
def visit_multi_write_node(node)
|
895
|
+
listeners[:on_multi_write_node_enter]&.each { |listener| listener.on_multi_write_node_enter(node) }
|
896
|
+
super
|
897
|
+
listeners[:on_multi_write_node_leave]&.each { |listener| listener.on_multi_write_node_leave(node) }
|
898
|
+
end
|
899
|
+
|
900
|
+
# Dispatch enter and leave events for NextNode nodes and continue
|
901
|
+
# walking the tree.
|
902
|
+
def visit_next_node(node)
|
903
|
+
listeners[:on_next_node_enter]&.each { |listener| listener.on_next_node_enter(node) }
|
904
|
+
super
|
905
|
+
listeners[:on_next_node_leave]&.each { |listener| listener.on_next_node_leave(node) }
|
906
|
+
end
|
907
|
+
|
908
|
+
# Dispatch enter and leave events for NilNode nodes and continue
|
909
|
+
# walking the tree.
|
910
|
+
def visit_nil_node(node)
|
911
|
+
listeners[:on_nil_node_enter]&.each { |listener| listener.on_nil_node_enter(node) }
|
912
|
+
super
|
913
|
+
listeners[:on_nil_node_leave]&.each { |listener| listener.on_nil_node_leave(node) }
|
914
|
+
end
|
915
|
+
|
916
|
+
# Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue
|
917
|
+
# walking the tree.
|
918
|
+
def visit_no_keywords_parameter_node(node)
|
919
|
+
listeners[:on_no_keywords_parameter_node_enter]&.each { |listener| listener.on_no_keywords_parameter_node_enter(node) }
|
920
|
+
super
|
921
|
+
listeners[:on_no_keywords_parameter_node_leave]&.each { |listener| listener.on_no_keywords_parameter_node_leave(node) }
|
922
|
+
end
|
923
|
+
|
924
|
+
# Dispatch enter and leave events for NumberedParametersNode nodes and continue
|
925
|
+
# walking the tree.
|
926
|
+
def visit_numbered_parameters_node(node)
|
927
|
+
listeners[:on_numbered_parameters_node_enter]&.each { |listener| listener.on_numbered_parameters_node_enter(node) }
|
928
|
+
super
|
929
|
+
listeners[:on_numbered_parameters_node_leave]&.each { |listener| listener.on_numbered_parameters_node_leave(node) }
|
930
|
+
end
|
931
|
+
|
932
|
+
# Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue
|
933
|
+
# walking the tree.
|
934
|
+
def visit_numbered_reference_read_node(node)
|
935
|
+
listeners[:on_numbered_reference_read_node_enter]&.each { |listener| listener.on_numbered_reference_read_node_enter(node) }
|
936
|
+
super
|
937
|
+
listeners[:on_numbered_reference_read_node_leave]&.each { |listener| listener.on_numbered_reference_read_node_leave(node) }
|
938
|
+
end
|
939
|
+
|
940
|
+
# Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue
|
941
|
+
# walking the tree.
|
942
|
+
def visit_optional_keyword_parameter_node(node)
|
943
|
+
listeners[:on_optional_keyword_parameter_node_enter]&.each { |listener| listener.on_optional_keyword_parameter_node_enter(node) }
|
944
|
+
super
|
945
|
+
listeners[:on_optional_keyword_parameter_node_leave]&.each { |listener| listener.on_optional_keyword_parameter_node_leave(node) }
|
946
|
+
end
|
947
|
+
|
948
|
+
# Dispatch enter and leave events for OptionalParameterNode nodes and continue
|
949
|
+
# walking the tree.
|
950
|
+
def visit_optional_parameter_node(node)
|
951
|
+
listeners[:on_optional_parameter_node_enter]&.each { |listener| listener.on_optional_parameter_node_enter(node) }
|
952
|
+
super
|
953
|
+
listeners[:on_optional_parameter_node_leave]&.each { |listener| listener.on_optional_parameter_node_leave(node) }
|
954
|
+
end
|
955
|
+
|
956
|
+
# Dispatch enter and leave events for OrNode nodes and continue
|
957
|
+
# walking the tree.
|
958
|
+
def visit_or_node(node)
|
959
|
+
listeners[:on_or_node_enter]&.each { |listener| listener.on_or_node_enter(node) }
|
960
|
+
super
|
961
|
+
listeners[:on_or_node_leave]&.each { |listener| listener.on_or_node_leave(node) }
|
962
|
+
end
|
963
|
+
|
964
|
+
# Dispatch enter and leave events for ParametersNode nodes and continue
|
965
|
+
# walking the tree.
|
966
|
+
def visit_parameters_node(node)
|
967
|
+
listeners[:on_parameters_node_enter]&.each { |listener| listener.on_parameters_node_enter(node) }
|
968
|
+
super
|
969
|
+
listeners[:on_parameters_node_leave]&.each { |listener| listener.on_parameters_node_leave(node) }
|
970
|
+
end
|
971
|
+
|
972
|
+
# Dispatch enter and leave events for ParenthesesNode nodes and continue
|
973
|
+
# walking the tree.
|
974
|
+
def visit_parentheses_node(node)
|
975
|
+
listeners[:on_parentheses_node_enter]&.each { |listener| listener.on_parentheses_node_enter(node) }
|
976
|
+
super
|
977
|
+
listeners[:on_parentheses_node_leave]&.each { |listener| listener.on_parentheses_node_leave(node) }
|
978
|
+
end
|
979
|
+
|
980
|
+
# Dispatch enter and leave events for PinnedExpressionNode nodes and continue
|
981
|
+
# walking the tree.
|
982
|
+
def visit_pinned_expression_node(node)
|
983
|
+
listeners[:on_pinned_expression_node_enter]&.each { |listener| listener.on_pinned_expression_node_enter(node) }
|
984
|
+
super
|
985
|
+
listeners[:on_pinned_expression_node_leave]&.each { |listener| listener.on_pinned_expression_node_leave(node) }
|
986
|
+
end
|
987
|
+
|
988
|
+
# Dispatch enter and leave events for PinnedVariableNode nodes and continue
|
989
|
+
# walking the tree.
|
990
|
+
def visit_pinned_variable_node(node)
|
991
|
+
listeners[:on_pinned_variable_node_enter]&.each { |listener| listener.on_pinned_variable_node_enter(node) }
|
992
|
+
super
|
993
|
+
listeners[:on_pinned_variable_node_leave]&.each { |listener| listener.on_pinned_variable_node_leave(node) }
|
994
|
+
end
|
995
|
+
|
996
|
+
# Dispatch enter and leave events for PostExecutionNode nodes and continue
|
997
|
+
# walking the tree.
|
998
|
+
def visit_post_execution_node(node)
|
999
|
+
listeners[:on_post_execution_node_enter]&.each { |listener| listener.on_post_execution_node_enter(node) }
|
1000
|
+
super
|
1001
|
+
listeners[:on_post_execution_node_leave]&.each { |listener| listener.on_post_execution_node_leave(node) }
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
# Dispatch enter and leave events for PreExecutionNode nodes and continue
|
1005
|
+
# walking the tree.
|
1006
|
+
def visit_pre_execution_node(node)
|
1007
|
+
listeners[:on_pre_execution_node_enter]&.each { |listener| listener.on_pre_execution_node_enter(node) }
|
1008
|
+
super
|
1009
|
+
listeners[:on_pre_execution_node_leave]&.each { |listener| listener.on_pre_execution_node_leave(node) }
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# Dispatch enter and leave events for ProgramNode nodes and continue
|
1013
|
+
# walking the tree.
|
1014
|
+
def visit_program_node(node)
|
1015
|
+
listeners[:on_program_node_enter]&.each { |listener| listener.on_program_node_enter(node) }
|
1016
|
+
super
|
1017
|
+
listeners[:on_program_node_leave]&.each { |listener| listener.on_program_node_leave(node) }
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
# Dispatch enter and leave events for RangeNode nodes and continue
|
1021
|
+
# walking the tree.
|
1022
|
+
def visit_range_node(node)
|
1023
|
+
listeners[:on_range_node_enter]&.each { |listener| listener.on_range_node_enter(node) }
|
1024
|
+
super
|
1025
|
+
listeners[:on_range_node_leave]&.each { |listener| listener.on_range_node_leave(node) }
|
1026
|
+
end
|
1027
|
+
|
1028
|
+
# Dispatch enter and leave events for RationalNode nodes and continue
|
1029
|
+
# walking the tree.
|
1030
|
+
def visit_rational_node(node)
|
1031
|
+
listeners[:on_rational_node_enter]&.each { |listener| listener.on_rational_node_enter(node) }
|
1032
|
+
super
|
1033
|
+
listeners[:on_rational_node_leave]&.each { |listener| listener.on_rational_node_leave(node) }
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
# Dispatch enter and leave events for RedoNode nodes and continue
|
1037
|
+
# walking the tree.
|
1038
|
+
def visit_redo_node(node)
|
1039
|
+
listeners[:on_redo_node_enter]&.each { |listener| listener.on_redo_node_enter(node) }
|
1040
|
+
super
|
1041
|
+
listeners[:on_redo_node_leave]&.each { |listener| listener.on_redo_node_leave(node) }
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
# Dispatch enter and leave events for RegularExpressionNode nodes and continue
|
1045
|
+
# walking the tree.
|
1046
|
+
def visit_regular_expression_node(node)
|
1047
|
+
listeners[:on_regular_expression_node_enter]&.each { |listener| listener.on_regular_expression_node_enter(node) }
|
1048
|
+
super
|
1049
|
+
listeners[:on_regular_expression_node_leave]&.each { |listener| listener.on_regular_expression_node_leave(node) }
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue
|
1053
|
+
# walking the tree.
|
1054
|
+
def visit_required_keyword_parameter_node(node)
|
1055
|
+
listeners[:on_required_keyword_parameter_node_enter]&.each { |listener| listener.on_required_keyword_parameter_node_enter(node) }
|
1056
|
+
super
|
1057
|
+
listeners[:on_required_keyword_parameter_node_leave]&.each { |listener| listener.on_required_keyword_parameter_node_leave(node) }
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
# Dispatch enter and leave events for RequiredParameterNode nodes and continue
|
1061
|
+
# walking the tree.
|
1062
|
+
def visit_required_parameter_node(node)
|
1063
|
+
listeners[:on_required_parameter_node_enter]&.each { |listener| listener.on_required_parameter_node_enter(node) }
|
1064
|
+
super
|
1065
|
+
listeners[:on_required_parameter_node_leave]&.each { |listener| listener.on_required_parameter_node_leave(node) }
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
# Dispatch enter and leave events for RescueModifierNode nodes and continue
|
1069
|
+
# walking the tree.
|
1070
|
+
def visit_rescue_modifier_node(node)
|
1071
|
+
listeners[:on_rescue_modifier_node_enter]&.each { |listener| listener.on_rescue_modifier_node_enter(node) }
|
1072
|
+
super
|
1073
|
+
listeners[:on_rescue_modifier_node_leave]&.each { |listener| listener.on_rescue_modifier_node_leave(node) }
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# Dispatch enter and leave events for RescueNode nodes and continue
|
1077
|
+
# walking the tree.
|
1078
|
+
def visit_rescue_node(node)
|
1079
|
+
listeners[:on_rescue_node_enter]&.each { |listener| listener.on_rescue_node_enter(node) }
|
1080
|
+
super
|
1081
|
+
listeners[:on_rescue_node_leave]&.each { |listener| listener.on_rescue_node_leave(node) }
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# Dispatch enter and leave events for RestParameterNode nodes and continue
|
1085
|
+
# walking the tree.
|
1086
|
+
def visit_rest_parameter_node(node)
|
1087
|
+
listeners[:on_rest_parameter_node_enter]&.each { |listener| listener.on_rest_parameter_node_enter(node) }
|
1088
|
+
super
|
1089
|
+
listeners[:on_rest_parameter_node_leave]&.each { |listener| listener.on_rest_parameter_node_leave(node) }
|
1090
|
+
end
|
1091
|
+
|
1092
|
+
# Dispatch enter and leave events for RetryNode nodes and continue
|
1093
|
+
# walking the tree.
|
1094
|
+
def visit_retry_node(node)
|
1095
|
+
listeners[:on_retry_node_enter]&.each { |listener| listener.on_retry_node_enter(node) }
|
1096
|
+
super
|
1097
|
+
listeners[:on_retry_node_leave]&.each { |listener| listener.on_retry_node_leave(node) }
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
# Dispatch enter and leave events for ReturnNode nodes and continue
|
1101
|
+
# walking the tree.
|
1102
|
+
def visit_return_node(node)
|
1103
|
+
listeners[:on_return_node_enter]&.each { |listener| listener.on_return_node_enter(node) }
|
1104
|
+
super
|
1105
|
+
listeners[:on_return_node_leave]&.each { |listener| listener.on_return_node_leave(node) }
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
# Dispatch enter and leave events for SelfNode nodes and continue
|
1109
|
+
# walking the tree.
|
1110
|
+
def visit_self_node(node)
|
1111
|
+
listeners[:on_self_node_enter]&.each { |listener| listener.on_self_node_enter(node) }
|
1112
|
+
super
|
1113
|
+
listeners[:on_self_node_leave]&.each { |listener| listener.on_self_node_leave(node) }
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
# Dispatch enter and leave events for SingletonClassNode nodes and continue
|
1117
|
+
# walking the tree.
|
1118
|
+
def visit_singleton_class_node(node)
|
1119
|
+
listeners[:on_singleton_class_node_enter]&.each { |listener| listener.on_singleton_class_node_enter(node) }
|
1120
|
+
super
|
1121
|
+
listeners[:on_singleton_class_node_leave]&.each { |listener| listener.on_singleton_class_node_leave(node) }
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# Dispatch enter and leave events for SourceEncodingNode nodes and continue
|
1125
|
+
# walking the tree.
|
1126
|
+
def visit_source_encoding_node(node)
|
1127
|
+
listeners[:on_source_encoding_node_enter]&.each { |listener| listener.on_source_encoding_node_enter(node) }
|
1128
|
+
super
|
1129
|
+
listeners[:on_source_encoding_node_leave]&.each { |listener| listener.on_source_encoding_node_leave(node) }
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# Dispatch enter and leave events for SourceFileNode nodes and continue
|
1133
|
+
# walking the tree.
|
1134
|
+
def visit_source_file_node(node)
|
1135
|
+
listeners[:on_source_file_node_enter]&.each { |listener| listener.on_source_file_node_enter(node) }
|
1136
|
+
super
|
1137
|
+
listeners[:on_source_file_node_leave]&.each { |listener| listener.on_source_file_node_leave(node) }
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
# Dispatch enter and leave events for SourceLineNode nodes and continue
|
1141
|
+
# walking the tree.
|
1142
|
+
def visit_source_line_node(node)
|
1143
|
+
listeners[:on_source_line_node_enter]&.each { |listener| listener.on_source_line_node_enter(node) }
|
1144
|
+
super
|
1145
|
+
listeners[:on_source_line_node_leave]&.each { |listener| listener.on_source_line_node_leave(node) }
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# Dispatch enter and leave events for SplatNode nodes and continue
|
1149
|
+
# walking the tree.
|
1150
|
+
def visit_splat_node(node)
|
1151
|
+
listeners[:on_splat_node_enter]&.each { |listener| listener.on_splat_node_enter(node) }
|
1152
|
+
super
|
1153
|
+
listeners[:on_splat_node_leave]&.each { |listener| listener.on_splat_node_leave(node) }
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
# Dispatch enter and leave events for StatementsNode nodes and continue
|
1157
|
+
# walking the tree.
|
1158
|
+
def visit_statements_node(node)
|
1159
|
+
listeners[:on_statements_node_enter]&.each { |listener| listener.on_statements_node_enter(node) }
|
1160
|
+
super
|
1161
|
+
listeners[:on_statements_node_leave]&.each { |listener| listener.on_statements_node_leave(node) }
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Dispatch enter and leave events for StringNode nodes and continue
|
1165
|
+
# walking the tree.
|
1166
|
+
def visit_string_node(node)
|
1167
|
+
listeners[:on_string_node_enter]&.each { |listener| listener.on_string_node_enter(node) }
|
1168
|
+
super
|
1169
|
+
listeners[:on_string_node_leave]&.each { |listener| listener.on_string_node_leave(node) }
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
# Dispatch enter and leave events for SuperNode nodes and continue
|
1173
|
+
# walking the tree.
|
1174
|
+
def visit_super_node(node)
|
1175
|
+
listeners[:on_super_node_enter]&.each { |listener| listener.on_super_node_enter(node) }
|
1176
|
+
super
|
1177
|
+
listeners[:on_super_node_leave]&.each { |listener| listener.on_super_node_leave(node) }
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
# Dispatch enter and leave events for SymbolNode nodes and continue
|
1181
|
+
# walking the tree.
|
1182
|
+
def visit_symbol_node(node)
|
1183
|
+
listeners[:on_symbol_node_enter]&.each { |listener| listener.on_symbol_node_enter(node) }
|
1184
|
+
super
|
1185
|
+
listeners[:on_symbol_node_leave]&.each { |listener| listener.on_symbol_node_leave(node) }
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
# Dispatch enter and leave events for TrueNode nodes and continue
|
1189
|
+
# walking the tree.
|
1190
|
+
def visit_true_node(node)
|
1191
|
+
listeners[:on_true_node_enter]&.each { |listener| listener.on_true_node_enter(node) }
|
1192
|
+
super
|
1193
|
+
listeners[:on_true_node_leave]&.each { |listener| listener.on_true_node_leave(node) }
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# Dispatch enter and leave events for UndefNode nodes and continue
|
1197
|
+
# walking the tree.
|
1198
|
+
def visit_undef_node(node)
|
1199
|
+
listeners[:on_undef_node_enter]&.each { |listener| listener.on_undef_node_enter(node) }
|
1200
|
+
super
|
1201
|
+
listeners[:on_undef_node_leave]&.each { |listener| listener.on_undef_node_leave(node) }
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Dispatch enter and leave events for UnlessNode nodes and continue
|
1205
|
+
# walking the tree.
|
1206
|
+
def visit_unless_node(node)
|
1207
|
+
listeners[:on_unless_node_enter]&.each { |listener| listener.on_unless_node_enter(node) }
|
1208
|
+
super
|
1209
|
+
listeners[:on_unless_node_leave]&.each { |listener| listener.on_unless_node_leave(node) }
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# Dispatch enter and leave events for UntilNode nodes and continue
|
1213
|
+
# walking the tree.
|
1214
|
+
def visit_until_node(node)
|
1215
|
+
listeners[:on_until_node_enter]&.each { |listener| listener.on_until_node_enter(node) }
|
1216
|
+
super
|
1217
|
+
listeners[:on_until_node_leave]&.each { |listener| listener.on_until_node_leave(node) }
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
# Dispatch enter and leave events for WhenNode nodes and continue
|
1221
|
+
# walking the tree.
|
1222
|
+
def visit_when_node(node)
|
1223
|
+
listeners[:on_when_node_enter]&.each { |listener| listener.on_when_node_enter(node) }
|
1224
|
+
super
|
1225
|
+
listeners[:on_when_node_leave]&.each { |listener| listener.on_when_node_leave(node) }
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
# Dispatch enter and leave events for WhileNode nodes and continue
|
1229
|
+
# walking the tree.
|
1230
|
+
def visit_while_node(node)
|
1231
|
+
listeners[:on_while_node_enter]&.each { |listener| listener.on_while_node_enter(node) }
|
1232
|
+
super
|
1233
|
+
listeners[:on_while_node_leave]&.each { |listener| listener.on_while_node_leave(node) }
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
# Dispatch enter and leave events for XStringNode nodes and continue
|
1237
|
+
# walking the tree.
|
1238
|
+
def visit_x_string_node(node)
|
1239
|
+
listeners[:on_x_string_node_enter]&.each { |listener| listener.on_x_string_node_enter(node) }
|
1240
|
+
super
|
1241
|
+
listeners[:on_x_string_node_leave]&.each { |listener| listener.on_x_string_node_leave(node) }
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# Dispatch enter and leave events for YieldNode nodes and continue
|
1245
|
+
# walking the tree.
|
1246
|
+
def visit_yield_node(node)
|
1247
|
+
listeners[:on_yield_node_enter]&.each { |listener| listener.on_yield_node_enter(node) }
|
1248
|
+
super
|
1249
|
+
listeners[:on_yield_node_leave]&.each { |listener| listener.on_yield_node_leave(node) }
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
class DispatchOnce < Visitor # :nodoc:
|
1253
|
+
attr_reader :listeners
|
1254
|
+
|
1255
|
+
def initialize(listeners)
|
1256
|
+
@listeners = listeners
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
# Dispatch enter and leave events for AliasGlobalVariableNode nodes.
|
1260
|
+
def visit_alias_global_variable_node(node)
|
1261
|
+
listeners[:on_alias_global_variable_node_enter]&.each { |listener| listener.on_alias_global_variable_node_enter(node) }
|
1262
|
+
listeners[:on_alias_global_variable_node_leave]&.each { |listener| listener.on_alias_global_variable_node_leave(node) }
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
# Dispatch enter and leave events for AliasMethodNode nodes.
|
1266
|
+
def visit_alias_method_node(node)
|
1267
|
+
listeners[:on_alias_method_node_enter]&.each { |listener| listener.on_alias_method_node_enter(node) }
|
1268
|
+
listeners[:on_alias_method_node_leave]&.each { |listener| listener.on_alias_method_node_leave(node) }
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
# Dispatch enter and leave events for AlternationPatternNode nodes.
|
1272
|
+
def visit_alternation_pattern_node(node)
|
1273
|
+
listeners[:on_alternation_pattern_node_enter]&.each { |listener| listener.on_alternation_pattern_node_enter(node) }
|
1274
|
+
listeners[:on_alternation_pattern_node_leave]&.each { |listener| listener.on_alternation_pattern_node_leave(node) }
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Dispatch enter and leave events for AndNode nodes.
|
1278
|
+
def visit_and_node(node)
|
1279
|
+
listeners[:on_and_node_enter]&.each { |listener| listener.on_and_node_enter(node) }
|
1280
|
+
listeners[:on_and_node_leave]&.each { |listener| listener.on_and_node_leave(node) }
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# Dispatch enter and leave events for ArgumentsNode nodes.
|
1284
|
+
def visit_arguments_node(node)
|
1285
|
+
listeners[:on_arguments_node_enter]&.each { |listener| listener.on_arguments_node_enter(node) }
|
1286
|
+
listeners[:on_arguments_node_leave]&.each { |listener| listener.on_arguments_node_leave(node) }
|
1287
|
+
end
|
1288
|
+
|
1289
|
+
# Dispatch enter and leave events for ArrayNode nodes.
|
1290
|
+
def visit_array_node(node)
|
1291
|
+
listeners[:on_array_node_enter]&.each { |listener| listener.on_array_node_enter(node) }
|
1292
|
+
listeners[:on_array_node_leave]&.each { |listener| listener.on_array_node_leave(node) }
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# Dispatch enter and leave events for ArrayPatternNode nodes.
|
1296
|
+
def visit_array_pattern_node(node)
|
1297
|
+
listeners[:on_array_pattern_node_enter]&.each { |listener| listener.on_array_pattern_node_enter(node) }
|
1298
|
+
listeners[:on_array_pattern_node_leave]&.each { |listener| listener.on_array_pattern_node_leave(node) }
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
# Dispatch enter and leave events for AssocNode nodes.
|
1302
|
+
def visit_assoc_node(node)
|
1303
|
+
listeners[:on_assoc_node_enter]&.each { |listener| listener.on_assoc_node_enter(node) }
|
1304
|
+
listeners[:on_assoc_node_leave]&.each { |listener| listener.on_assoc_node_leave(node) }
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# Dispatch enter and leave events for AssocSplatNode nodes.
|
1308
|
+
def visit_assoc_splat_node(node)
|
1309
|
+
listeners[:on_assoc_splat_node_enter]&.each { |listener| listener.on_assoc_splat_node_enter(node) }
|
1310
|
+
listeners[:on_assoc_splat_node_leave]&.each { |listener| listener.on_assoc_splat_node_leave(node) }
|
1311
|
+
end
|
1312
|
+
|
1313
|
+
# Dispatch enter and leave events for BackReferenceReadNode nodes.
|
1314
|
+
def visit_back_reference_read_node(node)
|
1315
|
+
listeners[:on_back_reference_read_node_enter]&.each { |listener| listener.on_back_reference_read_node_enter(node) }
|
1316
|
+
listeners[:on_back_reference_read_node_leave]&.each { |listener| listener.on_back_reference_read_node_leave(node) }
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
# Dispatch enter and leave events for BeginNode nodes.
|
1320
|
+
def visit_begin_node(node)
|
1321
|
+
listeners[:on_begin_node_enter]&.each { |listener| listener.on_begin_node_enter(node) }
|
1322
|
+
listeners[:on_begin_node_leave]&.each { |listener| listener.on_begin_node_leave(node) }
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
# Dispatch enter and leave events for BlockArgumentNode nodes.
|
1326
|
+
def visit_block_argument_node(node)
|
1327
|
+
listeners[:on_block_argument_node_enter]&.each { |listener| listener.on_block_argument_node_enter(node) }
|
1328
|
+
listeners[:on_block_argument_node_leave]&.each { |listener| listener.on_block_argument_node_leave(node) }
|
1329
|
+
end
|
1330
|
+
|
1331
|
+
# Dispatch enter and leave events for BlockLocalVariableNode nodes.
|
1332
|
+
def visit_block_local_variable_node(node)
|
1333
|
+
listeners[:on_block_local_variable_node_enter]&.each { |listener| listener.on_block_local_variable_node_enter(node) }
|
1334
|
+
listeners[:on_block_local_variable_node_leave]&.each { |listener| listener.on_block_local_variable_node_leave(node) }
|
1335
|
+
end
|
1336
|
+
|
1337
|
+
# Dispatch enter and leave events for BlockNode nodes.
|
1338
|
+
def visit_block_node(node)
|
1339
|
+
listeners[:on_block_node_enter]&.each { |listener| listener.on_block_node_enter(node) }
|
1340
|
+
listeners[:on_block_node_leave]&.each { |listener| listener.on_block_node_leave(node) }
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
# Dispatch enter and leave events for BlockParameterNode nodes.
|
1344
|
+
def visit_block_parameter_node(node)
|
1345
|
+
listeners[:on_block_parameter_node_enter]&.each { |listener| listener.on_block_parameter_node_enter(node) }
|
1346
|
+
listeners[:on_block_parameter_node_leave]&.each { |listener| listener.on_block_parameter_node_leave(node) }
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
# Dispatch enter and leave events for BlockParametersNode nodes.
|
1350
|
+
def visit_block_parameters_node(node)
|
1351
|
+
listeners[:on_block_parameters_node_enter]&.each { |listener| listener.on_block_parameters_node_enter(node) }
|
1352
|
+
listeners[:on_block_parameters_node_leave]&.each { |listener| listener.on_block_parameters_node_leave(node) }
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
# Dispatch enter and leave events for BreakNode nodes.
|
1356
|
+
def visit_break_node(node)
|
1357
|
+
listeners[:on_break_node_enter]&.each { |listener| listener.on_break_node_enter(node) }
|
1358
|
+
listeners[:on_break_node_leave]&.each { |listener| listener.on_break_node_leave(node) }
|
1359
|
+
end
|
1360
|
+
|
1361
|
+
# Dispatch enter and leave events for CallAndWriteNode nodes.
|
1362
|
+
def visit_call_and_write_node(node)
|
1363
|
+
listeners[:on_call_and_write_node_enter]&.each { |listener| listener.on_call_and_write_node_enter(node) }
|
1364
|
+
listeners[:on_call_and_write_node_leave]&.each { |listener| listener.on_call_and_write_node_leave(node) }
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
# Dispatch enter and leave events for CallNode nodes.
|
1368
|
+
def visit_call_node(node)
|
1369
|
+
listeners[:on_call_node_enter]&.each { |listener| listener.on_call_node_enter(node) }
|
1370
|
+
listeners[:on_call_node_leave]&.each { |listener| listener.on_call_node_leave(node) }
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
# Dispatch enter and leave events for CallOperatorWriteNode nodes.
|
1374
|
+
def visit_call_operator_write_node(node)
|
1375
|
+
listeners[:on_call_operator_write_node_enter]&.each { |listener| listener.on_call_operator_write_node_enter(node) }
|
1376
|
+
listeners[:on_call_operator_write_node_leave]&.each { |listener| listener.on_call_operator_write_node_leave(node) }
|
1377
|
+
end
|
1378
|
+
|
1379
|
+
# Dispatch enter and leave events for CallOrWriteNode nodes.
|
1380
|
+
def visit_call_or_write_node(node)
|
1381
|
+
listeners[:on_call_or_write_node_enter]&.each { |listener| listener.on_call_or_write_node_enter(node) }
|
1382
|
+
listeners[:on_call_or_write_node_leave]&.each { |listener| listener.on_call_or_write_node_leave(node) }
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# Dispatch enter and leave events for CallTargetNode nodes.
|
1386
|
+
def visit_call_target_node(node)
|
1387
|
+
listeners[:on_call_target_node_enter]&.each { |listener| listener.on_call_target_node_enter(node) }
|
1388
|
+
listeners[:on_call_target_node_leave]&.each { |listener| listener.on_call_target_node_leave(node) }
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
# Dispatch enter and leave events for CapturePatternNode nodes.
|
1392
|
+
def visit_capture_pattern_node(node)
|
1393
|
+
listeners[:on_capture_pattern_node_enter]&.each { |listener| listener.on_capture_pattern_node_enter(node) }
|
1394
|
+
listeners[:on_capture_pattern_node_leave]&.each { |listener| listener.on_capture_pattern_node_leave(node) }
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
# Dispatch enter and leave events for CaseMatchNode nodes.
|
1398
|
+
def visit_case_match_node(node)
|
1399
|
+
listeners[:on_case_match_node_enter]&.each { |listener| listener.on_case_match_node_enter(node) }
|
1400
|
+
listeners[:on_case_match_node_leave]&.each { |listener| listener.on_case_match_node_leave(node) }
|
1401
|
+
end
|
1402
|
+
|
1403
|
+
# Dispatch enter and leave events for CaseNode nodes.
|
1404
|
+
def visit_case_node(node)
|
1405
|
+
listeners[:on_case_node_enter]&.each { |listener| listener.on_case_node_enter(node) }
|
1406
|
+
listeners[:on_case_node_leave]&.each { |listener| listener.on_case_node_leave(node) }
|
1407
|
+
end
|
1408
|
+
|
1409
|
+
# Dispatch enter and leave events for ClassNode nodes.
|
1410
|
+
def visit_class_node(node)
|
1411
|
+
listeners[:on_class_node_enter]&.each { |listener| listener.on_class_node_enter(node) }
|
1412
|
+
listeners[:on_class_node_leave]&.each { |listener| listener.on_class_node_leave(node) }
|
1413
|
+
end
|
1414
|
+
|
1415
|
+
# Dispatch enter and leave events for ClassVariableAndWriteNode nodes.
|
1416
|
+
def visit_class_variable_and_write_node(node)
|
1417
|
+
listeners[:on_class_variable_and_write_node_enter]&.each { |listener| listener.on_class_variable_and_write_node_enter(node) }
|
1418
|
+
listeners[:on_class_variable_and_write_node_leave]&.each { |listener| listener.on_class_variable_and_write_node_leave(node) }
|
1419
|
+
end
|
1420
|
+
|
1421
|
+
# Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes.
|
1422
|
+
def visit_class_variable_operator_write_node(node)
|
1423
|
+
listeners[:on_class_variable_operator_write_node_enter]&.each { |listener| listener.on_class_variable_operator_write_node_enter(node) }
|
1424
|
+
listeners[:on_class_variable_operator_write_node_leave]&.each { |listener| listener.on_class_variable_operator_write_node_leave(node) }
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
# Dispatch enter and leave events for ClassVariableOrWriteNode nodes.
|
1428
|
+
def visit_class_variable_or_write_node(node)
|
1429
|
+
listeners[:on_class_variable_or_write_node_enter]&.each { |listener| listener.on_class_variable_or_write_node_enter(node) }
|
1430
|
+
listeners[:on_class_variable_or_write_node_leave]&.each { |listener| listener.on_class_variable_or_write_node_leave(node) }
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
# Dispatch enter and leave events for ClassVariableReadNode nodes.
|
1434
|
+
def visit_class_variable_read_node(node)
|
1435
|
+
listeners[:on_class_variable_read_node_enter]&.each { |listener| listener.on_class_variable_read_node_enter(node) }
|
1436
|
+
listeners[:on_class_variable_read_node_leave]&.each { |listener| listener.on_class_variable_read_node_leave(node) }
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
# Dispatch enter and leave events for ClassVariableTargetNode nodes.
|
1440
|
+
def visit_class_variable_target_node(node)
|
1441
|
+
listeners[:on_class_variable_target_node_enter]&.each { |listener| listener.on_class_variable_target_node_enter(node) }
|
1442
|
+
listeners[:on_class_variable_target_node_leave]&.each { |listener| listener.on_class_variable_target_node_leave(node) }
|
1443
|
+
end
|
1444
|
+
|
1445
|
+
# Dispatch enter and leave events for ClassVariableWriteNode nodes.
|
1446
|
+
def visit_class_variable_write_node(node)
|
1447
|
+
listeners[:on_class_variable_write_node_enter]&.each { |listener| listener.on_class_variable_write_node_enter(node) }
|
1448
|
+
listeners[:on_class_variable_write_node_leave]&.each { |listener| listener.on_class_variable_write_node_leave(node) }
|
1449
|
+
end
|
1450
|
+
|
1451
|
+
# Dispatch enter and leave events for ConstantAndWriteNode nodes.
|
1452
|
+
def visit_constant_and_write_node(node)
|
1453
|
+
listeners[:on_constant_and_write_node_enter]&.each { |listener| listener.on_constant_and_write_node_enter(node) }
|
1454
|
+
listeners[:on_constant_and_write_node_leave]&.each { |listener| listener.on_constant_and_write_node_leave(node) }
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
# Dispatch enter and leave events for ConstantOperatorWriteNode nodes.
|
1458
|
+
def visit_constant_operator_write_node(node)
|
1459
|
+
listeners[:on_constant_operator_write_node_enter]&.each { |listener| listener.on_constant_operator_write_node_enter(node) }
|
1460
|
+
listeners[:on_constant_operator_write_node_leave]&.each { |listener| listener.on_constant_operator_write_node_leave(node) }
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
# Dispatch enter and leave events for ConstantOrWriteNode nodes.
|
1464
|
+
def visit_constant_or_write_node(node)
|
1465
|
+
listeners[:on_constant_or_write_node_enter]&.each { |listener| listener.on_constant_or_write_node_enter(node) }
|
1466
|
+
listeners[:on_constant_or_write_node_leave]&.each { |listener| listener.on_constant_or_write_node_leave(node) }
|
1467
|
+
end
|
1468
|
+
|
1469
|
+
# Dispatch enter and leave events for ConstantPathAndWriteNode nodes.
|
1470
|
+
def visit_constant_path_and_write_node(node)
|
1471
|
+
listeners[:on_constant_path_and_write_node_enter]&.each { |listener| listener.on_constant_path_and_write_node_enter(node) }
|
1472
|
+
listeners[:on_constant_path_and_write_node_leave]&.each { |listener| listener.on_constant_path_and_write_node_leave(node) }
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
# Dispatch enter and leave events for ConstantPathNode nodes.
|
1476
|
+
def visit_constant_path_node(node)
|
1477
|
+
listeners[:on_constant_path_node_enter]&.each { |listener| listener.on_constant_path_node_enter(node) }
|
1478
|
+
listeners[:on_constant_path_node_leave]&.each { |listener| listener.on_constant_path_node_leave(node) }
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes.
|
1482
|
+
def visit_constant_path_operator_write_node(node)
|
1483
|
+
listeners[:on_constant_path_operator_write_node_enter]&.each { |listener| listener.on_constant_path_operator_write_node_enter(node) }
|
1484
|
+
listeners[:on_constant_path_operator_write_node_leave]&.each { |listener| listener.on_constant_path_operator_write_node_leave(node) }
|
1485
|
+
end
|
1486
|
+
|
1487
|
+
# Dispatch enter and leave events for ConstantPathOrWriteNode nodes.
|
1488
|
+
def visit_constant_path_or_write_node(node)
|
1489
|
+
listeners[:on_constant_path_or_write_node_enter]&.each { |listener| listener.on_constant_path_or_write_node_enter(node) }
|
1490
|
+
listeners[:on_constant_path_or_write_node_leave]&.each { |listener| listener.on_constant_path_or_write_node_leave(node) }
|
1491
|
+
end
|
1492
|
+
|
1493
|
+
# Dispatch enter and leave events for ConstantPathTargetNode nodes.
|
1494
|
+
def visit_constant_path_target_node(node)
|
1495
|
+
listeners[:on_constant_path_target_node_enter]&.each { |listener| listener.on_constant_path_target_node_enter(node) }
|
1496
|
+
listeners[:on_constant_path_target_node_leave]&.each { |listener| listener.on_constant_path_target_node_leave(node) }
|
1497
|
+
end
|
1498
|
+
|
1499
|
+
# Dispatch enter and leave events for ConstantPathWriteNode nodes.
|
1500
|
+
def visit_constant_path_write_node(node)
|
1501
|
+
listeners[:on_constant_path_write_node_enter]&.each { |listener| listener.on_constant_path_write_node_enter(node) }
|
1502
|
+
listeners[:on_constant_path_write_node_leave]&.each { |listener| listener.on_constant_path_write_node_leave(node) }
|
1503
|
+
end
|
1504
|
+
|
1505
|
+
# Dispatch enter and leave events for ConstantReadNode nodes.
|
1506
|
+
def visit_constant_read_node(node)
|
1507
|
+
listeners[:on_constant_read_node_enter]&.each { |listener| listener.on_constant_read_node_enter(node) }
|
1508
|
+
listeners[:on_constant_read_node_leave]&.each { |listener| listener.on_constant_read_node_leave(node) }
|
1509
|
+
end
|
1510
|
+
|
1511
|
+
# Dispatch enter and leave events for ConstantTargetNode nodes.
|
1512
|
+
def visit_constant_target_node(node)
|
1513
|
+
listeners[:on_constant_target_node_enter]&.each { |listener| listener.on_constant_target_node_enter(node) }
|
1514
|
+
listeners[:on_constant_target_node_leave]&.each { |listener| listener.on_constant_target_node_leave(node) }
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
# Dispatch enter and leave events for ConstantWriteNode nodes.
|
1518
|
+
def visit_constant_write_node(node)
|
1519
|
+
listeners[:on_constant_write_node_enter]&.each { |listener| listener.on_constant_write_node_enter(node) }
|
1520
|
+
listeners[:on_constant_write_node_leave]&.each { |listener| listener.on_constant_write_node_leave(node) }
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# Dispatch enter and leave events for DefNode nodes.
|
1524
|
+
def visit_def_node(node)
|
1525
|
+
listeners[:on_def_node_enter]&.each { |listener| listener.on_def_node_enter(node) }
|
1526
|
+
listeners[:on_def_node_leave]&.each { |listener| listener.on_def_node_leave(node) }
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
# Dispatch enter and leave events for DefinedNode nodes.
|
1530
|
+
def visit_defined_node(node)
|
1531
|
+
listeners[:on_defined_node_enter]&.each { |listener| listener.on_defined_node_enter(node) }
|
1532
|
+
listeners[:on_defined_node_leave]&.each { |listener| listener.on_defined_node_leave(node) }
|
1533
|
+
end
|
1534
|
+
|
1535
|
+
# Dispatch enter and leave events for ElseNode nodes.
|
1536
|
+
def visit_else_node(node)
|
1537
|
+
listeners[:on_else_node_enter]&.each { |listener| listener.on_else_node_enter(node) }
|
1538
|
+
listeners[:on_else_node_leave]&.each { |listener| listener.on_else_node_leave(node) }
|
1539
|
+
end
|
1540
|
+
|
1541
|
+
# Dispatch enter and leave events for EmbeddedStatementsNode nodes.
|
1542
|
+
def visit_embedded_statements_node(node)
|
1543
|
+
listeners[:on_embedded_statements_node_enter]&.each { |listener| listener.on_embedded_statements_node_enter(node) }
|
1544
|
+
listeners[:on_embedded_statements_node_leave]&.each { |listener| listener.on_embedded_statements_node_leave(node) }
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
# Dispatch enter and leave events for EmbeddedVariableNode nodes.
|
1548
|
+
def visit_embedded_variable_node(node)
|
1549
|
+
listeners[:on_embedded_variable_node_enter]&.each { |listener| listener.on_embedded_variable_node_enter(node) }
|
1550
|
+
listeners[:on_embedded_variable_node_leave]&.each { |listener| listener.on_embedded_variable_node_leave(node) }
|
1551
|
+
end
|
1552
|
+
|
1553
|
+
# Dispatch enter and leave events for EnsureNode nodes.
|
1554
|
+
def visit_ensure_node(node)
|
1555
|
+
listeners[:on_ensure_node_enter]&.each { |listener| listener.on_ensure_node_enter(node) }
|
1556
|
+
listeners[:on_ensure_node_leave]&.each { |listener| listener.on_ensure_node_leave(node) }
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
# Dispatch enter and leave events for FalseNode nodes.
|
1560
|
+
def visit_false_node(node)
|
1561
|
+
listeners[:on_false_node_enter]&.each { |listener| listener.on_false_node_enter(node) }
|
1562
|
+
listeners[:on_false_node_leave]&.each { |listener| listener.on_false_node_leave(node) }
|
1563
|
+
end
|
1564
|
+
|
1565
|
+
# Dispatch enter and leave events for FindPatternNode nodes.
|
1566
|
+
def visit_find_pattern_node(node)
|
1567
|
+
listeners[:on_find_pattern_node_enter]&.each { |listener| listener.on_find_pattern_node_enter(node) }
|
1568
|
+
listeners[:on_find_pattern_node_leave]&.each { |listener| listener.on_find_pattern_node_leave(node) }
|
1569
|
+
end
|
1570
|
+
|
1571
|
+
# Dispatch enter and leave events for FlipFlopNode nodes.
|
1572
|
+
def visit_flip_flop_node(node)
|
1573
|
+
listeners[:on_flip_flop_node_enter]&.each { |listener| listener.on_flip_flop_node_enter(node) }
|
1574
|
+
listeners[:on_flip_flop_node_leave]&.each { |listener| listener.on_flip_flop_node_leave(node) }
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
# Dispatch enter and leave events for FloatNode nodes.
|
1578
|
+
def visit_float_node(node)
|
1579
|
+
listeners[:on_float_node_enter]&.each { |listener| listener.on_float_node_enter(node) }
|
1580
|
+
listeners[:on_float_node_leave]&.each { |listener| listener.on_float_node_leave(node) }
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
# Dispatch enter and leave events for ForNode nodes.
|
1584
|
+
def visit_for_node(node)
|
1585
|
+
listeners[:on_for_node_enter]&.each { |listener| listener.on_for_node_enter(node) }
|
1586
|
+
listeners[:on_for_node_leave]&.each { |listener| listener.on_for_node_leave(node) }
|
1587
|
+
end
|
1588
|
+
|
1589
|
+
# Dispatch enter and leave events for ForwardingArgumentsNode nodes.
|
1590
|
+
def visit_forwarding_arguments_node(node)
|
1591
|
+
listeners[:on_forwarding_arguments_node_enter]&.each { |listener| listener.on_forwarding_arguments_node_enter(node) }
|
1592
|
+
listeners[:on_forwarding_arguments_node_leave]&.each { |listener| listener.on_forwarding_arguments_node_leave(node) }
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
# Dispatch enter and leave events for ForwardingParameterNode nodes.
|
1596
|
+
def visit_forwarding_parameter_node(node)
|
1597
|
+
listeners[:on_forwarding_parameter_node_enter]&.each { |listener| listener.on_forwarding_parameter_node_enter(node) }
|
1598
|
+
listeners[:on_forwarding_parameter_node_leave]&.each { |listener| listener.on_forwarding_parameter_node_leave(node) }
|
1599
|
+
end
|
1600
|
+
|
1601
|
+
# Dispatch enter and leave events for ForwardingSuperNode nodes.
|
1602
|
+
def visit_forwarding_super_node(node)
|
1603
|
+
listeners[:on_forwarding_super_node_enter]&.each { |listener| listener.on_forwarding_super_node_enter(node) }
|
1604
|
+
listeners[:on_forwarding_super_node_leave]&.each { |listener| listener.on_forwarding_super_node_leave(node) }
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Dispatch enter and leave events for GlobalVariableAndWriteNode nodes.
|
1608
|
+
def visit_global_variable_and_write_node(node)
|
1609
|
+
listeners[:on_global_variable_and_write_node_enter]&.each { |listener| listener.on_global_variable_and_write_node_enter(node) }
|
1610
|
+
listeners[:on_global_variable_and_write_node_leave]&.each { |listener| listener.on_global_variable_and_write_node_leave(node) }
|
1611
|
+
end
|
1612
|
+
|
1613
|
+
# Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes.
|
1614
|
+
def visit_global_variable_operator_write_node(node)
|
1615
|
+
listeners[:on_global_variable_operator_write_node_enter]&.each { |listener| listener.on_global_variable_operator_write_node_enter(node) }
|
1616
|
+
listeners[:on_global_variable_operator_write_node_leave]&.each { |listener| listener.on_global_variable_operator_write_node_leave(node) }
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
# Dispatch enter and leave events for GlobalVariableOrWriteNode nodes.
|
1620
|
+
def visit_global_variable_or_write_node(node)
|
1621
|
+
listeners[:on_global_variable_or_write_node_enter]&.each { |listener| listener.on_global_variable_or_write_node_enter(node) }
|
1622
|
+
listeners[:on_global_variable_or_write_node_leave]&.each { |listener| listener.on_global_variable_or_write_node_leave(node) }
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
# Dispatch enter and leave events for GlobalVariableReadNode nodes.
|
1626
|
+
def visit_global_variable_read_node(node)
|
1627
|
+
listeners[:on_global_variable_read_node_enter]&.each { |listener| listener.on_global_variable_read_node_enter(node) }
|
1628
|
+
listeners[:on_global_variable_read_node_leave]&.each { |listener| listener.on_global_variable_read_node_leave(node) }
|
1629
|
+
end
|
1630
|
+
|
1631
|
+
# Dispatch enter and leave events for GlobalVariableTargetNode nodes.
|
1632
|
+
def visit_global_variable_target_node(node)
|
1633
|
+
listeners[:on_global_variable_target_node_enter]&.each { |listener| listener.on_global_variable_target_node_enter(node) }
|
1634
|
+
listeners[:on_global_variable_target_node_leave]&.each { |listener| listener.on_global_variable_target_node_leave(node) }
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
# Dispatch enter and leave events for GlobalVariableWriteNode nodes.
|
1638
|
+
def visit_global_variable_write_node(node)
|
1639
|
+
listeners[:on_global_variable_write_node_enter]&.each { |listener| listener.on_global_variable_write_node_enter(node) }
|
1640
|
+
listeners[:on_global_variable_write_node_leave]&.each { |listener| listener.on_global_variable_write_node_leave(node) }
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
# Dispatch enter and leave events for HashNode nodes.
|
1644
|
+
def visit_hash_node(node)
|
1645
|
+
listeners[:on_hash_node_enter]&.each { |listener| listener.on_hash_node_enter(node) }
|
1646
|
+
listeners[:on_hash_node_leave]&.each { |listener| listener.on_hash_node_leave(node) }
|
1647
|
+
end
|
1648
|
+
|
1649
|
+
# Dispatch enter and leave events for HashPatternNode nodes.
|
1650
|
+
def visit_hash_pattern_node(node)
|
1651
|
+
listeners[:on_hash_pattern_node_enter]&.each { |listener| listener.on_hash_pattern_node_enter(node) }
|
1652
|
+
listeners[:on_hash_pattern_node_leave]&.each { |listener| listener.on_hash_pattern_node_leave(node) }
|
1653
|
+
end
|
1654
|
+
|
1655
|
+
# Dispatch enter and leave events for IfNode nodes.
|
1656
|
+
def visit_if_node(node)
|
1657
|
+
listeners[:on_if_node_enter]&.each { |listener| listener.on_if_node_enter(node) }
|
1658
|
+
listeners[:on_if_node_leave]&.each { |listener| listener.on_if_node_leave(node) }
|
1659
|
+
end
|
1660
|
+
|
1661
|
+
# Dispatch enter and leave events for ImaginaryNode nodes.
|
1662
|
+
def visit_imaginary_node(node)
|
1663
|
+
listeners[:on_imaginary_node_enter]&.each { |listener| listener.on_imaginary_node_enter(node) }
|
1664
|
+
listeners[:on_imaginary_node_leave]&.each { |listener| listener.on_imaginary_node_leave(node) }
|
1665
|
+
end
|
1666
|
+
|
1667
|
+
# Dispatch enter and leave events for ImplicitNode nodes.
|
1668
|
+
def visit_implicit_node(node)
|
1669
|
+
listeners[:on_implicit_node_enter]&.each { |listener| listener.on_implicit_node_enter(node) }
|
1670
|
+
listeners[:on_implicit_node_leave]&.each { |listener| listener.on_implicit_node_leave(node) }
|
1671
|
+
end
|
1672
|
+
|
1673
|
+
# Dispatch enter and leave events for ImplicitRestNode nodes.
|
1674
|
+
def visit_implicit_rest_node(node)
|
1675
|
+
listeners[:on_implicit_rest_node_enter]&.each { |listener| listener.on_implicit_rest_node_enter(node) }
|
1676
|
+
listeners[:on_implicit_rest_node_leave]&.each { |listener| listener.on_implicit_rest_node_leave(node) }
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
# Dispatch enter and leave events for InNode nodes.
|
1680
|
+
def visit_in_node(node)
|
1681
|
+
listeners[:on_in_node_enter]&.each { |listener| listener.on_in_node_enter(node) }
|
1682
|
+
listeners[:on_in_node_leave]&.each { |listener| listener.on_in_node_leave(node) }
|
1683
|
+
end
|
1684
|
+
|
1685
|
+
# Dispatch enter and leave events for IndexAndWriteNode nodes.
|
1686
|
+
def visit_index_and_write_node(node)
|
1687
|
+
listeners[:on_index_and_write_node_enter]&.each { |listener| listener.on_index_and_write_node_enter(node) }
|
1688
|
+
listeners[:on_index_and_write_node_leave]&.each { |listener| listener.on_index_and_write_node_leave(node) }
|
1689
|
+
end
|
1690
|
+
|
1691
|
+
# Dispatch enter and leave events for IndexOperatorWriteNode nodes.
|
1692
|
+
def visit_index_operator_write_node(node)
|
1693
|
+
listeners[:on_index_operator_write_node_enter]&.each { |listener| listener.on_index_operator_write_node_enter(node) }
|
1694
|
+
listeners[:on_index_operator_write_node_leave]&.each { |listener| listener.on_index_operator_write_node_leave(node) }
|
1695
|
+
end
|
1696
|
+
|
1697
|
+
# Dispatch enter and leave events for IndexOrWriteNode nodes.
|
1698
|
+
def visit_index_or_write_node(node)
|
1699
|
+
listeners[:on_index_or_write_node_enter]&.each { |listener| listener.on_index_or_write_node_enter(node) }
|
1700
|
+
listeners[:on_index_or_write_node_leave]&.each { |listener| listener.on_index_or_write_node_leave(node) }
|
1701
|
+
end
|
1702
|
+
|
1703
|
+
# Dispatch enter and leave events for IndexTargetNode nodes.
|
1704
|
+
def visit_index_target_node(node)
|
1705
|
+
listeners[:on_index_target_node_enter]&.each { |listener| listener.on_index_target_node_enter(node) }
|
1706
|
+
listeners[:on_index_target_node_leave]&.each { |listener| listener.on_index_target_node_leave(node) }
|
1707
|
+
end
|
1708
|
+
|
1709
|
+
# Dispatch enter and leave events for InstanceVariableAndWriteNode nodes.
|
1710
|
+
def visit_instance_variable_and_write_node(node)
|
1711
|
+
listeners[:on_instance_variable_and_write_node_enter]&.each { |listener| listener.on_instance_variable_and_write_node_enter(node) }
|
1712
|
+
listeners[:on_instance_variable_and_write_node_leave]&.each { |listener| listener.on_instance_variable_and_write_node_leave(node) }
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
# Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes.
|
1716
|
+
def visit_instance_variable_operator_write_node(node)
|
1717
|
+
listeners[:on_instance_variable_operator_write_node_enter]&.each { |listener| listener.on_instance_variable_operator_write_node_enter(node) }
|
1718
|
+
listeners[:on_instance_variable_operator_write_node_leave]&.each { |listener| listener.on_instance_variable_operator_write_node_leave(node) }
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
# Dispatch enter and leave events for InstanceVariableOrWriteNode nodes.
|
1722
|
+
def visit_instance_variable_or_write_node(node)
|
1723
|
+
listeners[:on_instance_variable_or_write_node_enter]&.each { |listener| listener.on_instance_variable_or_write_node_enter(node) }
|
1724
|
+
listeners[:on_instance_variable_or_write_node_leave]&.each { |listener| listener.on_instance_variable_or_write_node_leave(node) }
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
# Dispatch enter and leave events for InstanceVariableReadNode nodes.
|
1728
|
+
def visit_instance_variable_read_node(node)
|
1729
|
+
listeners[:on_instance_variable_read_node_enter]&.each { |listener| listener.on_instance_variable_read_node_enter(node) }
|
1730
|
+
listeners[:on_instance_variable_read_node_leave]&.each { |listener| listener.on_instance_variable_read_node_leave(node) }
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
# Dispatch enter and leave events for InstanceVariableTargetNode nodes.
|
1734
|
+
def visit_instance_variable_target_node(node)
|
1735
|
+
listeners[:on_instance_variable_target_node_enter]&.each { |listener| listener.on_instance_variable_target_node_enter(node) }
|
1736
|
+
listeners[:on_instance_variable_target_node_leave]&.each { |listener| listener.on_instance_variable_target_node_leave(node) }
|
1737
|
+
end
|
1738
|
+
|
1739
|
+
# Dispatch enter and leave events for InstanceVariableWriteNode nodes.
|
1740
|
+
def visit_instance_variable_write_node(node)
|
1741
|
+
listeners[:on_instance_variable_write_node_enter]&.each { |listener| listener.on_instance_variable_write_node_enter(node) }
|
1742
|
+
listeners[:on_instance_variable_write_node_leave]&.each { |listener| listener.on_instance_variable_write_node_leave(node) }
|
1743
|
+
end
|
1744
|
+
|
1745
|
+
# Dispatch enter and leave events for IntegerNode nodes.
|
1746
|
+
def visit_integer_node(node)
|
1747
|
+
listeners[:on_integer_node_enter]&.each { |listener| listener.on_integer_node_enter(node) }
|
1748
|
+
listeners[:on_integer_node_leave]&.each { |listener| listener.on_integer_node_leave(node) }
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
# Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes.
|
1752
|
+
def visit_interpolated_match_last_line_node(node)
|
1753
|
+
listeners[:on_interpolated_match_last_line_node_enter]&.each { |listener| listener.on_interpolated_match_last_line_node_enter(node) }
|
1754
|
+
listeners[:on_interpolated_match_last_line_node_leave]&.each { |listener| listener.on_interpolated_match_last_line_node_leave(node) }
|
1755
|
+
end
|
1756
|
+
|
1757
|
+
# Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes.
|
1758
|
+
def visit_interpolated_regular_expression_node(node)
|
1759
|
+
listeners[:on_interpolated_regular_expression_node_enter]&.each { |listener| listener.on_interpolated_regular_expression_node_enter(node) }
|
1760
|
+
listeners[:on_interpolated_regular_expression_node_leave]&.each { |listener| listener.on_interpolated_regular_expression_node_leave(node) }
|
1761
|
+
end
|
1762
|
+
|
1763
|
+
# Dispatch enter and leave events for InterpolatedStringNode nodes.
|
1764
|
+
def visit_interpolated_string_node(node)
|
1765
|
+
listeners[:on_interpolated_string_node_enter]&.each { |listener| listener.on_interpolated_string_node_enter(node) }
|
1766
|
+
listeners[:on_interpolated_string_node_leave]&.each { |listener| listener.on_interpolated_string_node_leave(node) }
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
# Dispatch enter and leave events for InterpolatedSymbolNode nodes.
|
1770
|
+
def visit_interpolated_symbol_node(node)
|
1771
|
+
listeners[:on_interpolated_symbol_node_enter]&.each { |listener| listener.on_interpolated_symbol_node_enter(node) }
|
1772
|
+
listeners[:on_interpolated_symbol_node_leave]&.each { |listener| listener.on_interpolated_symbol_node_leave(node) }
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
# Dispatch enter and leave events for InterpolatedXStringNode nodes.
|
1776
|
+
def visit_interpolated_x_string_node(node)
|
1777
|
+
listeners[:on_interpolated_x_string_node_enter]&.each { |listener| listener.on_interpolated_x_string_node_enter(node) }
|
1778
|
+
listeners[:on_interpolated_x_string_node_leave]&.each { |listener| listener.on_interpolated_x_string_node_leave(node) }
|
1779
|
+
end
|
1780
|
+
|
1781
|
+
# Dispatch enter and leave events for KeywordHashNode nodes.
|
1782
|
+
def visit_keyword_hash_node(node)
|
1783
|
+
listeners[:on_keyword_hash_node_enter]&.each { |listener| listener.on_keyword_hash_node_enter(node) }
|
1784
|
+
listeners[:on_keyword_hash_node_leave]&.each { |listener| listener.on_keyword_hash_node_leave(node) }
|
1785
|
+
end
|
1786
|
+
|
1787
|
+
# Dispatch enter and leave events for KeywordRestParameterNode nodes.
|
1788
|
+
def visit_keyword_rest_parameter_node(node)
|
1789
|
+
listeners[:on_keyword_rest_parameter_node_enter]&.each { |listener| listener.on_keyword_rest_parameter_node_enter(node) }
|
1790
|
+
listeners[:on_keyword_rest_parameter_node_leave]&.each { |listener| listener.on_keyword_rest_parameter_node_leave(node) }
|
1791
|
+
end
|
1792
|
+
|
1793
|
+
# Dispatch enter and leave events for LambdaNode nodes.
|
1794
|
+
def visit_lambda_node(node)
|
1795
|
+
listeners[:on_lambda_node_enter]&.each { |listener| listener.on_lambda_node_enter(node) }
|
1796
|
+
listeners[:on_lambda_node_leave]&.each { |listener| listener.on_lambda_node_leave(node) }
|
1797
|
+
end
|
1798
|
+
|
1799
|
+
# Dispatch enter and leave events for LocalVariableAndWriteNode nodes.
|
1800
|
+
def visit_local_variable_and_write_node(node)
|
1801
|
+
listeners[:on_local_variable_and_write_node_enter]&.each { |listener| listener.on_local_variable_and_write_node_enter(node) }
|
1802
|
+
listeners[:on_local_variable_and_write_node_leave]&.each { |listener| listener.on_local_variable_and_write_node_leave(node) }
|
1803
|
+
end
|
1804
|
+
|
1805
|
+
# Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes.
|
1806
|
+
def visit_local_variable_operator_write_node(node)
|
1807
|
+
listeners[:on_local_variable_operator_write_node_enter]&.each { |listener| listener.on_local_variable_operator_write_node_enter(node) }
|
1808
|
+
listeners[:on_local_variable_operator_write_node_leave]&.each { |listener| listener.on_local_variable_operator_write_node_leave(node) }
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
# Dispatch enter and leave events for LocalVariableOrWriteNode nodes.
|
1812
|
+
def visit_local_variable_or_write_node(node)
|
1813
|
+
listeners[:on_local_variable_or_write_node_enter]&.each { |listener| listener.on_local_variable_or_write_node_enter(node) }
|
1814
|
+
listeners[:on_local_variable_or_write_node_leave]&.each { |listener| listener.on_local_variable_or_write_node_leave(node) }
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
# Dispatch enter and leave events for LocalVariableReadNode nodes.
|
1818
|
+
def visit_local_variable_read_node(node)
|
1819
|
+
listeners[:on_local_variable_read_node_enter]&.each { |listener| listener.on_local_variable_read_node_enter(node) }
|
1820
|
+
listeners[:on_local_variable_read_node_leave]&.each { |listener| listener.on_local_variable_read_node_leave(node) }
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# Dispatch enter and leave events for LocalVariableTargetNode nodes.
|
1824
|
+
def visit_local_variable_target_node(node)
|
1825
|
+
listeners[:on_local_variable_target_node_enter]&.each { |listener| listener.on_local_variable_target_node_enter(node) }
|
1826
|
+
listeners[:on_local_variable_target_node_leave]&.each { |listener| listener.on_local_variable_target_node_leave(node) }
|
1827
|
+
end
|
1828
|
+
|
1829
|
+
# Dispatch enter and leave events for LocalVariableWriteNode nodes.
|
1830
|
+
def visit_local_variable_write_node(node)
|
1831
|
+
listeners[:on_local_variable_write_node_enter]&.each { |listener| listener.on_local_variable_write_node_enter(node) }
|
1832
|
+
listeners[:on_local_variable_write_node_leave]&.each { |listener| listener.on_local_variable_write_node_leave(node) }
|
1833
|
+
end
|
1834
|
+
|
1835
|
+
# Dispatch enter and leave events for MatchLastLineNode nodes.
|
1836
|
+
def visit_match_last_line_node(node)
|
1837
|
+
listeners[:on_match_last_line_node_enter]&.each { |listener| listener.on_match_last_line_node_enter(node) }
|
1838
|
+
listeners[:on_match_last_line_node_leave]&.each { |listener| listener.on_match_last_line_node_leave(node) }
|
1839
|
+
end
|
1840
|
+
|
1841
|
+
# Dispatch enter and leave events for MatchPredicateNode nodes.
|
1842
|
+
def visit_match_predicate_node(node)
|
1843
|
+
listeners[:on_match_predicate_node_enter]&.each { |listener| listener.on_match_predicate_node_enter(node) }
|
1844
|
+
listeners[:on_match_predicate_node_leave]&.each { |listener| listener.on_match_predicate_node_leave(node) }
|
1845
|
+
end
|
1846
|
+
|
1847
|
+
# Dispatch enter and leave events for MatchRequiredNode nodes.
|
1848
|
+
def visit_match_required_node(node)
|
1849
|
+
listeners[:on_match_required_node_enter]&.each { |listener| listener.on_match_required_node_enter(node) }
|
1850
|
+
listeners[:on_match_required_node_leave]&.each { |listener| listener.on_match_required_node_leave(node) }
|
1851
|
+
end
|
1852
|
+
|
1853
|
+
# Dispatch enter and leave events for MatchWriteNode nodes.
|
1854
|
+
def visit_match_write_node(node)
|
1855
|
+
listeners[:on_match_write_node_enter]&.each { |listener| listener.on_match_write_node_enter(node) }
|
1856
|
+
listeners[:on_match_write_node_leave]&.each { |listener| listener.on_match_write_node_leave(node) }
|
1857
|
+
end
|
1858
|
+
|
1859
|
+
# Dispatch enter and leave events for MissingNode nodes.
|
1860
|
+
def visit_missing_node(node)
|
1861
|
+
listeners[:on_missing_node_enter]&.each { |listener| listener.on_missing_node_enter(node) }
|
1862
|
+
listeners[:on_missing_node_leave]&.each { |listener| listener.on_missing_node_leave(node) }
|
1863
|
+
end
|
1864
|
+
|
1865
|
+
# Dispatch enter and leave events for ModuleNode nodes.
|
1866
|
+
def visit_module_node(node)
|
1867
|
+
listeners[:on_module_node_enter]&.each { |listener| listener.on_module_node_enter(node) }
|
1868
|
+
listeners[:on_module_node_leave]&.each { |listener| listener.on_module_node_leave(node) }
|
1869
|
+
end
|
1870
|
+
|
1871
|
+
# Dispatch enter and leave events for MultiTargetNode nodes.
|
1872
|
+
def visit_multi_target_node(node)
|
1873
|
+
listeners[:on_multi_target_node_enter]&.each { |listener| listener.on_multi_target_node_enter(node) }
|
1874
|
+
listeners[:on_multi_target_node_leave]&.each { |listener| listener.on_multi_target_node_leave(node) }
|
1875
|
+
end
|
1876
|
+
|
1877
|
+
# Dispatch enter and leave events for MultiWriteNode nodes.
|
1878
|
+
def visit_multi_write_node(node)
|
1879
|
+
listeners[:on_multi_write_node_enter]&.each { |listener| listener.on_multi_write_node_enter(node) }
|
1880
|
+
listeners[:on_multi_write_node_leave]&.each { |listener| listener.on_multi_write_node_leave(node) }
|
1881
|
+
end
|
1882
|
+
|
1883
|
+
# Dispatch enter and leave events for NextNode nodes.
|
1884
|
+
def visit_next_node(node)
|
1885
|
+
listeners[:on_next_node_enter]&.each { |listener| listener.on_next_node_enter(node) }
|
1886
|
+
listeners[:on_next_node_leave]&.each { |listener| listener.on_next_node_leave(node) }
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# Dispatch enter and leave events for NilNode nodes.
|
1890
|
+
def visit_nil_node(node)
|
1891
|
+
listeners[:on_nil_node_enter]&.each { |listener| listener.on_nil_node_enter(node) }
|
1892
|
+
listeners[:on_nil_node_leave]&.each { |listener| listener.on_nil_node_leave(node) }
|
1893
|
+
end
|
1894
|
+
|
1895
|
+
# Dispatch enter and leave events for NoKeywordsParameterNode nodes.
|
1896
|
+
def visit_no_keywords_parameter_node(node)
|
1897
|
+
listeners[:on_no_keywords_parameter_node_enter]&.each { |listener| listener.on_no_keywords_parameter_node_enter(node) }
|
1898
|
+
listeners[:on_no_keywords_parameter_node_leave]&.each { |listener| listener.on_no_keywords_parameter_node_leave(node) }
|
1899
|
+
end
|
1900
|
+
|
1901
|
+
# Dispatch enter and leave events for NumberedParametersNode nodes.
|
1902
|
+
def visit_numbered_parameters_node(node)
|
1903
|
+
listeners[:on_numbered_parameters_node_enter]&.each { |listener| listener.on_numbered_parameters_node_enter(node) }
|
1904
|
+
listeners[:on_numbered_parameters_node_leave]&.each { |listener| listener.on_numbered_parameters_node_leave(node) }
|
1905
|
+
end
|
1906
|
+
|
1907
|
+
# Dispatch enter and leave events for NumberedReferenceReadNode nodes.
|
1908
|
+
def visit_numbered_reference_read_node(node)
|
1909
|
+
listeners[:on_numbered_reference_read_node_enter]&.each { |listener| listener.on_numbered_reference_read_node_enter(node) }
|
1910
|
+
listeners[:on_numbered_reference_read_node_leave]&.each { |listener| listener.on_numbered_reference_read_node_leave(node) }
|
1911
|
+
end
|
1912
|
+
|
1913
|
+
# Dispatch enter and leave events for OptionalKeywordParameterNode nodes.
|
1914
|
+
def visit_optional_keyword_parameter_node(node)
|
1915
|
+
listeners[:on_optional_keyword_parameter_node_enter]&.each { |listener| listener.on_optional_keyword_parameter_node_enter(node) }
|
1916
|
+
listeners[:on_optional_keyword_parameter_node_leave]&.each { |listener| listener.on_optional_keyword_parameter_node_leave(node) }
|
1917
|
+
end
|
1918
|
+
|
1919
|
+
# Dispatch enter and leave events for OptionalParameterNode nodes.
|
1920
|
+
def visit_optional_parameter_node(node)
|
1921
|
+
listeners[:on_optional_parameter_node_enter]&.each { |listener| listener.on_optional_parameter_node_enter(node) }
|
1922
|
+
listeners[:on_optional_parameter_node_leave]&.each { |listener| listener.on_optional_parameter_node_leave(node) }
|
1923
|
+
end
|
1924
|
+
|
1925
|
+
# Dispatch enter and leave events for OrNode nodes.
|
1926
|
+
def visit_or_node(node)
|
1927
|
+
listeners[:on_or_node_enter]&.each { |listener| listener.on_or_node_enter(node) }
|
1928
|
+
listeners[:on_or_node_leave]&.each { |listener| listener.on_or_node_leave(node) }
|
1929
|
+
end
|
1930
|
+
|
1931
|
+
# Dispatch enter and leave events for ParametersNode nodes.
|
1932
|
+
def visit_parameters_node(node)
|
1933
|
+
listeners[:on_parameters_node_enter]&.each { |listener| listener.on_parameters_node_enter(node) }
|
1934
|
+
listeners[:on_parameters_node_leave]&.each { |listener| listener.on_parameters_node_leave(node) }
|
1935
|
+
end
|
1936
|
+
|
1937
|
+
# Dispatch enter and leave events for ParenthesesNode nodes.
|
1938
|
+
def visit_parentheses_node(node)
|
1939
|
+
listeners[:on_parentheses_node_enter]&.each { |listener| listener.on_parentheses_node_enter(node) }
|
1940
|
+
listeners[:on_parentheses_node_leave]&.each { |listener| listener.on_parentheses_node_leave(node) }
|
1941
|
+
end
|
1942
|
+
|
1943
|
+
# Dispatch enter and leave events for PinnedExpressionNode nodes.
|
1944
|
+
def visit_pinned_expression_node(node)
|
1945
|
+
listeners[:on_pinned_expression_node_enter]&.each { |listener| listener.on_pinned_expression_node_enter(node) }
|
1946
|
+
listeners[:on_pinned_expression_node_leave]&.each { |listener| listener.on_pinned_expression_node_leave(node) }
|
1947
|
+
end
|
1948
|
+
|
1949
|
+
# Dispatch enter and leave events for PinnedVariableNode nodes.
|
1950
|
+
def visit_pinned_variable_node(node)
|
1951
|
+
listeners[:on_pinned_variable_node_enter]&.each { |listener| listener.on_pinned_variable_node_enter(node) }
|
1952
|
+
listeners[:on_pinned_variable_node_leave]&.each { |listener| listener.on_pinned_variable_node_leave(node) }
|
1953
|
+
end
|
1954
|
+
|
1955
|
+
# Dispatch enter and leave events for PostExecutionNode nodes.
|
1956
|
+
def visit_post_execution_node(node)
|
1957
|
+
listeners[:on_post_execution_node_enter]&.each { |listener| listener.on_post_execution_node_enter(node) }
|
1958
|
+
listeners[:on_post_execution_node_leave]&.each { |listener| listener.on_post_execution_node_leave(node) }
|
1959
|
+
end
|
1960
|
+
|
1961
|
+
# Dispatch enter and leave events for PreExecutionNode nodes.
|
1962
|
+
def visit_pre_execution_node(node)
|
1963
|
+
listeners[:on_pre_execution_node_enter]&.each { |listener| listener.on_pre_execution_node_enter(node) }
|
1964
|
+
listeners[:on_pre_execution_node_leave]&.each { |listener| listener.on_pre_execution_node_leave(node) }
|
1965
|
+
end
|
1966
|
+
|
1967
|
+
# Dispatch enter and leave events for ProgramNode nodes.
|
1968
|
+
def visit_program_node(node)
|
1969
|
+
listeners[:on_program_node_enter]&.each { |listener| listener.on_program_node_enter(node) }
|
1970
|
+
listeners[:on_program_node_leave]&.each { |listener| listener.on_program_node_leave(node) }
|
1971
|
+
end
|
1972
|
+
|
1973
|
+
# Dispatch enter and leave events for RangeNode nodes.
|
1974
|
+
def visit_range_node(node)
|
1975
|
+
listeners[:on_range_node_enter]&.each { |listener| listener.on_range_node_enter(node) }
|
1976
|
+
listeners[:on_range_node_leave]&.each { |listener| listener.on_range_node_leave(node) }
|
1977
|
+
end
|
1978
|
+
|
1979
|
+
# Dispatch enter and leave events for RationalNode nodes.
|
1980
|
+
def visit_rational_node(node)
|
1981
|
+
listeners[:on_rational_node_enter]&.each { |listener| listener.on_rational_node_enter(node) }
|
1982
|
+
listeners[:on_rational_node_leave]&.each { |listener| listener.on_rational_node_leave(node) }
|
1983
|
+
end
|
1984
|
+
|
1985
|
+
# Dispatch enter and leave events for RedoNode nodes.
|
1986
|
+
def visit_redo_node(node)
|
1987
|
+
listeners[:on_redo_node_enter]&.each { |listener| listener.on_redo_node_enter(node) }
|
1988
|
+
listeners[:on_redo_node_leave]&.each { |listener| listener.on_redo_node_leave(node) }
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
# Dispatch enter and leave events for RegularExpressionNode nodes.
|
1992
|
+
def visit_regular_expression_node(node)
|
1993
|
+
listeners[:on_regular_expression_node_enter]&.each { |listener| listener.on_regular_expression_node_enter(node) }
|
1994
|
+
listeners[:on_regular_expression_node_leave]&.each { |listener| listener.on_regular_expression_node_leave(node) }
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
# Dispatch enter and leave events for RequiredKeywordParameterNode nodes.
|
1998
|
+
def visit_required_keyword_parameter_node(node)
|
1999
|
+
listeners[:on_required_keyword_parameter_node_enter]&.each { |listener| listener.on_required_keyword_parameter_node_enter(node) }
|
2000
|
+
listeners[:on_required_keyword_parameter_node_leave]&.each { |listener| listener.on_required_keyword_parameter_node_leave(node) }
|
2001
|
+
end
|
2002
|
+
|
2003
|
+
# Dispatch enter and leave events for RequiredParameterNode nodes.
|
2004
|
+
def visit_required_parameter_node(node)
|
2005
|
+
listeners[:on_required_parameter_node_enter]&.each { |listener| listener.on_required_parameter_node_enter(node) }
|
2006
|
+
listeners[:on_required_parameter_node_leave]&.each { |listener| listener.on_required_parameter_node_leave(node) }
|
2007
|
+
end
|
2008
|
+
|
2009
|
+
# Dispatch enter and leave events for RescueModifierNode nodes.
|
2010
|
+
def visit_rescue_modifier_node(node)
|
2011
|
+
listeners[:on_rescue_modifier_node_enter]&.each { |listener| listener.on_rescue_modifier_node_enter(node) }
|
2012
|
+
listeners[:on_rescue_modifier_node_leave]&.each { |listener| listener.on_rescue_modifier_node_leave(node) }
|
2013
|
+
end
|
2014
|
+
|
2015
|
+
# Dispatch enter and leave events for RescueNode nodes.
|
2016
|
+
def visit_rescue_node(node)
|
2017
|
+
listeners[:on_rescue_node_enter]&.each { |listener| listener.on_rescue_node_enter(node) }
|
2018
|
+
listeners[:on_rescue_node_leave]&.each { |listener| listener.on_rescue_node_leave(node) }
|
2019
|
+
end
|
2020
|
+
|
2021
|
+
# Dispatch enter and leave events for RestParameterNode nodes.
|
2022
|
+
def visit_rest_parameter_node(node)
|
2023
|
+
listeners[:on_rest_parameter_node_enter]&.each { |listener| listener.on_rest_parameter_node_enter(node) }
|
2024
|
+
listeners[:on_rest_parameter_node_leave]&.each { |listener| listener.on_rest_parameter_node_leave(node) }
|
2025
|
+
end
|
2026
|
+
|
2027
|
+
# Dispatch enter and leave events for RetryNode nodes.
|
2028
|
+
def visit_retry_node(node)
|
2029
|
+
listeners[:on_retry_node_enter]&.each { |listener| listener.on_retry_node_enter(node) }
|
2030
|
+
listeners[:on_retry_node_leave]&.each { |listener| listener.on_retry_node_leave(node) }
|
2031
|
+
end
|
2032
|
+
|
2033
|
+
# Dispatch enter and leave events for ReturnNode nodes.
|
2034
|
+
def visit_return_node(node)
|
2035
|
+
listeners[:on_return_node_enter]&.each { |listener| listener.on_return_node_enter(node) }
|
2036
|
+
listeners[:on_return_node_leave]&.each { |listener| listener.on_return_node_leave(node) }
|
2037
|
+
end
|
2038
|
+
|
2039
|
+
# Dispatch enter and leave events for SelfNode nodes.
|
2040
|
+
def visit_self_node(node)
|
2041
|
+
listeners[:on_self_node_enter]&.each { |listener| listener.on_self_node_enter(node) }
|
2042
|
+
listeners[:on_self_node_leave]&.each { |listener| listener.on_self_node_leave(node) }
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
# Dispatch enter and leave events for SingletonClassNode nodes.
|
2046
|
+
def visit_singleton_class_node(node)
|
2047
|
+
listeners[:on_singleton_class_node_enter]&.each { |listener| listener.on_singleton_class_node_enter(node) }
|
2048
|
+
listeners[:on_singleton_class_node_leave]&.each { |listener| listener.on_singleton_class_node_leave(node) }
|
2049
|
+
end
|
2050
|
+
|
2051
|
+
# Dispatch enter and leave events for SourceEncodingNode nodes.
|
2052
|
+
def visit_source_encoding_node(node)
|
2053
|
+
listeners[:on_source_encoding_node_enter]&.each { |listener| listener.on_source_encoding_node_enter(node) }
|
2054
|
+
listeners[:on_source_encoding_node_leave]&.each { |listener| listener.on_source_encoding_node_leave(node) }
|
2055
|
+
end
|
2056
|
+
|
2057
|
+
# Dispatch enter and leave events for SourceFileNode nodes.
|
2058
|
+
def visit_source_file_node(node)
|
2059
|
+
listeners[:on_source_file_node_enter]&.each { |listener| listener.on_source_file_node_enter(node) }
|
2060
|
+
listeners[:on_source_file_node_leave]&.each { |listener| listener.on_source_file_node_leave(node) }
|
2061
|
+
end
|
2062
|
+
|
2063
|
+
# Dispatch enter and leave events for SourceLineNode nodes.
|
2064
|
+
def visit_source_line_node(node)
|
2065
|
+
listeners[:on_source_line_node_enter]&.each { |listener| listener.on_source_line_node_enter(node) }
|
2066
|
+
listeners[:on_source_line_node_leave]&.each { |listener| listener.on_source_line_node_leave(node) }
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
# Dispatch enter and leave events for SplatNode nodes.
|
2070
|
+
def visit_splat_node(node)
|
2071
|
+
listeners[:on_splat_node_enter]&.each { |listener| listener.on_splat_node_enter(node) }
|
2072
|
+
listeners[:on_splat_node_leave]&.each { |listener| listener.on_splat_node_leave(node) }
|
2073
|
+
end
|
2074
|
+
|
2075
|
+
# Dispatch enter and leave events for StatementsNode nodes.
|
2076
|
+
def visit_statements_node(node)
|
2077
|
+
listeners[:on_statements_node_enter]&.each { |listener| listener.on_statements_node_enter(node) }
|
2078
|
+
listeners[:on_statements_node_leave]&.each { |listener| listener.on_statements_node_leave(node) }
|
2079
|
+
end
|
2080
|
+
|
2081
|
+
# Dispatch enter and leave events for StringNode nodes.
|
2082
|
+
def visit_string_node(node)
|
2083
|
+
listeners[:on_string_node_enter]&.each { |listener| listener.on_string_node_enter(node) }
|
2084
|
+
listeners[:on_string_node_leave]&.each { |listener| listener.on_string_node_leave(node) }
|
2085
|
+
end
|
2086
|
+
|
2087
|
+
# Dispatch enter and leave events for SuperNode nodes.
|
2088
|
+
def visit_super_node(node)
|
2089
|
+
listeners[:on_super_node_enter]&.each { |listener| listener.on_super_node_enter(node) }
|
2090
|
+
listeners[:on_super_node_leave]&.each { |listener| listener.on_super_node_leave(node) }
|
2091
|
+
end
|
2092
|
+
|
2093
|
+
# Dispatch enter and leave events for SymbolNode nodes.
|
2094
|
+
def visit_symbol_node(node)
|
2095
|
+
listeners[:on_symbol_node_enter]&.each { |listener| listener.on_symbol_node_enter(node) }
|
2096
|
+
listeners[:on_symbol_node_leave]&.each { |listener| listener.on_symbol_node_leave(node) }
|
2097
|
+
end
|
2098
|
+
|
2099
|
+
# Dispatch enter and leave events for TrueNode nodes.
|
2100
|
+
def visit_true_node(node)
|
2101
|
+
listeners[:on_true_node_enter]&.each { |listener| listener.on_true_node_enter(node) }
|
2102
|
+
listeners[:on_true_node_leave]&.each { |listener| listener.on_true_node_leave(node) }
|
2103
|
+
end
|
2104
|
+
|
2105
|
+
# Dispatch enter and leave events for UndefNode nodes.
|
2106
|
+
def visit_undef_node(node)
|
2107
|
+
listeners[:on_undef_node_enter]&.each { |listener| listener.on_undef_node_enter(node) }
|
2108
|
+
listeners[:on_undef_node_leave]&.each { |listener| listener.on_undef_node_leave(node) }
|
2109
|
+
end
|
2110
|
+
|
2111
|
+
# Dispatch enter and leave events for UnlessNode nodes.
|
2112
|
+
def visit_unless_node(node)
|
2113
|
+
listeners[:on_unless_node_enter]&.each { |listener| listener.on_unless_node_enter(node) }
|
2114
|
+
listeners[:on_unless_node_leave]&.each { |listener| listener.on_unless_node_leave(node) }
|
2115
|
+
end
|
2116
|
+
|
2117
|
+
# Dispatch enter and leave events for UntilNode nodes.
|
2118
|
+
def visit_until_node(node)
|
2119
|
+
listeners[:on_until_node_enter]&.each { |listener| listener.on_until_node_enter(node) }
|
2120
|
+
listeners[:on_until_node_leave]&.each { |listener| listener.on_until_node_leave(node) }
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
# Dispatch enter and leave events for WhenNode nodes.
|
2124
|
+
def visit_when_node(node)
|
2125
|
+
listeners[:on_when_node_enter]&.each { |listener| listener.on_when_node_enter(node) }
|
2126
|
+
listeners[:on_when_node_leave]&.each { |listener| listener.on_when_node_leave(node) }
|
2127
|
+
end
|
2128
|
+
|
2129
|
+
# Dispatch enter and leave events for WhileNode nodes.
|
2130
|
+
def visit_while_node(node)
|
2131
|
+
listeners[:on_while_node_enter]&.each { |listener| listener.on_while_node_enter(node) }
|
2132
|
+
listeners[:on_while_node_leave]&.each { |listener| listener.on_while_node_leave(node) }
|
2133
|
+
end
|
2134
|
+
|
2135
|
+
# Dispatch enter and leave events for XStringNode nodes.
|
2136
|
+
def visit_x_string_node(node)
|
2137
|
+
listeners[:on_x_string_node_enter]&.each { |listener| listener.on_x_string_node_enter(node) }
|
2138
|
+
listeners[:on_x_string_node_leave]&.each { |listener| listener.on_x_string_node_leave(node) }
|
2139
|
+
end
|
2140
|
+
|
2141
|
+
# Dispatch enter and leave events for YieldNode nodes.
|
2142
|
+
def visit_yield_node(node)
|
2143
|
+
listeners[:on_yield_node_enter]&.each { |listener| listener.on_yield_node_enter(node) }
|
2144
|
+
listeners[:on_yield_node_leave]&.each { |listener| listener.on_yield_node_leave(node) }
|
2145
|
+
end
|
2146
|
+
end
|
2147
|
+
|
2148
|
+
private_constant :DispatchOnce
|
2149
|
+
end
|
2150
|
+
end
|