(first)
| 6989 | } |
| 6990 | |
| 6991 | function unicodeEscape(first) { |
| 6992 | pos++; |
| 6993 | var chr1 = code.charCodeAt(pos), chr2 = code.charAt(pos + 1), chr3 = code.charAt(pos + 2), chr4 = code.charAt(pos + 3), chr5 = code.charAt(pos + 4), hex; |
| 6994 | if (chr1 !== 0x75) { |
| 6995 | error("Invalid unicode escape. Expected u."); |
| 6996 | } |
| 6997 | hex = +('0x' + chr2 + chr3 + chr4 + chr5); |
| 6998 | if ((hex === hex && hex !== hex) || /[^a-f0-9]/i.test(''+chr2+chr3+chr4+chr5)) { |
| 6999 | error("Invalid unicode escape. Expected valid hex sequence."); |
| 7000 | } |
| 7001 | if (first) { |
| 7002 | if (hex > 0x60 && hex < 0x7b) { |
| 7003 | } else if (hex > 0x40 && hex < 0x5b) { |
| 7004 | } else if (hex === 0x5f || hex === 0x24) { |
| 7005 | } else if (!isValidVariable(hex)) { |
| 7006 | error('illegal unicode escape'); |
| 7007 | } |
| 7008 | } else { |
| 7009 | if (hex > 0x60 && hex < 0x7b) { |
| 7010 | } else if (hex > 0x2f && hex < 0x3a) { |
| 7011 | } else if (hex > 0x40 && hex < 0x5b) { |
| 7012 | } else if (hex === 0x5f || hex === 0x24) { |
| 7013 | } else if (!isValidVariablePart(hex)) { |
| 7014 | error('illegal unicode escape'); |
| 7015 | } |
| 7016 | } |
| 7017 | pos += 5; |
| 7018 | if (first) { |
| 7019 | if (pos < len) { |
| 7020 | outputLine += '\\u' + chr2 + chr3 + chr4 + chr5; |
| 7021 | nonKeyword(); |
| 7022 | return false; |
| 7023 | } else { |
| 7024 | outputLine += '\\u' + chr2 + chr3 + chr4 + chr5 + '$'; |
| 7025 | identifierStates(); |
| 7026 | identifierAsi(); |
| 7027 | } |
| 7028 | } else { |
| 7029 | outputLine += '\\u' + chr2 + chr3 + chr4 + chr5; |
| 7030 | } |
| 7031 | } |
| 7032 | |
| 7033 | function keyword(iLen) { |
| 7034 | state = -1; |
no test coverage detected
searching dependent graphs…