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

Method consumeUntil

tools/common/_hyperscript.iife.js:113–124  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

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

Callers 4

consumeUntilMethod · 0.45
parseMethod · 0.45
tokenizer.jsFile · 0.45

Calls 2

tokenMethod · 0.45
consumeWhitespaceMethod · 0.45

Tested by

no test coverage detected