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