code: function checkBrackets(i) {
    if (i >= tokensLength) return 0;
  
    const start = i;
  
    // Skip `[`.
    if (tokens[i].type === TokenType.LeftSquareBracket) i++;
    else return 0;
  
    if (i < tokens[start].right) {
      const l = checkTsets(i);
      if (l) i += l;
      else return 0;
    }
  
    // Skip `]`.
    i++;
  
    return i - start;
  }
docs: Checks if token is part of text inside square brackets, e.g. `[1]`.
  
  @param {number} i Token's index number
  @return {number}