MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / peekToken

Method peekToken

tools/common/_hyperscript.iife.js:129–135  ·  view source on GitHub ↗
(value, peek, type)

Source from the content-addressed store, hash-verified

127 }
128 // ----- Lookahead -----
129 peekToken(value, peek, type) {
130 peek = peek || 0;
131 type = type || "IDENTIFIER";
132 if (this.#tokens[peek] && this.#tokens[peek].value === value && this.#tokens[peek].type === type) {
133 return this.#tokens[peek];
134 }
135 }
136 // ----- Whitespace -----
137 lastWhitespace() {
138 var last = this.#consumed.at(-1);

Callers 4

parseMethod · 0.45
peekTokenMethod · 0.45
parseMethod · 0.45
tokenizer.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected