2 * @fileoverview Define the cursor which ignores the first few tokens.
3 * @author Toru Nagashima
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
11 const DecorativeCursor = require("./decorative-cursor");
13 //------------------------------------------------------------------------------
15 //------------------------------------------------------------------------------
18 * The decorative cursor which ignores the first few tokens.
20 module.exports = class SkipCursor 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 skips.
27 constructor(cursor, count) {
34 while (this.count > 0) {
36 if (!super.moveNext()) {
40 return super.moveNext();