class Prism::Dispatcher

dispatcher 类在遍历 AST 时为找到的节点向所有注册的侦听器触发事件。这对于在 AST 上执行不同类型的分析非常有用,而只需遍历一次树。

要使用 dispatcher,您首先需要实例化它并为感兴趣的事件注册侦听器

class OctalListener
  def on_integer_node_enter(node)
    if node.octal? && !node.slice.start_with?("0o")
      warn("Octal integers should be written with the 0o prefix")
    end
  end
end

listener = OctalListener.new
dispatcher = Prism::Dispatcher.new
dispatcher.register(listener, :on_integer_node_enter)

然后,您可以遍历任意数量的树并将事件分派给侦听器

result = Prism.parse("001 + 002 + 003")
dispatcher.dispatch(result.value)

或者,您也可以使用 `#dispatch_once` 为单个节点分派进入和离开事件,而无需进一步递归到树的更深层次。这在您想重用已注册的侦听器但又想在某个特定点停止遍历树的情况下非常有用。

integer = result.value.statements.body.first.receiver.receiver
dispatcher.dispatch_once(integer)

属性

listeners[R]

attr_reader listeners: Hash[Symbol, Array]

公共类方法

new() 单击以切换源代码

初始化一个新的 dispatcher。

# File prism/dispatcher.rb, line 47
def initialize
  @listeners = {}
end

公共实例方法

dispatch_once(node) 单击以切换源代码

为 `node` 向所有注册的侦听器分派单个事件。

def dispatch_once: (Node) -> void

# File prism/dispatcher.rb, line 66
def dispatch_once(node)
  node.accept(DispatchOnce.new(listeners))
end
register(listener, *events) 单击以切换源代码

为一个或多个事件注册侦听器。

def register: (Listener, *Symbol) -> void

# File prism/dispatcher.rb, line 54
def register(listener, *events)
  events.each { |event| (listeners[event] ||= []) << listener }
end
visit_alias_global_variable_node(node) 单击以切换源代码

AliasGlobalVariableNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 72
def visit_alias_global_variable_node(node)
  listeners[:on_alias_global_variable_node_enter]&.each { |listener| listener.on_alias_global_variable_node_enter(node) }
  super
  listeners[:on_alias_global_variable_node_leave]&.each { |listener| listener.on_alias_global_variable_node_leave(node) }
end
visit_alias_method_node(node) 单击以切换源代码

AliasMethodNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 80
def visit_alias_method_node(node)
  listeners[:on_alias_method_node_enter]&.each { |listener| listener.on_alias_method_node_enter(node) }
  super
  listeners[:on_alias_method_node_leave]&.each { |listener| listener.on_alias_method_node_leave(node) }
end
visit_alternation_pattern_node(node) 单击以切换源代码

AlternationPatternNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 88
def visit_alternation_pattern_node(node)
  listeners[:on_alternation_pattern_node_enter]&.each { |listener| listener.on_alternation_pattern_node_enter(node) }
  super
  listeners[:on_alternation_pattern_node_leave]&.each { |listener| listener.on_alternation_pattern_node_leave(node) }
end
visit_and_node(node) 单击以切换源代码

AndNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 96
def visit_and_node(node)
  listeners[:on_and_node_enter]&.each { |listener| listener.on_and_node_enter(node) }
  super
  listeners[:on_and_node_leave]&.each { |listener| listener.on_and_node_leave(node) }
end
visit_arguments_node(node) 单击以切换源代码

ArgumentsNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 104
def visit_arguments_node(node)
  listeners[:on_arguments_node_enter]&.each { |listener| listener.on_arguments_node_enter(node) }
  super
  listeners[:on_arguments_node_leave]&.each { |listener| listener.on_arguments_node_leave(node) }
end
visit_array_node(node) 单击以切换源代码

ArrayNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 112
def visit_array_node(node)
  listeners[:on_array_node_enter]&.each { |listener| listener.on_array_node_enter(node) }
  super
  listeners[:on_array_node_leave]&.each { |listener| listener.on_array_node_leave(node) }
end
visit_array_pattern_node(node) 单击以切换源代码

ArrayPatternNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 120
def visit_array_pattern_node(node)
  listeners[:on_array_pattern_node_enter]&.each { |listener| listener.on_array_pattern_node_enter(node) }
  super
  listeners[:on_array_pattern_node_leave]&.each { |listener| listener.on_array_pattern_node_leave(node) }
end
visit_assoc_node(node) 单击以切换源代码

AssocNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 128
def visit_assoc_node(node)
  listeners[:on_assoc_node_enter]&.each { |listener| listener.on_assoc_node_enter(node) }
  super
  listeners[:on_assoc_node_leave]&.each { |listener| listener.on_assoc_node_leave(node) }
end
visit_assoc_splat_node(node) 单击以切换源代码

AssocSplatNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 136
def visit_assoc_splat_node(node)
  listeners[:on_assoc_splat_node_enter]&.each { |listener| listener.on_assoc_splat_node_enter(node) }
  super
  listeners[:on_assoc_splat_node_leave]&.each { |listener| listener.on_assoc_splat_node_leave(node) }
end
visit_back_reference_read_node(node) 单击以切换源代码

BackReferenceReadNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 144
def visit_back_reference_read_node(node)
  listeners[:on_back_reference_read_node_enter]&.each { |listener| listener.on_back_reference_read_node_enter(node) }
  super
  listeners[:on_back_reference_read_node_leave]&.each { |listener| listener.on_back_reference_read_node_leave(node) }
end
visit_begin_node(node) 单击以切换源代码

BeginNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 152
def visit_begin_node(node)
  listeners[:on_begin_node_enter]&.each { |listener| listener.on_begin_node_enter(node) }
  super
  listeners[:on_begin_node_leave]&.each { |listener| listener.on_begin_node_leave(node) }
end
visit_block_argument_node(node) 单击以切换源代码

BlockArgumentNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 160
def visit_block_argument_node(node)
  listeners[:on_block_argument_node_enter]&.each { |listener| listener.on_block_argument_node_enter(node) }
  super
  listeners[:on_block_argument_node_leave]&.each { |listener| listener.on_block_argument_node_leave(node) }
end
visit_block_local_variable_node(node) 单击以切换源代码

BlockLocalVariableNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 168
def visit_block_local_variable_node(node)
  listeners[:on_block_local_variable_node_enter]&.each { |listener| listener.on_block_local_variable_node_enter(node) }
  super
  listeners[:on_block_local_variable_node_leave]&.each { |listener| listener.on_block_local_variable_node_leave(node) }
end
visit_block_node(node) 单击以切换源代码

BlockNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 176
def visit_block_node(node)
  listeners[:on_block_node_enter]&.each { |listener| listener.on_block_node_enter(node) }
  super
  listeners[:on_block_node_leave]&.each { |listener| listener.on_block_node_leave(node) }
end
visit_block_parameter_node(node) 单击以切换源代码

BlockParameterNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 184
def visit_block_parameter_node(node)
  listeners[:on_block_parameter_node_enter]&.each { |listener| listener.on_block_parameter_node_enter(node) }
  super
  listeners[:on_block_parameter_node_leave]&.each { |listener| listener.on_block_parameter_node_leave(node) }
end
visit_block_parameters_node(node) 单击以切换源代码

BlockParametersNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 192
def visit_block_parameters_node(node)
  listeners[:on_block_parameters_node_enter]&.each { |listener| listener.on_block_parameters_node_enter(node) }
  super
  listeners[:on_block_parameters_node_leave]&.each { |listener| listener.on_block_parameters_node_leave(node) }
end
visit_break_node(node) 单击以切换源代码

BreakNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 200
def visit_break_node(node)
  listeners[:on_break_node_enter]&.each { |listener| listener.on_break_node_enter(node) }
  super
  listeners[:on_break_node_leave]&.each { |listener| listener.on_break_node_leave(node) }
end
visit_call_and_write_node(node) 单击以切换源代码

CallAndWriteNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 208
def visit_call_and_write_node(node)
  listeners[:on_call_and_write_node_enter]&.each { |listener| listener.on_call_and_write_node_enter(node) }
  super
  listeners[:on_call_and_write_node_leave]&.each { |listener| listener.on_call_and_write_node_leave(node) }
end
visit_call_node(node) 单击以切换源代码

CallNode 节点分派进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 216
def visit_call_node(node)
  listeners[:on_call_node_enter]&.each { |listener| listener.on_call_node_enter(node) }
  super
  listeners[:on_call_node_leave]&.each { |listener| listener.on_call_node_leave(node) }
end
visit_call_operator_write_node(node) 单击以切换源代码

CallOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 224
def visit_call_operator_write_node(node)
  listeners[:on_call_operator_write_node_enter]&.each { |listener| listener.on_call_operator_write_node_enter(node) }
  super
  listeners[:on_call_operator_write_node_leave]&.each { |listener| listener.on_call_operator_write_node_leave(node) }
end
visit_call_or_write_node(node) 点击切换源代码

CallOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 232
def visit_call_or_write_node(node)
  listeners[:on_call_or_write_node_enter]&.each { |listener| listener.on_call_or_write_node_enter(node) }
  super
  listeners[:on_call_or_write_node_leave]&.each { |listener| listener.on_call_or_write_node_leave(node) }
end
visit_call_target_node(node) 点击切换源代码

CallTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 240
def visit_call_target_node(node)
  listeners[:on_call_target_node_enter]&.each { |listener| listener.on_call_target_node_enter(node) }
  super
  listeners[:on_call_target_node_leave]&.each { |listener| listener.on_call_target_node_leave(node) }
end
visit_capture_pattern_node(node) 点击切换源代码

CapturePatternNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 248
def visit_capture_pattern_node(node)
  listeners[:on_capture_pattern_node_enter]&.each { |listener| listener.on_capture_pattern_node_enter(node) }
  super
  listeners[:on_capture_pattern_node_leave]&.each { |listener| listener.on_capture_pattern_node_leave(node) }
end
visit_case_match_node(node) 点击切换源代码

CaseMatchNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 256
def visit_case_match_node(node)
  listeners[:on_case_match_node_enter]&.each { |listener| listener.on_case_match_node_enter(node) }
  super
  listeners[:on_case_match_node_leave]&.each { |listener| listener.on_case_match_node_leave(node) }
end
visit_case_node(node) 点击切换源代码

CaseNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 264
def visit_case_node(node)
  listeners[:on_case_node_enter]&.each { |listener| listener.on_case_node_enter(node) }
  super
  listeners[:on_case_node_leave]&.each { |listener| listener.on_case_node_leave(node) }
end
visit_class_node(node) 点击切换源代码

ClassNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 272
def visit_class_node(node)
  listeners[:on_class_node_enter]&.each { |listener| listener.on_class_node_enter(node) }
  super
  listeners[:on_class_node_leave]&.each { |listener| listener.on_class_node_leave(node) }
end
visit_class_variable_and_write_node(node) 点击切换源代码

ClassVariableAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 280
def visit_class_variable_and_write_node(node)
  listeners[:on_class_variable_and_write_node_enter]&.each { |listener| listener.on_class_variable_and_write_node_enter(node) }
  super
  listeners[:on_class_variable_and_write_node_leave]&.each { |listener| listener.on_class_variable_and_write_node_leave(node) }
end
visit_class_variable_operator_write_node(node) 点击切换源代码

ClassVariableOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 288
def visit_class_variable_operator_write_node(node)
  listeners[:on_class_variable_operator_write_node_enter]&.each { |listener| listener.on_class_variable_operator_write_node_enter(node) }
  super
  listeners[:on_class_variable_operator_write_node_leave]&.each { |listener| listener.on_class_variable_operator_write_node_leave(node) }
end
visit_class_variable_or_write_node(node) 点击切换源代码

ClassVariableOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 296
def visit_class_variable_or_write_node(node)
  listeners[:on_class_variable_or_write_node_enter]&.each { |listener| listener.on_class_variable_or_write_node_enter(node) }
  super
  listeners[:on_class_variable_or_write_node_leave]&.each { |listener| listener.on_class_variable_or_write_node_leave(node) }
end
visit_class_variable_read_node(node) 点击切换源代码

ClassVariableReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 304
def visit_class_variable_read_node(node)
  listeners[:on_class_variable_read_node_enter]&.each { |listener| listener.on_class_variable_read_node_enter(node) }
  super
  listeners[:on_class_variable_read_node_leave]&.each { |listener| listener.on_class_variable_read_node_leave(node) }
end
visit_class_variable_target_node(node) 点击切换源代码

ClassVariableTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 312
def visit_class_variable_target_node(node)
  listeners[:on_class_variable_target_node_enter]&.each { |listener| listener.on_class_variable_target_node_enter(node) }
  super
  listeners[:on_class_variable_target_node_leave]&.each { |listener| listener.on_class_variable_target_node_leave(node) }
end
visit_class_variable_write_node(node) 点击切换源代码

ClassVariableWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 320
def visit_class_variable_write_node(node)
  listeners[:on_class_variable_write_node_enter]&.each { |listener| listener.on_class_variable_write_node_enter(node) }
  super
  listeners[:on_class_variable_write_node_leave]&.each { |listener| listener.on_class_variable_write_node_leave(node) }
end
visit_constant_and_write_node(node) 点击切换源代码

ConstantAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 328
def visit_constant_and_write_node(node)
  listeners[:on_constant_and_write_node_enter]&.each { |listener| listener.on_constant_and_write_node_enter(node) }
  super
  listeners[:on_constant_and_write_node_leave]&.each { |listener| listener.on_constant_and_write_node_leave(node) }
end
visit_constant_operator_write_node(node) 点击切换源代码

ConstantOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 336
def visit_constant_operator_write_node(node)
  listeners[:on_constant_operator_write_node_enter]&.each { |listener| listener.on_constant_operator_write_node_enter(node) }
  super
  listeners[:on_constant_operator_write_node_leave]&.each { |listener| listener.on_constant_operator_write_node_leave(node) }
end
visit_constant_or_write_node(node) 点击切换源代码

ConstantOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 344
def visit_constant_or_write_node(node)
  listeners[:on_constant_or_write_node_enter]&.each { |listener| listener.on_constant_or_write_node_enter(node) }
  super
  listeners[:on_constant_or_write_node_leave]&.each { |listener| listener.on_constant_or_write_node_leave(node) }
end
visit_constant_path_and_write_node(node) 点击切换源代码

ConstantPathAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 352
def visit_constant_path_and_write_node(node)
  listeners[:on_constant_path_and_write_node_enter]&.each { |listener| listener.on_constant_path_and_write_node_enter(node) }
  super
  listeners[:on_constant_path_and_write_node_leave]&.each { |listener| listener.on_constant_path_and_write_node_leave(node) }
end
visit_constant_path_node(node) 点击切换源代码

ConstantPathNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 360
def visit_constant_path_node(node)
  listeners[:on_constant_path_node_enter]&.each { |listener| listener.on_constant_path_node_enter(node) }
  super
  listeners[:on_constant_path_node_leave]&.each { |listener| listener.on_constant_path_node_leave(node) }
end
visit_constant_path_operator_write_node(node) 点击切换源代码

ConstantPathOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 368
def visit_constant_path_operator_write_node(node)
  listeners[:on_constant_path_operator_write_node_enter]&.each { |listener| listener.on_constant_path_operator_write_node_enter(node) }
  super
  listeners[:on_constant_path_operator_write_node_leave]&.each { |listener| listener.on_constant_path_operator_write_node_leave(node) }
end
visit_constant_path_or_write_node(node) 点击切换源代码

ConstantPathOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 376
def visit_constant_path_or_write_node(node)
  listeners[:on_constant_path_or_write_node_enter]&.each { |listener| listener.on_constant_path_or_write_node_enter(node) }
  super
  listeners[:on_constant_path_or_write_node_leave]&.each { |listener| listener.on_constant_path_or_write_node_leave(node) }
end
visit_constant_path_target_node(node) 点击切换源代码

ConstantPathTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 384
def visit_constant_path_target_node(node)
  listeners[:on_constant_path_target_node_enter]&.each { |listener| listener.on_constant_path_target_node_enter(node) }
  super
  listeners[:on_constant_path_target_node_leave]&.each { |listener| listener.on_constant_path_target_node_leave(node) }
end
visit_constant_path_write_node(node) 点击切换源代码

ConstantPathWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 392
def visit_constant_path_write_node(node)
  listeners[:on_constant_path_write_node_enter]&.each { |listener| listener.on_constant_path_write_node_enter(node) }
  super
  listeners[:on_constant_path_write_node_leave]&.each { |listener| listener.on_constant_path_write_node_leave(node) }
end
visit_constant_read_node(node) 点击切换源代码

ConstantReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 400
def visit_constant_read_node(node)
  listeners[:on_constant_read_node_enter]&.each { |listener| listener.on_constant_read_node_enter(node) }
  super
  listeners[:on_constant_read_node_leave]&.each { |listener| listener.on_constant_read_node_leave(node) }
end
visit_constant_target_node(node) 点击切换源代码

ConstantTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 408
def visit_constant_target_node(node)
  listeners[:on_constant_target_node_enter]&.each { |listener| listener.on_constant_target_node_enter(node) }
  super
  listeners[:on_constant_target_node_leave]&.each { |listener| listener.on_constant_target_node_leave(node) }
end
visit_constant_write_node(node) 点击切换源代码

ConstantWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 416
def visit_constant_write_node(node)
  listeners[:on_constant_write_node_enter]&.each { |listener| listener.on_constant_write_node_enter(node) }
  super
  listeners[:on_constant_write_node_leave]&.each { |listener| listener.on_constant_write_node_leave(node) }
end
visit_def_node(node) 点击切换源代码

DefNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 424
def visit_def_node(node)
  listeners[:on_def_node_enter]&.each { |listener| listener.on_def_node_enter(node) }
  super
  listeners[:on_def_node_leave]&.each { |listener| listener.on_def_node_leave(node) }
end
visit_defined_node(node) 点击切换源代码

DefinedNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 432
def visit_defined_node(node)
  listeners[:on_defined_node_enter]&.each { |listener| listener.on_defined_node_enter(node) }
  super
  listeners[:on_defined_node_leave]&.each { |listener| listener.on_defined_node_leave(node) }
end
visit_else_node(node) 点击切换源代码

ElseNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 440
def visit_else_node(node)
  listeners[:on_else_node_enter]&.each { |listener| listener.on_else_node_enter(node) }
  super
  listeners[:on_else_node_leave]&.each { |listener| listener.on_else_node_leave(node) }
end
visit_embedded_statements_node(node) 点击切换源代码

EmbeddedStatementsNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 448
def visit_embedded_statements_node(node)
  listeners[:on_embedded_statements_node_enter]&.each { |listener| listener.on_embedded_statements_node_enter(node) }
  super
  listeners[:on_embedded_statements_node_leave]&.each { |listener| listener.on_embedded_statements_node_leave(node) }
end
visit_embedded_variable_node(node) 点击切换源代码

EmbeddedVariableNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 456
def visit_embedded_variable_node(node)
  listeners[:on_embedded_variable_node_enter]&.each { |listener| listener.on_embedded_variable_node_enter(node) }
  super
  listeners[:on_embedded_variable_node_leave]&.each { |listener| listener.on_embedded_variable_node_leave(node) }
end
visit_ensure_node(node) 点击切换源代码

EnsureNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 464
def visit_ensure_node(node)
  listeners[:on_ensure_node_enter]&.each { |listener| listener.on_ensure_node_enter(node) }
  super
  listeners[:on_ensure_node_leave]&.each { |listener| listener.on_ensure_node_leave(node) }
end
visit_false_node(node) 点击切换源代码

FalseNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 472
def visit_false_node(node)
  listeners[:on_false_node_enter]&.each { |listener| listener.on_false_node_enter(node) }
  super
  listeners[:on_false_node_leave]&.each { |listener| listener.on_false_node_leave(node) }
end
visit_find_pattern_node(node) 点击切换源代码

FindPatternNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 480
def visit_find_pattern_node(node)
  listeners[:on_find_pattern_node_enter]&.each { |listener| listener.on_find_pattern_node_enter(node) }
  super
  listeners[:on_find_pattern_node_leave]&.each { |listener| listener.on_find_pattern_node_leave(node) }
end
visit_flip_flop_node(node) 点击切换源代码

FlipFlopNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 488
def visit_flip_flop_node(node)
  listeners[:on_flip_flop_node_enter]&.each { |listener| listener.on_flip_flop_node_enter(node) }
  super
  listeners[:on_flip_flop_node_leave]&.each { |listener| listener.on_flip_flop_node_leave(node) }
end
visit_float_node(node) 点击切换源代码

FloatNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 496
def visit_float_node(node)
  listeners[:on_float_node_enter]&.each { |listener| listener.on_float_node_enter(node) }
  super
  listeners[:on_float_node_leave]&.each { |listener| listener.on_float_node_leave(node) }
end
visit_for_node(node) 点击切换源代码

ForNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 504
def visit_for_node(node)
  listeners[:on_for_node_enter]&.each { |listener| listener.on_for_node_enter(node) }
  super
  listeners[:on_for_node_leave]&.each { |listener| listener.on_for_node_leave(node) }
end
visit_forwarding_arguments_node(node) 点击切换源代码

ForwardingArgumentsNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 512
def visit_forwarding_arguments_node(node)
  listeners[:on_forwarding_arguments_node_enter]&.each { |listener| listener.on_forwarding_arguments_node_enter(node) }
  super
  listeners[:on_forwarding_arguments_node_leave]&.each { |listener| listener.on_forwarding_arguments_node_leave(node) }
end
visit_forwarding_parameter_node(node) 点击切换源代码

ForwardingParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 520
def visit_forwarding_parameter_node(node)
  listeners[:on_forwarding_parameter_node_enter]&.each { |listener| listener.on_forwarding_parameter_node_enter(node) }
  super
  listeners[:on_forwarding_parameter_node_leave]&.each { |listener| listener.on_forwarding_parameter_node_leave(node) }
end
visit_forwarding_super_node(node) 点击切换源代码

ForwardingSuperNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 528
def visit_forwarding_super_node(node)
  listeners[:on_forwarding_super_node_enter]&.each { |listener| listener.on_forwarding_super_node_enter(node) }
  super
  listeners[:on_forwarding_super_node_leave]&.each { |listener| listener.on_forwarding_super_node_leave(node) }
end
visit_global_variable_and_write_node(node) 点击切换源代码

GlobalVariableAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 536
def visit_global_variable_and_write_node(node)
  listeners[:on_global_variable_and_write_node_enter]&.each { |listener| listener.on_global_variable_and_write_node_enter(node) }
  super
  listeners[:on_global_variable_and_write_node_leave]&.each { |listener| listener.on_global_variable_and_write_node_leave(node) }
end
visit_global_variable_operator_write_node(node) 点击切换源代码

GlobalVariableOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 544
def visit_global_variable_operator_write_node(node)
  listeners[:on_global_variable_operator_write_node_enter]&.each { |listener| listener.on_global_variable_operator_write_node_enter(node) }
  super
  listeners[:on_global_variable_operator_write_node_leave]&.each { |listener| listener.on_global_variable_operator_write_node_leave(node) }
end
visit_global_variable_or_write_node(node) 点击切换源代码

GlobalVariableOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 552
def visit_global_variable_or_write_node(node)
  listeners[:on_global_variable_or_write_node_enter]&.each { |listener| listener.on_global_variable_or_write_node_enter(node) }
  super
  listeners[:on_global_variable_or_write_node_leave]&.each { |listener| listener.on_global_variable_or_write_node_leave(node) }
end
visit_global_variable_read_node(node) 点击切换源代码

GlobalVariableReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 560
def visit_global_variable_read_node(node)
  listeners[:on_global_variable_read_node_enter]&.each { |listener| listener.on_global_variable_read_node_enter(node) }
  super
  listeners[:on_global_variable_read_node_leave]&.each { |listener| listener.on_global_variable_read_node_leave(node) }
end
visit_global_variable_target_node(node) 点击切换源代码

GlobalVariableTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 568
def visit_global_variable_target_node(node)
  listeners[:on_global_variable_target_node_enter]&.each { |listener| listener.on_global_variable_target_node_enter(node) }
  super
  listeners[:on_global_variable_target_node_leave]&.each { |listener| listener.on_global_variable_target_node_leave(node) }
end
visit_global_variable_write_node(node) 点击切换源代码

GlobalVariableWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 576
def visit_global_variable_write_node(node)
  listeners[:on_global_variable_write_node_enter]&.each { |listener| listener.on_global_variable_write_node_enter(node) }
  super
  listeners[:on_global_variable_write_node_leave]&.each { |listener| listener.on_global_variable_write_node_leave(node) }
end
visit_hash_node(node) 点击切换源代码

HashNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 584
def visit_hash_node(node)
  listeners[:on_hash_node_enter]&.each { |listener| listener.on_hash_node_enter(node) }
  super
  listeners[:on_hash_node_leave]&.each { |listener| listener.on_hash_node_leave(node) }
end
visit_hash_pattern_node(node) 点击切换源码

HashPatternNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 592
def visit_hash_pattern_node(node)
  listeners[:on_hash_pattern_node_enter]&.each { |listener| listener.on_hash_pattern_node_enter(node) }
  super
  listeners[:on_hash_pattern_node_leave]&.each { |listener| listener.on_hash_pattern_node_leave(node) }
end
visit_if_node(node) 点击切换源码

IfNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 600
def visit_if_node(node)
  listeners[:on_if_node_enter]&.each { |listener| listener.on_if_node_enter(node) }
  super
  listeners[:on_if_node_leave]&.each { |listener| listener.on_if_node_leave(node) }
end
visit_imaginary_node(node) 点击切换源码

ImaginaryNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 608
def visit_imaginary_node(node)
  listeners[:on_imaginary_node_enter]&.each { |listener| listener.on_imaginary_node_enter(node) }
  super
  listeners[:on_imaginary_node_leave]&.each { |listener| listener.on_imaginary_node_leave(node) }
end
visit_implicit_node(node) 点击切换源码

ImplicitNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 616
def visit_implicit_node(node)
  listeners[:on_implicit_node_enter]&.each { |listener| listener.on_implicit_node_enter(node) }
  super
  listeners[:on_implicit_node_leave]&.each { |listener| listener.on_implicit_node_leave(node) }
end
visit_implicit_rest_node(node) 点击切换源码

ImplicitRestNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 624
def visit_implicit_rest_node(node)
  listeners[:on_implicit_rest_node_enter]&.each { |listener| listener.on_implicit_rest_node_enter(node) }
  super
  listeners[:on_implicit_rest_node_leave]&.each { |listener| listener.on_implicit_rest_node_leave(node) }
end
visit_in_node(node) 点击切换源码

InNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 632
def visit_in_node(node)
  listeners[:on_in_node_enter]&.each { |listener| listener.on_in_node_enter(node) }
  super
  listeners[:on_in_node_leave]&.each { |listener| listener.on_in_node_leave(node) }
end
visit_index_and_write_node(node) 点击切换源码

IndexAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 640
def visit_index_and_write_node(node)
  listeners[:on_index_and_write_node_enter]&.each { |listener| listener.on_index_and_write_node_enter(node) }
  super
  listeners[:on_index_and_write_node_leave]&.each { |listener| listener.on_index_and_write_node_leave(node) }
end
visit_index_operator_write_node(node) 点击切换源码

IndexOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 648
def visit_index_operator_write_node(node)
  listeners[:on_index_operator_write_node_enter]&.each { |listener| listener.on_index_operator_write_node_enter(node) }
  super
  listeners[:on_index_operator_write_node_leave]&.each { |listener| listener.on_index_operator_write_node_leave(node) }
end
visit_index_or_write_node(node) 点击切换源码

IndexOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 656
def visit_index_or_write_node(node)
  listeners[:on_index_or_write_node_enter]&.each { |listener| listener.on_index_or_write_node_enter(node) }
  super
  listeners[:on_index_or_write_node_leave]&.each { |listener| listener.on_index_or_write_node_leave(node) }
end
visit_index_target_node(node) 点击切换源码

IndexTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 664
def visit_index_target_node(node)
  listeners[:on_index_target_node_enter]&.each { |listener| listener.on_index_target_node_enter(node) }
  super
  listeners[:on_index_target_node_leave]&.each { |listener| listener.on_index_target_node_leave(node) }
end
visit_instance_variable_and_write_node(node) 点击切换源码

InstanceVariableAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 672
def visit_instance_variable_and_write_node(node)
  listeners[:on_instance_variable_and_write_node_enter]&.each { |listener| listener.on_instance_variable_and_write_node_enter(node) }
  super
  listeners[:on_instance_variable_and_write_node_leave]&.each { |listener| listener.on_instance_variable_and_write_node_leave(node) }
end
visit_instance_variable_operator_write_node(node) 点击切换源码

InstanceVariableOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 680
def visit_instance_variable_operator_write_node(node)
  listeners[:on_instance_variable_operator_write_node_enter]&.each { |listener| listener.on_instance_variable_operator_write_node_enter(node) }
  super
  listeners[:on_instance_variable_operator_write_node_leave]&.each { |listener| listener.on_instance_variable_operator_write_node_leave(node) }
end
visit_instance_variable_or_write_node(node) 点击切换源码

InstanceVariableOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 688
def visit_instance_variable_or_write_node(node)
  listeners[:on_instance_variable_or_write_node_enter]&.each { |listener| listener.on_instance_variable_or_write_node_enter(node) }
  super
  listeners[:on_instance_variable_or_write_node_leave]&.each { |listener| listener.on_instance_variable_or_write_node_leave(node) }
end
visit_instance_variable_read_node(node) 点击切换源码

InstanceVariableReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 696
def visit_instance_variable_read_node(node)
  listeners[:on_instance_variable_read_node_enter]&.each { |listener| listener.on_instance_variable_read_node_enter(node) }
  super
  listeners[:on_instance_variable_read_node_leave]&.each { |listener| listener.on_instance_variable_read_node_leave(node) }
end
visit_instance_variable_target_node(node) 点击切换源码

InstanceVariableTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 704
def visit_instance_variable_target_node(node)
  listeners[:on_instance_variable_target_node_enter]&.each { |listener| listener.on_instance_variable_target_node_enter(node) }
  super
  listeners[:on_instance_variable_target_node_leave]&.each { |listener| listener.on_instance_variable_target_node_leave(node) }
end
visit_instance_variable_write_node(node) 点击切换源码

InstanceVariableWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 712
def visit_instance_variable_write_node(node)
  listeners[:on_instance_variable_write_node_enter]&.each { |listener| listener.on_instance_variable_write_node_enter(node) }
  super
  listeners[:on_instance_variable_write_node_leave]&.each { |listener| listener.on_instance_variable_write_node_leave(node) }
end
visit_integer_node(node) 点击切换源码

IntegerNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 720
def visit_integer_node(node)
  listeners[:on_integer_node_enter]&.each { |listener| listener.on_integer_node_enter(node) }
  super
  listeners[:on_integer_node_leave]&.each { |listener| listener.on_integer_node_leave(node) }
end
visit_interpolated_match_last_line_node(node) 点击切换源码

InterpolatedMatchLastLineNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 728
def visit_interpolated_match_last_line_node(node)
  listeners[:on_interpolated_match_last_line_node_enter]&.each { |listener| listener.on_interpolated_match_last_line_node_enter(node) }
  super
  listeners[:on_interpolated_match_last_line_node_leave]&.each { |listener| listener.on_interpolated_match_last_line_node_leave(node) }
end
visit_interpolated_regular_expression_node(node) 点击切换源码

InterpolatedRegularExpressionNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 736
def visit_interpolated_regular_expression_node(node)
  listeners[:on_interpolated_regular_expression_node_enter]&.each { |listener| listener.on_interpolated_regular_expression_node_enter(node) }
  super
  listeners[:on_interpolated_regular_expression_node_leave]&.each { |listener| listener.on_interpolated_regular_expression_node_leave(node) }
end
visit_interpolated_string_node(node) 点击切换源码

InterpolatedStringNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 744
def visit_interpolated_string_node(node)
  listeners[:on_interpolated_string_node_enter]&.each { |listener| listener.on_interpolated_string_node_enter(node) }
  super
  listeners[:on_interpolated_string_node_leave]&.each { |listener| listener.on_interpolated_string_node_leave(node) }
end
visit_interpolated_symbol_node(node) 点击切换源码

InterpolatedSymbolNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 752
def visit_interpolated_symbol_node(node)
  listeners[:on_interpolated_symbol_node_enter]&.each { |listener| listener.on_interpolated_symbol_node_enter(node) }
  super
  listeners[:on_interpolated_symbol_node_leave]&.each { |listener| listener.on_interpolated_symbol_node_leave(node) }
end
visit_interpolated_x_string_node(node) 点击切换源码

InterpolatedXStringNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 760
def visit_interpolated_x_string_node(node)
  listeners[:on_interpolated_x_string_node_enter]&.each { |listener| listener.on_interpolated_x_string_node_enter(node) }
  super
  listeners[:on_interpolated_x_string_node_leave]&.each { |listener| listener.on_interpolated_x_string_node_leave(node) }
end
visit_it_local_variable_read_node(node) 点击切换源码

ItLocalVariableReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 768
def visit_it_local_variable_read_node(node)
  listeners[:on_it_local_variable_read_node_enter]&.each { |listener| listener.on_it_local_variable_read_node_enter(node) }
  super
  listeners[:on_it_local_variable_read_node_leave]&.each { |listener| listener.on_it_local_variable_read_node_leave(node) }
end
visit_it_parameters_node(node) 点击切换源码

ItParametersNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 776
def visit_it_parameters_node(node)
  listeners[:on_it_parameters_node_enter]&.each { |listener| listener.on_it_parameters_node_enter(node) }
  super
  listeners[:on_it_parameters_node_leave]&.each { |listener| listener.on_it_parameters_node_leave(node) }
end
visit_keyword_hash_node(node) 点击切换源码

KeywordHashNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 784
def visit_keyword_hash_node(node)
  listeners[:on_keyword_hash_node_enter]&.each { |listener| listener.on_keyword_hash_node_enter(node) }
  super
  listeners[:on_keyword_hash_node_leave]&.each { |listener| listener.on_keyword_hash_node_leave(node) }
end
visit_keyword_rest_parameter_node(node) 点击切换源码

KeywordRestParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 792
def visit_keyword_rest_parameter_node(node)
  listeners[:on_keyword_rest_parameter_node_enter]&.each { |listener| listener.on_keyword_rest_parameter_node_enter(node) }
  super
  listeners[:on_keyword_rest_parameter_node_leave]&.each { |listener| listener.on_keyword_rest_parameter_node_leave(node) }
end
visit_lambda_node(node) 点击切换源码

LambdaNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 800
def visit_lambda_node(node)
  listeners[:on_lambda_node_enter]&.each { |listener| listener.on_lambda_node_enter(node) }
  super
  listeners[:on_lambda_node_leave]&.each { |listener| listener.on_lambda_node_leave(node) }
end
visit_local_variable_and_write_node(node) 点击切换源码

LocalVariableAndWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 808
def visit_local_variable_and_write_node(node)
  listeners[:on_local_variable_and_write_node_enter]&.each { |listener| listener.on_local_variable_and_write_node_enter(node) }
  super
  listeners[:on_local_variable_and_write_node_leave]&.each { |listener| listener.on_local_variable_and_write_node_leave(node) }
end
visit_local_variable_operator_write_node(node) 点击切换源码

LocalVariableOperatorWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 816
def visit_local_variable_operator_write_node(node)
  listeners[:on_local_variable_operator_write_node_enter]&.each { |listener| listener.on_local_variable_operator_write_node_enter(node) }
  super
  listeners[:on_local_variable_operator_write_node_leave]&.each { |listener| listener.on_local_variable_operator_write_node_leave(node) }
end
visit_local_variable_or_write_node(node) 点击切换源码

LocalVariableOrWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 824
def visit_local_variable_or_write_node(node)
  listeners[:on_local_variable_or_write_node_enter]&.each { |listener| listener.on_local_variable_or_write_node_enter(node) }
  super
  listeners[:on_local_variable_or_write_node_leave]&.each { |listener| listener.on_local_variable_or_write_node_leave(node) }
end
visit_local_variable_read_node(node) 点击切换源码

LocalVariableReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 832
def visit_local_variable_read_node(node)
  listeners[:on_local_variable_read_node_enter]&.each { |listener| listener.on_local_variable_read_node_enter(node) }
  super
  listeners[:on_local_variable_read_node_leave]&.each { |listener| listener.on_local_variable_read_node_leave(node) }
end
visit_local_variable_target_node(node) 点击切换源码

LocalVariableTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 840
def visit_local_variable_target_node(node)
  listeners[:on_local_variable_target_node_enter]&.each { |listener| listener.on_local_variable_target_node_enter(node) }
  super
  listeners[:on_local_variable_target_node_leave]&.each { |listener| listener.on_local_variable_target_node_leave(node) }
end
visit_local_variable_write_node(node) 点击切换源码

LocalVariableWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 848
def visit_local_variable_write_node(node)
  listeners[:on_local_variable_write_node_enter]&.each { |listener| listener.on_local_variable_write_node_enter(node) }
  super
  listeners[:on_local_variable_write_node_leave]&.each { |listener| listener.on_local_variable_write_node_leave(node) }
end
visit_match_last_line_node(node) 点击切换源码

MatchLastLineNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 856
def visit_match_last_line_node(node)
  listeners[:on_match_last_line_node_enter]&.each { |listener| listener.on_match_last_line_node_enter(node) }
  super
  listeners[:on_match_last_line_node_leave]&.each { |listener| listener.on_match_last_line_node_leave(node) }
end
visit_match_predicate_node(node) 点击切换源码

MatchPredicateNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 864
def visit_match_predicate_node(node)
  listeners[:on_match_predicate_node_enter]&.each { |listener| listener.on_match_predicate_node_enter(node) }
  super
  listeners[:on_match_predicate_node_leave]&.each { |listener| listener.on_match_predicate_node_leave(node) }
end
visit_match_required_node(node) 点击切换源码

MatchRequiredNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 872
def visit_match_required_node(node)
  listeners[:on_match_required_node_enter]&.each { |listener| listener.on_match_required_node_enter(node) }
  super
  listeners[:on_match_required_node_leave]&.each { |listener| listener.on_match_required_node_leave(node) }
end
visit_match_write_node(node) 点击切换源码

MatchWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 880
def visit_match_write_node(node)
  listeners[:on_match_write_node_enter]&.each { |listener| listener.on_match_write_node_enter(node) }
  super
  listeners[:on_match_write_node_leave]&.each { |listener| listener.on_match_write_node_leave(node) }
end
visit_missing_node(node) 点击切换源码

MissingNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 888
def visit_missing_node(node)
  listeners[:on_missing_node_enter]&.each { |listener| listener.on_missing_node_enter(node) }
  super
  listeners[:on_missing_node_leave]&.each { |listener| listener.on_missing_node_leave(node) }
end
visit_module_node(node) 点击切换源码

ModuleNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 896
def visit_module_node(node)
  listeners[:on_module_node_enter]&.each { |listener| listener.on_module_node_enter(node) }
  super
  listeners[:on_module_node_leave]&.each { |listener| listener.on_module_node_leave(node) }
end
visit_multi_target_node(node) 点击切换源码

MultiTargetNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 904
def visit_multi_target_node(node)
  listeners[:on_multi_target_node_enter]&.each { |listener| listener.on_multi_target_node_enter(node) }
  super
  listeners[:on_multi_target_node_leave]&.each { |listener| listener.on_multi_target_node_leave(node) }
end
visit_multi_write_node(node) 点击切换源码

MultiWriteNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 912
def visit_multi_write_node(node)
  listeners[:on_multi_write_node_enter]&.each { |listener| listener.on_multi_write_node_enter(node) }
  super
  listeners[:on_multi_write_node_leave]&.each { |listener| listener.on_multi_write_node_leave(node) }
end
visit_next_node(node) 点击切换源码

NextNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 920
def visit_next_node(node)
  listeners[:on_next_node_enter]&.each { |listener| listener.on_next_node_enter(node) }
  super
  listeners[:on_next_node_leave]&.each { |listener| listener.on_next_node_leave(node) }
end
visit_nil_node(node) 点击切换源码

NilNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 928
def visit_nil_node(node)
  listeners[:on_nil_node_enter]&.each { |listener| listener.on_nil_node_enter(node) }
  super
  listeners[:on_nil_node_leave]&.each { |listener| listener.on_nil_node_leave(node) }
end
visit_no_keywords_parameter_node(node) 点击切换源码

NoKeywordsParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 936
def visit_no_keywords_parameter_node(node)
  listeners[:on_no_keywords_parameter_node_enter]&.each { |listener| listener.on_no_keywords_parameter_node_enter(node) }
  super
  listeners[:on_no_keywords_parameter_node_leave]&.each { |listener| listener.on_no_keywords_parameter_node_leave(node) }
end
visit_numbered_parameters_node(node) 点击切换源码

NumberedParametersNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 944
def visit_numbered_parameters_node(node)
  listeners[:on_numbered_parameters_node_enter]&.each { |listener| listener.on_numbered_parameters_node_enter(node) }
  super
  listeners[:on_numbered_parameters_node_leave]&.each { |listener| listener.on_numbered_parameters_node_leave(node) }
end
visit_numbered_reference_read_node(node) 点击切换源码

NumberedReferenceReadNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 952
def visit_numbered_reference_read_node(node)
  listeners[:on_numbered_reference_read_node_enter]&.each { |listener| listener.on_numbered_reference_read_node_enter(node) }
  super
  listeners[:on_numbered_reference_read_node_leave]&.each { |listener| listener.on_numbered_reference_read_node_leave(node) }
end
visit_optional_keyword_parameter_node(node) 点击切换源码

OptionalKeywordParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 960
def visit_optional_keyword_parameter_node(node)
  listeners[:on_optional_keyword_parameter_node_enter]&.each { |listener| listener.on_optional_keyword_parameter_node_enter(node) }
  super
  listeners[:on_optional_keyword_parameter_node_leave]&.each { |listener| listener.on_optional_keyword_parameter_node_leave(node) }
end
visit_optional_parameter_node(node) 点击切换源码

OptionalParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 968
def visit_optional_parameter_node(node)
  listeners[:on_optional_parameter_node_enter]&.each { |listener| listener.on_optional_parameter_node_enter(node) }
  super
  listeners[:on_optional_parameter_node_leave]&.each { |listener| listener.on_optional_parameter_node_leave(node) }
end
visit_or_node(node) 点击切换源码

OrNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 976
def visit_or_node(node)
  listeners[:on_or_node_enter]&.each { |listener| listener.on_or_node_enter(node) }
  super
  listeners[:on_or_node_leave]&.each { |listener| listener.on_or_node_leave(node) }
end
visit_parameters_node(node) 点击以切换源代码

ParametersNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 984
def visit_parameters_node(node)
  listeners[:on_parameters_node_enter]&.each { |listener| listener.on_parameters_node_enter(node) }
  super
  listeners[:on_parameters_node_leave]&.each { |listener| listener.on_parameters_node_leave(node) }
end
visit_parentheses_node(node) 点击以切换源代码

ParenthesesNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 992
def visit_parentheses_node(node)
  listeners[:on_parentheses_node_enter]&.each { |listener| listener.on_parentheses_node_enter(node) }
  super
  listeners[:on_parentheses_node_leave]&.each { |listener| listener.on_parentheses_node_leave(node) }
end
visit_pinned_expression_node(node) 点击以切换源代码

PinnedExpressionNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1000
def visit_pinned_expression_node(node)
  listeners[:on_pinned_expression_node_enter]&.each { |listener| listener.on_pinned_expression_node_enter(node) }
  super
  listeners[:on_pinned_expression_node_leave]&.each { |listener| listener.on_pinned_expression_node_leave(node) }
end
visit_pinned_variable_node(node) 点击以切换源代码

PinnedVariableNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1008
def visit_pinned_variable_node(node)
  listeners[:on_pinned_variable_node_enter]&.each { |listener| listener.on_pinned_variable_node_enter(node) }
  super
  listeners[:on_pinned_variable_node_leave]&.each { |listener| listener.on_pinned_variable_node_leave(node) }
end
visit_post_execution_node(node) 点击以切换源代码

PostExecutionNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1016
def visit_post_execution_node(node)
  listeners[:on_post_execution_node_enter]&.each { |listener| listener.on_post_execution_node_enter(node) }
  super
  listeners[:on_post_execution_node_leave]&.each { |listener| listener.on_post_execution_node_leave(node) }
end
visit_pre_execution_node(node) 点击以切换源代码

PreExecutionNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1024
def visit_pre_execution_node(node)
  listeners[:on_pre_execution_node_enter]&.each { |listener| listener.on_pre_execution_node_enter(node) }
  super
  listeners[:on_pre_execution_node_leave]&.each { |listener| listener.on_pre_execution_node_leave(node) }
end
visit_program_node(node) 点击以切换源代码

ProgramNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1032
def visit_program_node(node)
  listeners[:on_program_node_enter]&.each { |listener| listener.on_program_node_enter(node) }
  super
  listeners[:on_program_node_leave]&.each { |listener| listener.on_program_node_leave(node) }
end
visit_range_node(node) 点击以切换源代码

RangeNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1040
def visit_range_node(node)
  listeners[:on_range_node_enter]&.each { |listener| listener.on_range_node_enter(node) }
  super
  listeners[:on_range_node_leave]&.each { |listener| listener.on_range_node_leave(node) }
end
visit_rational_node(node) 点击以切换源代码

RationalNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1048
def visit_rational_node(node)
  listeners[:on_rational_node_enter]&.each { |listener| listener.on_rational_node_enter(node) }
  super
  listeners[:on_rational_node_leave]&.each { |listener| listener.on_rational_node_leave(node) }
end
visit_redo_node(node) 点击以切换源代码

RedoNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1056
def visit_redo_node(node)
  listeners[:on_redo_node_enter]&.each { |listener| listener.on_redo_node_enter(node) }
  super
  listeners[:on_redo_node_leave]&.each { |listener| listener.on_redo_node_leave(node) }
end
visit_regular_expression_node(node) 点击以切换源代码

RegularExpressionNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1064
def visit_regular_expression_node(node)
  listeners[:on_regular_expression_node_enter]&.each { |listener| listener.on_regular_expression_node_enter(node) }
  super
  listeners[:on_regular_expression_node_leave]&.each { |listener| listener.on_regular_expression_node_leave(node) }
end
visit_required_keyword_parameter_node(node) 点击以切换源代码

RequiredKeywordParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1072
def visit_required_keyword_parameter_node(node)
  listeners[:on_required_keyword_parameter_node_enter]&.each { |listener| listener.on_required_keyword_parameter_node_enter(node) }
  super
  listeners[:on_required_keyword_parameter_node_leave]&.each { |listener| listener.on_required_keyword_parameter_node_leave(node) }
end
visit_required_parameter_node(node) 点击以切换源代码

RequiredParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1080
def visit_required_parameter_node(node)
  listeners[:on_required_parameter_node_enter]&.each { |listener| listener.on_required_parameter_node_enter(node) }
  super
  listeners[:on_required_parameter_node_leave]&.each { |listener| listener.on_required_parameter_node_leave(node) }
end
visit_rescue_modifier_node(node) 点击以切换源代码

RescueModifierNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1088
def visit_rescue_modifier_node(node)
  listeners[:on_rescue_modifier_node_enter]&.each { |listener| listener.on_rescue_modifier_node_enter(node) }
  super
  listeners[:on_rescue_modifier_node_leave]&.each { |listener| listener.on_rescue_modifier_node_leave(node) }
end
visit_rescue_node(node) 点击以切换源代码

RescueNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1096
def visit_rescue_node(node)
  listeners[:on_rescue_node_enter]&.each { |listener| listener.on_rescue_node_enter(node) }
  super
  listeners[:on_rescue_node_leave]&.each { |listener| listener.on_rescue_node_leave(node) }
end
visit_rest_parameter_node(node) 点击以切换源代码

RestParameterNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1104
def visit_rest_parameter_node(node)
  listeners[:on_rest_parameter_node_enter]&.each { |listener| listener.on_rest_parameter_node_enter(node) }
  super
  listeners[:on_rest_parameter_node_leave]&.each { |listener| listener.on_rest_parameter_node_leave(node) }
end
visit_retry_node(node) 点击以切换源代码

RetryNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1112
def visit_retry_node(node)
  listeners[:on_retry_node_enter]&.each { |listener| listener.on_retry_node_enter(node) }
  super
  listeners[:on_retry_node_leave]&.each { |listener| listener.on_retry_node_leave(node) }
end
visit_return_node(node) 点击以切换源代码

ReturnNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1120
def visit_return_node(node)
  listeners[:on_return_node_enter]&.each { |listener| listener.on_return_node_enter(node) }
  super
  listeners[:on_return_node_leave]&.each { |listener| listener.on_return_node_leave(node) }
end
visit_self_node(node) 点击以切换源代码

SelfNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1128
def visit_self_node(node)
  listeners[:on_self_node_enter]&.each { |listener| listener.on_self_node_enter(node) }
  super
  listeners[:on_self_node_leave]&.each { |listener| listener.on_self_node_leave(node) }
end
visit_shareable_constant_node(node) 点击以切换源代码

ShareableConstantNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1136
def visit_shareable_constant_node(node)
  listeners[:on_shareable_constant_node_enter]&.each { |listener| listener.on_shareable_constant_node_enter(node) }
  super
  listeners[:on_shareable_constant_node_leave]&.each { |listener| listener.on_shareable_constant_node_leave(node) }
end
visit_singleton_class_node(node) 点击以切换源代码

SingletonClassNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1144
def visit_singleton_class_node(node)
  listeners[:on_singleton_class_node_enter]&.each { |listener| listener.on_singleton_class_node_enter(node) }
  super
  listeners[:on_singleton_class_node_leave]&.each { |listener| listener.on_singleton_class_node_leave(node) }
end
visit_source_encoding_node(node) 点击以切换源代码

SourceEncodingNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1152
def visit_source_encoding_node(node)
  listeners[:on_source_encoding_node_enter]&.each { |listener| listener.on_source_encoding_node_enter(node) }
  super
  listeners[:on_source_encoding_node_leave]&.each { |listener| listener.on_source_encoding_node_leave(node) }
end
visit_source_file_node(node) 点击以切换源代码

SourceFileNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1160
def visit_source_file_node(node)
  listeners[:on_source_file_node_enter]&.each { |listener| listener.on_source_file_node_enter(node) }
  super
  listeners[:on_source_file_node_leave]&.each { |listener| listener.on_source_file_node_leave(node) }
end
visit_source_line_node(node) 点击以切换源代码

SourceLineNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1168
def visit_source_line_node(node)
  listeners[:on_source_line_node_enter]&.each { |listener| listener.on_source_line_node_enter(node) }
  super
  listeners[:on_source_line_node_leave]&.each { |listener| listener.on_source_line_node_leave(node) }
end
visit_splat_node(node) 点击以切换源代码

SplatNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1176
def visit_splat_node(node)
  listeners[:on_splat_node_enter]&.each { |listener| listener.on_splat_node_enter(node) }
  super
  listeners[:on_splat_node_leave]&.each { |listener| listener.on_splat_node_leave(node) }
end
visit_statements_node(node) 点击以切换源代码

StatementsNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1184
def visit_statements_node(node)
  listeners[:on_statements_node_enter]&.each { |listener| listener.on_statements_node_enter(node) }
  super
  listeners[:on_statements_node_leave]&.each { |listener| listener.on_statements_node_leave(node) }
end
visit_string_node(node) 点击以切换源代码

StringNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1192
def visit_string_node(node)
  listeners[:on_string_node_enter]&.each { |listener| listener.on_string_node_enter(node) }
  super
  listeners[:on_string_node_leave]&.each { |listener| listener.on_string_node_leave(node) }
end
visit_super_node(node) 点击以切换源代码

SuperNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1200
def visit_super_node(node)
  listeners[:on_super_node_enter]&.each { |listener| listener.on_super_node_enter(node) }
  super
  listeners[:on_super_node_leave]&.each { |listener| listener.on_super_node_leave(node) }
end
visit_symbol_node(node) 点击以切换源代码

SymbolNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1208
def visit_symbol_node(node)
  listeners[:on_symbol_node_enter]&.each { |listener| listener.on_symbol_node_enter(node) }
  super
  listeners[:on_symbol_node_leave]&.each { |listener| listener.on_symbol_node_leave(node) }
end
visit_true_node(node) 点击以切换源代码

TrueNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1216
def visit_true_node(node)
  listeners[:on_true_node_enter]&.each { |listener| listener.on_true_node_enter(node) }
  super
  listeners[:on_true_node_leave]&.each { |listener| listener.on_true_node_leave(node) }
end
visit_undef_node(node) 点击以切换源代码

UndefNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1224
def visit_undef_node(node)
  listeners[:on_undef_node_enter]&.each { |listener| listener.on_undef_node_enter(node) }
  super
  listeners[:on_undef_node_leave]&.each { |listener| listener.on_undef_node_leave(node) }
end
visit_unless_node(node) 点击以切换源代码

UnlessNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1232
def visit_unless_node(node)
  listeners[:on_unless_node_enter]&.each { |listener| listener.on_unless_node_enter(node) }
  super
  listeners[:on_unless_node_leave]&.each { |listener| listener.on_unless_node_leave(node) }
end
visit_until_node(node) 点击以切换源代码

UntilNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1240
def visit_until_node(node)
  listeners[:on_until_node_enter]&.each { |listener| listener.on_until_node_enter(node) }
  super
  listeners[:on_until_node_leave]&.each { |listener| listener.on_until_node_leave(node) }
end
visit_when_node(node) 点击以切换源代码

WhenNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1248
def visit_when_node(node)
  listeners[:on_when_node_enter]&.each { |listener| listener.on_when_node_enter(node) }
  super
  listeners[:on_when_node_leave]&.each { |listener| listener.on_when_node_leave(node) }
end
visit_while_node(node) 点击以切换源代码

WhileNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1256
def visit_while_node(node)
  listeners[:on_while_node_enter]&.each { |listener| listener.on_while_node_enter(node) }
  super
  listeners[:on_while_node_leave]&.each { |listener| listener.on_while_node_leave(node) }
end
visit_x_string_node(node) 点击以切换源代码

XStringNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1264
def visit_x_string_node(node)
  listeners[:on_x_string_node_enter]&.each { |listener| listener.on_x_string_node_enter(node) }
  super
  listeners[:on_x_string_node_leave]&.each { |listener| listener.on_x_string_node_leave(node) }
end
visit_yield_node(node) 点击以切换源代码

YieldNode 节点分发进入和离开事件,并继续遍历树。

调用超类方法
# File prism/dispatcher.rb, line 1272
def visit_yield_node(node)
  listeners[:on_yield_node_enter]&.each { |listener| listener.on_yield_node_enter(node) }
  super
  listeners[:on_yield_node_leave]&.each { |listener| listener.on_yield_node_leave(node) }
end