code: function checkAtruler(i) {
    const start = i;
    let l;
  
    if (i >= tokensLength) return 0;
  
    if (l = checkAtkeyword(i)) i += l;
    else return 0;
  
    if (l = checkTsets(i)) i += l;
  
    if (i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket) i++;
    else return 0;
  
    if (l = checkAtrulers(i)) i += l;
  
    if (i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket) i++;
    else return 0;
  
    return i - start;
  }
docs: Check if token is part of an @-rule with ruleset
  @param {Number} i Token's index number
  @returns {Number} Length of the @-rule