class Rufo::Formatter

def visit_comma_separated_list(nodes)

def visit_comma_separated_list(nodes)
  needs_indent = false
  if newline? || comment?
    needs_indent = true
    base_column = next_indent
    consume_end_of_line
    write_indent(base_column)
  else
    base_column = @column
  end
  nodes = to_ary(nodes)
  nodes.each_with_index do |exp, i|
    maybe_indent(needs_indent, base_column) do
      if block_given?
        yield exp
      else
        visit exp
      end
    end
    next if last?(i, nodes)
    skip_space
    check :on_comma
    write ","
    next_token
    first_space = skip_space
    if newline? || comment?
      indent(base_column || @indent) do
        consume_end_of_line(want_multiline: false, first_space: first_space)
        write_indent
      end
    else
      write_space_using_setting(first_space, @spaces_after_comma)
    end
  end
end