* Records an error and skips over the token stream until reaching a recoverable point. See * `this.skip` for more details on token skipping.
(message: string, index = this.index)
| 1814 | * `this.skip` for more details on token skipping. |
| 1815 | */ |
| 1816 | private error(message: string, index = this.index) { |
| 1817 | this.errors.push( |
| 1818 | getParseError(message, this.input, this.getErrorLocationText(index), this.parseSourceSpan), |
| 1819 | ); |
| 1820 | this.skip(); |
| 1821 | } |
| 1822 | |
| 1823 | private getErrorLocationText(index: number) { |
| 1824 | return index < this.tokens.length |
no test coverage detected