Changeset 170079 in webkit for trunk/Source/JavaScriptCore/parser/Lexer.cpp
- Timestamp:
- Jun 17, 2014, 3:29:56 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r167313 r170079 1647 1647 case CharacterZero: 1648 1648 shift(); 1649 if ((m_current | 0x20) == 'x' && isASCIIHexDigit(peek(1))) { 1649 if ((m_current | 0x20) == 'x') { 1650 if (!isASCIIHexDigit(peek(1))) { 1651 m_lexErrorMessage = "No hexadecimal digits after '0x'"; 1652 token = INVALID_HEX_NUMBER_ERRORTOK; 1653 goto returnError; 1654 } 1650 1655 parseHex(tokenData->doubleValue); 1656 if (isIdentStart(m_current)) { 1657 m_lexErrorMessage = "No space between hexadecimal literal and identifier"; 1658 token = INVALID_HEX_NUMBER_ERRORTOK; 1659 goto returnError; 1660 } 1651 1661 token = NUMBER; 1652 } else { 1653 record8('0'); 1654 if (isASCIIOctalDigit(m_current)) { 1655 if (parseOctal(tokenData->doubleValue)) { 1656 if (strictMode) { 1657 m_lexErrorMessage = "Octal escapes are forbidden in strict mode"; 1658 token = INVALID_OCTAL_NUMBER_ERRORTOK; 1659 goto returnError; 1660 } 1661 token = NUMBER; 1662 m_buffer8.resize(0); 1663 break; 1664 } 1665 1666 record8('0'); 1667 if (isASCIIOctalDigit(m_current)) { 1668 if (parseOctal(tokenData->doubleValue)) { 1669 if (strictMode) { 1670 m_lexErrorMessage = "Octal escapes are forbidden in strict mode"; 1671 token = INVALID_OCTAL_NUMBER_ERRORTOK; 1672 goto returnError; 1662 1673 } 1674 token = NUMBER; 1663 1675 } 1664 1676 }
Note:
See TracChangeset
for help on using the changeset viewer.