class Sass::Script::Tree::StringInterpolation

def quote_for(string_or_interp)

def quote_for(string_or_interp)
  if string_or_interp.is_a?(Sass::Script::Tree::Literal)
    return nil if string_or_interp.value.value.empty?
    return '"' if string_or_interp.value.value.include?("'")
    return "'" if string_or_interp.value.value.include?('"')
    return nil
  end
  # Double-quotes take precedence over single quotes.
  before_quote = quote_for(string_or_interp.before)
  return '"' if before_quote == '"'
  after_quote = quote_for(string_or_interp.after)
  return '"' if after_quote == '"'
  # Returns "'" if either or both insist on single quotes, and nil
  # otherwise.
  before_quote || after_quote
end