(value, type)
| 62 | } |
| 63 | // ----- Token matching ----- |
| 64 | matchToken(value, type) { |
| 65 | if (this.#follows.includes(value)) return; |
| 66 | type = type || "IDENTIFIER"; |
| 67 | if (this.currentToken() && this.currentToken().value === value && this.currentToken().type === type) { |
| 68 | return this.consumeToken(); |
| 69 | } |
| 70 | } |
| 71 | matchOpToken(value) { |
| 72 | if (this.currentToken() && this.currentToken().op && this.currentToken().value === value) { |
| 73 | return this.consumeToken(); |
no test coverage detected