(i: number)
| 371 | } |
| 372 | |
| 373 | private codePointAt(i: number): number { |
| 374 | let cp = this.source.charCodeAt(i); |
| 375 | |
| 376 | if (cp >= 0xD800 && cp <= 0xDBFF) { |
| 377 | const second = this.source.charCodeAt(i + 1); |
| 378 | if (second >= 0xDC00 && second <= 0xDFFF) { |
| 379 | const first = cp; |
| 380 | cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | return cp; |
| 385 | } |
| 386 | |
| 387 | private scanHexEscape(prefix: string): string | null { |
| 388 | const len = (prefix === 'u') ? 4 : 2; |
no outgoing calls
no test coverage detected