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