()
| 143555 | return String.fromCharCode(code); |
| 143556 | } |
| 143557 | function scanUnicodeCodePointEscape() { |
| 143558 | var ch, code, cu1, cu2; |
| 143559 | ch = source[index]; |
| 143560 | code = 0; // At least, one hex digit is required. |
| 143561 | if (ch === "}") throwError({}, MessageUnexpectedToken, ILLEGAL); |
| 143562 | while(index < length){ |
| 143563 | ch = source[index++]; |
| 143564 | if (!isHexDigit(ch)) break; |
| 143565 | code = code * 16 + "0123456789abcdef".indexOf(ch.toLowerCase()); |
| 143566 | } |
| 143567 | if (code > 0x10FFFF || ch !== "}") throwError({}, MessageUnexpectedToken, ILLEGAL); |
| 143568 | // UTF-16 Encoding |
| 143569 | if (code <= 0xFFFF) return String.fromCharCode(code); |
| 143570 | cu1 = (code - 0x10000 >> 10) + 0xD800; |
| 143571 | cu2 = (code - 0x10000 & 1023) + 0xDC00; |
| 143572 | return String.fromCharCode(cu1, cu2); |
| 143573 | } |
| 143574 | function getEscapedIdentifier() { |
| 143575 | var ch, id; |
| 143576 | ch = source.charCodeAt(index++); |
no test coverage detected