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

Method consumeUntil

www/js/_hyperscript.esm.js:111–122  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

109 }
110 }
111 consumeUntil(value, type) {
112 var tokenList = [];
113 var currentToken = this.token(0, true);
114 while ((type == null || currentToken.type !== type) && (value == null || currentToken.value !== value) && currentToken.type !== "EOF") {
115 var match = this.#tokens.shift();
116 this.#consumed.push(match);
117 tokenList.push(currentToken);
118 currentToken = this.token(0, true);
119 }
120 this.consumeWhitespace();
121 return tokenList;
122 }
123 consumeUntilWhitespace() {
124 return this.consumeUntil(null, "WHITESPACE");
125 }

Callers 3

consumeUntilMethod · 0.45
parseMethod · 0.45

Calls 2

tokenMethod · 0.45
consumeWhitespaceMethod · 0.45

Tested by

no test coverage detected