class Rufo::Formatter

def visit_call_with_receiver(node)

def visit_call_with_receiver(node)
  # [:call, obj, :".", call]
  _, obj, text, call = node
  @dot_column = nil
  visit obj
  skip_space
  if newline? || comment?
    consume_end_of_line
    write_indent(@dot_column || next_indent)
  end
  # Remember dot column
  dot_column = @column
  consume_call_dot
  skip_space
  if newline? || comment?
    consume_end_of_line
    write_indent(next_indent)
  else
    skip_space_or_newline
  end
  visit call
  # Only set it after we visit the call after the dot,
  # so we remember the outmost dot position
  @dot_column = dot_column
end