module RuboCop::AST::Descendence
def visit_descendants(types, &block)
def visit_descendants(types, &block) children.each do |child| next unless child.is_a?(::AST::Node) yield child if types.empty? || types.include?(child.type) child.visit_descendants(types, &block) end end