module RuboCop::AST::NodePattern::MethodDefiner

def emit_node_search_body(method_name, prelude:, on_match:)

def emit_node_search_body(method_name, prelude:, on_match:)
  <<~RUBY
    def #{method_name}(#{emit_params('param0')})
      #{compile_init}
      #{prelude}
      param0.each_node do |#{VAR}|
        if #{match_code}
          #{on_match}
        end
      end
      nil
    end
  RUBY
end