code: function createCursorWithSkip(factory, tokens, comments, indexMap, startLoc, endLoc, opts) {
      let includeComments = false;
      let skip = 0;
      let filter = null;
  
      if (typeof opts === "number") {
          skip = opts | 0;
      } else if (typeof opts === "function") {
          filter = opts;
      } else if (opts) {
          includeComments = !!opts.includeComments;
          skip = opts.skip | 0;
          filter = opts.filter || null;
      }
      assert(skip >= 0, "options.skip should be zero or a positive integer.");
      assert(!filter || typeof filter === "function", "options.filter should be a function.");
  
      return factory.createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, -1);
  }
docs: Creates the cursor iterates tokens with options.
  
  @param {CursorFactory} factory - The cursor factory to initialize cursor.
  @param {Token[]} tokens - The array of tokens.
  @param {Comment[]} comments - The array of comments.
  @param {Object} indexMap - The map from locations to indices in `tokens`.
  @param {number} startLoc - The start location of the iteration range.
  @param {number} endLoc - The end location of the iteration range.
  @param {number|Function|Object} [opts=0] - The option object. If this is a number then it's `opts.skip`. If this is a function then it's `opts.filter`.
  @param {boolean} [opts.includeComments=false] - The flag to iterate comments as well.
  @param {Function|null} [opts.filter=null] - The predicate function to choose tokens.
  @param {number} [opts.skip=0] - The count of tokens the cursor skips.
  @returns {Cursor} The created cursor.
  @private