class Rufo::Formatter

def visit_def_from_name(name, params, body)

def visit_def_from_name(name, params, body)
  visit name
  params = params[1] if params[0] == :paren
  skip_space
  if current_token_kind == :on_lparen
    next_token
    skip_space
    skip_semicolons
    if empty_params?(params)
      skip_space_or_newline
      check :on_rparen
      next_token
      write "()"
    else
      write "("
      if newline? || comment?
        column = @column
        indent(column) do
          consume_end_of_line
          write_indent
          visit params
        end
      else
        indent(@column) do
          visit params
        end
      end
      skip_space_or_newline
      check :on_rparen
      write ")"
      next_token
    end
  elsif !empty_params?(params)
    if parens_in_def == :yes
      write "("
    else
      write_space
    end
    visit params
    write ")" if parens_in_def == :yes
    skip_space
  end
  visit body
end