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