MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / token

Method token

www/js/_hyperscript.js:49–63  ·  view source on GitHub ↗
(n, includeWhitespace)

Source from the content-addressed store, hash-verified

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

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