I split the first part off of this CL, ptal here:
https://codereview.chromium.org/716423002/
(My intention was to do all the things you pointed out; except the ones
related
to regexps.)
https://codereview.chromium.org/706263002/diff/20001/src/scanner.cc
File src/scanner.cc (right):
https://codereview.chromium.org/706263002/diff/20001/src/scanner.cc#newcode901
src/scanner.cc:901: uc32 c = ScanHexNumber(4);
On 2014/11/07 16:23:20, arv wrote:
In case of u{ then there is no upper limit for the number of hex
digits.
Done.
https://codereview.chromium.org/706263002/diff/20001/src/scanner.cc#newcode907
src/scanner.cc:907: return 1;
On 2014/11/07 16:50:39, caitp wrote:
shouldn't this return -1 so that the scanner knows it's a bad token?
otherwise
it looks the same as \u{1}
Done.
https://codereview.chromium.org/706263002/diff/20001/test/cctest/test-parsing.cc
File test/cctest/test-parsing.cc (right):
https://codereview.chromium.org/706263002/diff/20001/test/cctest/test-parsing.cc#newcode4316
test/cctest/test-parsing.cc:4316: "\"foob\\u{c4}r\"",
On 2014/11/07 16:23:20, arv wrote:
Can you add a test for
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string-literals-static-semantics-early-errors
UnicodeEscapeSequence :: u{ HexDigits }
It is a Syntax Error if the MV of HexDigits > 1114111.
Done.
https://codereview.chromium.org/706263002/diff/20001/test/cctest/test-parsing.cc#newcode4344
test/cctest/test-parsing.cc:4344: "/[\\u{0062-\\u{0066 ]oo/",
On 2014/11/07 16:23:20, arv wrote:
Can you add a test with more than 4 hex numbers?
The following should be legal
\U{000000000000000000000000000000000000000000000000062}
Done.
https://codereview.chromium.org/706263002/diff/20001/test/mjsunit/es6/unicode-escapes.js
File test/mjsunit/es6/unicode-escapes.js (right):
https://codereview.chromium.org/706263002/diff/20001/test/mjsunit/es6/unicode-escapes.js#newcode9
test/mjsunit/es6/unicode-escapes.js:9: function TestVariableNames1() {
On 2014/11/07 16:23:20, arv wrote:
Or
(function TestVariableNames1() {
...
})();
less likely to have typos in the name cause tests to not run.
Done.
https://codereview.chromium.org/706263002/diff/20001/test/mjsunit/es6/unicode-escapes.js#newcode28
test/mjsunit/es6/unicode-escapes.js:28: var s2 = "foob\u{0061}r";
On 2014/11/07 16:23:20, arv wrote:
var s2 = "foob\u{61}r";
Done.
https://codereview.chromium.org/706263002/diff/20001/test/mjsunit/es6/unicode-escapes.js#newcode34
test/mjsunit/es6/unicode-escapes.js:34: // flags.
On 2014/11/07 16:37:57, mathias wrote:
`u{…}` escapes are only allowed in regular expressions when the `u`
flag is set
– they should throw otherwise.
Regexp escapes will be added in a separate CL.
https://codereview.chromium.org/706263002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.