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

Method lookahead

src/parser/scanner.ts:90–96  ·  view source on GitHub ↗

* トークンの先読みを行います。カーソル位置は移動されません。

(offset: number)

Source from the content-addressed store, hash-verified

88 * トークンの先読みを行います。カーソル位置は移動されません。
89 */
90 public lookahead(offset: number): Token {
91 while (this._tokens.length <= offset) {
92 this._tokens.push(this.readToken());
93 }
94
95 return this._tokens[offset]!;
96 }
97
98 /**
99 * カーソル位置にあるトークンの種類が指定したトークンの種類と一致することを確認します。

Callers

nothing calls this directly

Calls 1

readTokenMethod · 0.95

Tested by

no test coverage detected