(value, type)
| 68 | } |
| 69 | // ----- Token matching ----- |
| 70 | matchToken(value, type) { |
| 71 | if (this.#follows.includes(value)) return; |
| 72 | type = type || "IDENTIFIER"; |
| 73 | if (this.currentToken() && this.currentToken().value === value && this.currentToken().type === type) { |
| 74 | return this.consumeToken(); |
| 75 | } |
| 76 | } |
| 77 | matchOpToken(value) { |
| 78 | if (this.currentToken() && this.currentToken().op && this.currentToken().value === value) { |
| 79 | return this.consumeToken(); |
no test coverage detected