(value, type)
| 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 | } |
no test coverage detected