src/sass/parse.js
function checkSelector2(i) {
  if (i >= tokensLength) return 0;

  const start = i;
  let l;

  if (l = checkCombinator(i)) i += l;
  else return 0;

  while (i < tokensLength) {
    const spaceBefore = checkSC(i);
    if (l = checkCompoundSelector(i + spaceBefore)) i += spaceBefore + l;
    else break;

    const spaceAfter = checkSC(i);
    const comma = checkCombinator(i + spaceAfter);
    if (!spaceAfter && !comma) break;
    if (comma) {
      i += spaceAfter + comma;
    }
  }

  tokens[start].selectorEnd = i;
  return i - start;
}
function checkSelector2(i) {
  if (i >= tokensLength) return 0;

  const start = i;
  let l;

  if (l = checkCombinator(i)) i += l;
  else return 0;

  while (i < tokensLength) {
    const spaceBefore = checkSC(i);
    if (l = checkCompoundSelector(i + spaceBefore)) i += spaceBefore + l;
    else break;

    const spaceAfter = checkSC(i);
    const comma = checkCombinator(i + spaceAfter);
    if (!spaceAfter && !comma) break;
    if (comma) {
      i += spaceAfter + comma;
    }
  }

  tokens[start].selectorEnd = i;
  return i - start;
}
function checkSelector2 ( i ) { if ( i >= tokensLength ) return 0 ; const start = i ; let l ; if ( l = checkCombinator ( i ) ) i += l ; else return 0 ; while ( i < tokensLength ) { const spaceBefore = checkSC ( i ) ; if ( l = checkCompoundSelector ( i + spaceBefore ) ) i += spaceBefore + l ; else break ; const spaceAfter = checkSC ( i ) ; const comma = checkCombinator ( i + spaceAfter ) ; if ( ! spaceAfter && ! comma ) break ; if ( comma ) { i += spaceAfter + comma ; } } tokens [ start ] . selectorEnd = i ; return i - start ; }
Checks for a selector that starts with a combinator.
Checks for a selector that starts with a combinator .