Legacy numeric literals should not permit separators or BigInt
Created attachment 374564 [details] Patch
An easily-overlooked piece of the spec -- Test262 cases were added for separators yesterday (https://github.com/tc39/test262/pull/2245) but I think they're still needed for BigInt.
(In reply to Ross Kirsling from comment #2) > An easily-overlooked piece of the spec -- Test262 cases were added for > separators yesterday (https://github.com/tc39/test262/pull/2245) but I think > they're still needed for BigInt. The rest of the test cases are in https://github.com/tc39/test262/pull/2253 (with additional BigInt + separator ones in https://github.com/tc39/test262/pull/2252). One way or another, the key is that neither proposal is meant to add to Annex B.1.1's LegacyOctalIntegerLiteral and NonOctalDecimalIntegerLiteral.
Comment on attachment 374564 [details] Patch LGTM
Comment on attachment 374564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374564&action=review r=me. > Source/JavaScriptCore/parser/Lexer.cpp:1628 > + bool isLegacyLiteral = m_buffer8.size(); For clarity can you add: ASSERT(!m_buffer8.size() || (m_buffer8.size() == 1 && m_buffer[0] == '0'));
Comment on attachment 374564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374564&action=review > JSTests/stress/numeric-literal-separators.js:75 > +shouldThrow('010000000000_1', SyntaxError); > +shouldThrow('010000000000_9', SyntaxError); > +shouldThrow('090000000000_1', SyntaxError); Can you add tests for 0100_004 and 0_000 etc?
Created attachment 374900 [details] Patch for landing
Comment on attachment 374900 [details] Patch for landing Clearing flags on attachment: 374900 Committed r247845: <https://trac.webkit.org/changeset/247845>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53566528>