(messageFormat, ...values)
| 184 | } |
| 185 | |
| 186 | tolerateError(messageFormat, ...values) { |
| 187 | const args = Array.prototype.slice.call(arguments, 1); |
| 188 | const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => { |
| 189 | assert(idx < args.length, 'Message reference must be in range'); |
| 190 | return args[idx]; |
| 191 | } |
| 192 | ); |
| 193 | |
| 194 | const index = this.lastMarker.index; |
| 195 | const line = this.scanner.lineNumber; |
| 196 | const column = this.lastMarker.column + 1; |
| 197 | this.errorHandler.tolerateError(index, line, column, msg); |
| 198 | } |
| 199 | |
| 200 | // Throw an exception because of the token. |
| 201 | unexpectedTokenError(token?: any, message?: string): Error { |
no test coverage detected