()
| 399 | } |
| 400 | |
| 401 | private scanUnicodeCodePointEscape(): string { |
| 402 | let ch = this.source[this.index]; |
| 403 | let code = 0; |
| 404 | |
| 405 | // At least, one hex digit is required. |
| 406 | if (ch === '}') { |
| 407 | this.throwUnexpectedToken(); |
| 408 | } |
| 409 | |
| 410 | while (!this.eof()) { |
| 411 | ch = this.source[this.index++]; |
| 412 | if (!Character.isHexDigit(ch.charCodeAt(0))) { |
| 413 | break; |
| 414 | } |
| 415 | code = code * 16 + hexValue(ch); |
| 416 | } |
| 417 | |
| 418 | if (code > 0x10FFFF || ch !== '}') { |
| 419 | this.throwUnexpectedToken(); |
| 420 | } |
| 421 | |
| 422 | return Character.fromCodePoint(code); |
| 423 | } |
| 424 | |
| 425 | private getIdentifier(): string { |
| 426 | const start = this.index++; |
no test coverage detected