src/sass/parse.js
function getLoop() {
  const type = NodeType.LoopType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [];

  content.push(getAtkeyword());

  while (pos < tokensLength) {
    if (checkBlock(pos)) {
      content.push(getBlock());
      break;
    }
    else if (checkVariable(pos)) content.push(getVariable());
    else if (checkNumber(pos)) content.push(getNumber());
    else if (checkInterpolation(pos)) content.push(getInterpolation());
    else if (checkIdent(pos)) content.push(getIdent());
    else if (checkOperator(pos)) content.push(getOperator());
    else if (checkCombinator(pos)) content.push(getCombinator());
    else if (checkSC(pos)) content = content.concat(getSC());
    else if (checkString(pos)) content.push(getString());
  }

  return newNode(type, content, line, column);
}
function getLoop() {
  const type = NodeType.LoopType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [];

  content.push(getAtkeyword());

  while (pos < tokensLength) {
    if (checkBlock(pos)) {
      content.push(getBlock());
      break;
    }
    else if (checkVariable(pos)) content.push(getVariable());
    else if (checkNumber(pos)) content.push(getNumber());
    else if (checkInterpolation(pos)) content.push(getInterpolation());
    else if (checkIdent(pos)) content.push(getIdent());
    else if (checkOperator(pos)) content.push(getOperator());
    else if (checkCombinator(pos)) content.push(getCombinator());
    else if (checkSC(pos)) content = content.concat(getSC());
    else if (checkString(pos)) content.push(getString());
  }

  return newNode(type, content, line, column);
}
function getLoop ( ) { const type = NodeType . LoopType ; const token = tokens [ pos ] ; const line = token . ln ; const column = token . col ; let content = [ ] ; content . push ( getAtkeyword ( ) ) ; while ( pos < tokensLength ) { if ( checkBlock ( pos ) ) { content . push ( getBlock ( ) ) ; break ; } else if ( checkVariable ( pos ) ) content . push ( getVariable ( ) ) ; else if ( checkNumber ( pos ) ) content . push ( getNumber ( ) ) ; else if ( checkInterpolation ( pos ) ) content . push ( getInterpolation ( ) ) ; else if ( checkIdent ( pos ) ) content . push ( getIdent ( ) ) ; else if ( checkOperator ( pos ) ) content . push ( getOperator ( ) ) ; else if ( checkCombinator ( pos ) ) content . push ( getCombinator ( ) ) ; else if ( checkSC ( pos ) ) content = content . concat ( getSC ( ) ) ; else if ( checkString ( pos ) ) content . push ( getString ( ) ) ; } return newNode ( type , content , line , column ) ; }
Get node with a loop.
@return {Array} `['loop', x]`
Get node with a loop .