def find_comma_position(arg) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
      offset = 0
      pos = arg.source_range.end_pos

      if character_at(pos, offset) != ','
        loop do
          offset += 1
          break if (right_char = character_at(pos, offset)) == ','
          offset = -offset
          break if (left_char = character_at(pos, offset)) == ','
          offset = -offset

          next unless right_char.nil? && left_char.nil?
          offset = 0
          pos = Sass::Source::Position.new(pos.line + 1, 1)
          break if character_at(pos, offset) == ','
        end
      end

      Sass::Source::Position.new(pos.line, pos.offset + offset)
    end
def find_comma_position(arg) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
      offset = 0
      pos = arg.source_range.end_pos

      if character_at(pos, offset) != ','
        loop do
          offset += 1
          break if (right_char = character_at(pos, offset)) == ','
          offset = -offset
          break if (left_char = character_at(pos, offset)) == ','
          offset = -offset

          next unless right_char.nil? && left_char.nil?
          offset = 0
          pos = Sass::Source::Position.new(pos.line + 1, 1)
          break if character_at(pos, offset) == ','
        end
      end

      Sass::Source::Position.new(pos.line, pos.offset + offset)
    end
Find the comma following this argument.

 The Sass parser is unpredictable in where it marks the end of the
 source range. Thus we need to start at the indicated range, and check
 left and right of that range, gradually moving further outward until
 we find the comma.