On 2014/10/09 14:52:18, mathias wrote:
On 2014/10/09 14:50:18, Yang wrote:
>
https://codereview.chromium.org/640193002/diff/40001/test/mjsunit/parse-surrogates.js
> File test/mjsunit/parse-surrogates.js (right):
>
>
https://codereview.chromium.org/640193002/diff/40001/test/mjsunit/parse-surrogates.js#newcode7
> test/mjsunit/parse-surrogates.js:7: assertThrows("'\\u000\uD801\uABCD'",
> SyntaxError);
> On 2014/10/09 14:45:42, mathias wrote:
> > AFAICT, lone surrogates in strings must still be supported in ES6.
>
> But they are still not valid identifiers, right?
Right.
So, that test is actually to test the hexcode parser. Note that running the
following script works.
'\\u000\uD801\uABCD'
But running
eval("'\\u000\uD801\uABCD'")
throws. The reason is that what the eval actually receives is something to
the
effect of
'\u000<garbage character>'. When parsing the (assumably) escaped character,
we
find that the last digit of that hex number is actually not a digit, hence
we
throw. This behavior did not change with this patch.
Firefox also throws with "SyntaxError: malformed Unicode character escape
sequence".
https://codereview.chromium.org/640193002/
--
--
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.