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

Method consumeUntil

www/js/ext/component.js:106–117  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

tokenMethod · 0.45
consumeWhitespaceMethod · 0.45

Tested by

no test coverage detected