()
| 435 | back(token) { this.tIndex -= +(token !== NoToken); return this; } |
| 436 | |
| 437 | parse() { |
| 438 | // The root expression cannot be empty. |
| 439 | let token = this.peek(); |
| 440 | if (token === NoToken) |
| 441 | throwExpressionError("Expression cannot be empty", 0); |
| 442 | |
| 443 | const exp = this.parseExpression(); |
| 444 | |
| 445 | // The root expression must reach the end of the input. |
| 446 | token = this.peek(); |
| 447 | if (token !== NoToken) |
| 448 | throwTokenizerError(token); |
| 449 | |
| 450 | return exp; |
| 451 | } |
| 452 | |
| 453 | parseExpression() { |
| 454 | const stack = []; |
no test coverage detected