class Rufo::Formatter

def visit_string_literal_end(node)

def visit_string_literal_end(node)
  inner = node[1]
  inner = inner[1..-1] unless node[0] == :xstring_literal
  visit_exps(inner, with_lines: false)
  case current_token_kind
  when :on_heredoc_end
    heredoc, tilde = @current_heredoc
    if heredoc && tilde
      write_indent
      write current_token_value.strip
    else
      write current_token_value.rstrip
    end
    next_token
    skip_space
    # Simulate a newline after the heredoc
    @tokens << [[0, 0], :on_ignored_nl, "\n"]
  when :on_backtick
    consume_token :on_backtick
  else
    consume_token :on_tstring_end
  end
end