Why should e.g. '\u2xao' throw an error?

Mathias Bynens mathias at qiwi.be
Sat Mar 17 03:16:50 PDT 2012

Why should e.g. '\u2xao' throw an error? I can’t find this in the spec, but
Test262 actually has a test for this behavior so I must be missing
something obvious.

I know `UnicodeEscapeSequence` is defined as follows:

    UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit

But since `x` is not a `HexDigit`, I’d expect '\u2xao' to equal 'u2xao',
i.e. `\u` is an escape for `u` and the rest of the string is nothing

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120317/35e97caa/attachment.html>

More information about the es-discuss mailing list