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

Method token

www/js/_hyperscript.esm.js:47–61  ·  view source on GitHub ↗
(n, includeWhitespace)

Source from the content-addressed store, hash-verified

45 return this.token(0);
46 }
47 token(n, includeWhitespace) {
48 var token;
49 var i = 0;
50 do {
51 if (!includeWhitespace) {
52 while (this.#tokens[i] && this.#tokens[i].type === "WHITESPACE") {
53 i++;
54 }
55 }
56 token = this.#tokens[i];
57 n--;
58 i++;
59 } while (n > -1);
60 return token || { type: "EOF", value: "<<<EOF>>>" };
61 }
62 hasMore() {
63 return this.#tokens.length > 0;
64 }

Callers 9

currentTokenMethod · 0.45
consumeWhitespaceMethod · 0.45
consumeUntilMethod · 0.45
parseEventArgsMethod · 0.45
tokenMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected