Get node with included mixin with keyfames selector like
`+nani(foo) { 0% {}}`
@param {number} i Token's index number
@returns {number} Length of the include
9643
function checkIncludeWithKeyframes2(i) {
  const start = i;
  let l;

  if (tokens[i].type === TokenType.PlusSign) i++;
  else return 0;

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

  if (l = checkSC(i)) i += l;

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

  if (l = checkSC(i)) i += l;

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

  return i - start;
}
447179
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;
}
1131463
function checkTypeSelector(i) {
  if (i >= tokensLength) return 0;

  const start = i;
  let l;

  if (l = checkNamePrefix(i)) i += l;

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

  return i - start;
}
1050951
private int getTokenQueuePosFromMap(int i)
  {

    int pos = m_patternMap[i];

    return (pos >= TARGETEXTRA) ? (pos - TARGETEXTRA) : pos;
  }
1132158
function checkExtend2(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

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

  if (tokens[i + 1] &&
      tokens[i + 1].value === 'extend' &&
      (l = checkPseudoc(i))) i += l;
  else return 0;

  return i - start;
}
1132216
function checkAtrule(i) {
  let l;

  if (i >= tokensLength) return 0;

  // If token already has a record of being part of an @-rule,
  // return the @-rule's length:
  if (tokens[i].atrule_l !== undefined) return tokens[i].atrule_l;

  // If token is part of an @-rule, save the rule's type to token.
  if (l = checkKeyframesRule(i)) tokens[i].atrule_type = 4;
  // @-rule with ruleset:
  else if (l = checkAtruler(i)) tokens[i].atrule_type = 1;
  // Block @-rule:
  else if (l = checkAtruleb(i)) tokens[i].atrule_type = 2;
  // Single-line @-rule:
  else if (l = checkAtrules(i)) tokens[i].atrule_type = 3;
  else return 0;

  // If token is part of an @-rule, save the rule's length to token:
  tokens[i].atrule_l = l;

  return l;
}
1135912
function extractIncludeVariables(includeElement, contextVariables) {
  const includedVariables = { ...contextVariables };
  Object.keys(includeElement.attribs).forEach((attribute) => {
    if (!attribute.startsWith('var-')) {
      return;
    }
    const variableName = attribute.replace(/^var-/, '');
    if (!includedVariables[variableName]) {
      includedVariables[variableName] = includeElement.attribs[attribute];
    }
  });
  if (includeElement.children) {
    includeElement.children.forEach((child) => {
      if (child.name !== 'variable' && child.name !== 'span') {
        return;
      }
      const variableName = child.attribs.name || child.attribs.id;
      if (!variableName) {
        // eslint-disable-next-line no-console
        console.warn(`Missing reference in ${includeElement.attribs[ATTRIB_CWF]}\n`
                   + `Missing 'name' or 'id' in variable for ${includeElement.attribs.src} include.`);
        return;
      }
      if (!includedVariables[variableName]) {
        includedVariables[variableName] = cheerio.html(child.children);
      }
    });
  }
  return includedVariables;
}
1165714
function getColonToken(node) {
            if (node.test) {
                return sourceCode.getTokenAfter(node.test, astUtils.isColonToken);
            }
            return sourceCode.getFirstToken(node, 1);
        }
1339500
function checkKeyframesSelectorsGroup(i) {
  const start = i;
  let l;

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

  while (i < tokensLength) {
    const spaceBefore = checkSC(i);
    const comma = checkDelim(i + spaceBefore);
    if (!comma) break;

    const spaceAfter = checkSC(i + spaceBefore + comma);
    if (l = checkKeyframesSelector(i + spaceBefore + comma + spaceAfter)) {
      i += spaceBefore + comma + spaceAfter + l;
    } else break;
  }

  tokens[start].selectorsGroupEnd = i;

  return i - start;
}
830777
function checkKeyframesBlocks(i) {
  if (i >= tokensLength) return 0;

  const blockEnd = tokens[i].block_end;
  const start = i;
  let l;

  if (!blockEnd) return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkKeyframesBlock(i)) i += l;

  while (i < blockEnd) {
    if (l = checkSC(i)) i += l;
    else if (l = checkKeyframesBlock(i)) i += l;
    else if (l = checkAtrule(i)) i += l;
    else break;
  }

  if (i !== blockEnd + 1) return 0;

  return blockEnd + 1 - start;
}
684358
function checkMixin(i) {
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkMixin1(i)) tokens[i].mixin_type = 1;
  else if (l = checkMixin2(i)) tokens[i].mixin_type = 2;
  else return 0;

  return l;
}
508998
function getIdxOfMatchingDirective(node, type) {
    var defs = node.view[TVIEW].directives;
    var flags = node.tNode.flags;
    var count = flags & 4095 /* DirectiveCountMask */;
    var start = flags >> 14 /* DirectiveStartingIndexShift */;
    var end = start + count;
    for (var i = start; i < end; i++) {
        var def = defs[i];
        if (def.type === type && def.diPublic) {
            return i;
        }
    }
    return null;
}
171701
function getLinkDensity (node, $) {
  const links = node.find('a')
  const textLength = node.text().length
  let linkLength = 0

  links.each(function (index, elem) {
    const href = $(this).attr('href')
    if (!href || (href.length > 0 && href[0] === '#')) {
      return
    }
    linkLength += $(this).text().length
  })

  return linkLength / textLength || 0
}
647423
function getChainHeadToken (node) {
    const type = node.type
    while (node.parent.type === type) {
      node = node.parent
    }
    return tokenStore.getFirstToken(node)
  }
994012
function getNth (elements, target) {
  var length = elements.length
  var count = 0
  for (var index = 0; index < length; index++) {
    var element = elements[index]
    if (!element.hasOwnProperty('deleted')) {
      if (count === target) {
        return index
      }
      count++
    }
  }
  return (index + 1)
}
165948
function checkEscapedString(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (tokens[i].type === TokenType.Tilde && (l = checkString(i + 1)))
    return i + l - start;
  else return 0;
}
935543
function checkSC(i) {
  if (i >= tokensLength) return 0;

  let l;
  let lsc = 0;

  while (i < tokensLength) {
    if (l = checkS(i)) tokens[i].sc_child = 1;
    else if (l = checkCommentML(i)) tokens[i].sc_child = 2;
    else if (l = checkCommentSL(i)) tokens[i].sc_child = 3;
    else break;

    i += l;
    lsc += l;
  }

  return lsc || 0;
}