2 * @fileoverview Define the cursor which limits the number of tokens.
3 * @author Toru Nagashima
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
11 const DecorativeCursor = require("./decorative-cursor");
13 //------------------------------------------------------------------------------
15 //------------------------------------------------------------------------------
18 * The decorative cursor which limits the number of tokens.
20 module.exports = class LimitCursor extends DecorativeCursor {
23 * Initializes this cursor.
24 * @param {Cursor} cursor The cursor to be decorated.
25 * @param {number} count The count of tokens this cursor iterates.
27 constructor(cursor, count) {
36 return super.moveNext();