function splitSelector(selector) {
  if(selector.indexOf(',') === -1) {
    return [selector]
  }

  var indices = [], res = [], inParen = 0, o
  /*eslint-disable no-cond-assign*/
  while (o = selectorTokenizer.exec(selector)) {
  /*eslint-enable no-cond-assign*/
    switch (o[0]) {
    case '(': inParen++; break
    case ')': inParen--; break
    case ',': if (inParen) break; indices.push(o.index)
    }
  }
  for (o = indices.length; o--;){
    res.unshift(selector.slice(indices[o] + 1))
    selector = selector.slice(0, indices[o])
  }
  res.unshift(selector)
  return res
}
This will split a coma-separated selector list into individual selectors,
ignoring comas in strings, comments and in :pseudo-selectors(parameter, lists).

@param {string} selector
@return {string[]}