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

Method token

www/js/_hyperscript-max.js:48–62  ·  view source on GitHub ↗
(n, includeWhitespace)

Source from the content-addressed store, hash-verified

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

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