MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / next

Method next

src/parser/scanner.ts:74–85  ·  view source on GitHub ↗

* カーソル位置を次のトークンへ進めます。

()

Source from the content-addressed store, hash-verified

72 * カーソル位置を次のトークンへ進めます。
73 */
74 public next(): void {
75 // 現在のトークンがEOFだったら次のトークンに進まない
76 if (this._tokens[0]!.kind === TokenKind.EOF) {
77 return;
78 }
79
80 this._tokens.shift();
81
82 if (this._tokens.length === 0) {
83 this._tokens.push(this.readToken());
84 }
85 }
86
87 /**
88 * トークンの先読みを行います。カーソル位置は移動されません。

Callers

nothing calls this directly

Calls 1

readTokenMethod · 0.95

Tested by

no test coverage detected