# File lib/compass/sass_extensions/functions/gradient_support.rb, line 120
    def color_stops(*args)
      List.new(*args.map do |arg|
        case arg
        when Sass::Script::Color
          ColorStop.new(arg)
        when Sass::Script::String
          # We get a string as the result of concatenation
          # So we have to reparse the expression
          color = stop = nil
          expr = Sass::Script::Parser.parse(arg.value, 0, 0)
          case expr
          when Sass::Script::Color
            color = expr
          when Sass::Script::Funcall
            color = expr
          when Sass::Script::Operation
            unless expr.instance_variable_get("@operator") == :concat
              # This should never happen.
              raise Sass::SyntaxError, "Couldn't parse a color stop from: #{arg.value}"
            end
            color = expr.instance_variable_get("@operand1")
            stop = expr.instance_variable_get("@operand2")
          else
            raise Sass::SyntaxError, "Couldn't parse a color stop from: #{arg.value}"
          end
          ColorStop.new(color, stop)
        else
          raise Sass::SyntaxError, "Not a valid color stop: #{arg}"
        end
      end)
    end