Fun impossible Firefox JS challenge

Lasse Reichstein reichsteinatwork at
Fri Apr 13 00:51:21 PDT 2012

On Thu, Apr 12, 2012 at 8:53 PM, Allen Wirfs-Brock
<allen at> wrote:
> I think we should stick with the ES5 intent (Unicode escapes don't change the meaning of an IdentiferName, including keywords) and possibly clarify the Es6 spec. language to make this intent even clearer.

I.e., tru\u0065 is an IdentifierName, but neither an Identifier nor
the "true" keyword. If so, I agree to that.

It would lexically parse as an IdentifierName, so there is no problem
there (there would be in ES3 because it couldn't lexically parse as
anything), and since "var tru\u0065" requires an Identifier, it's a
syntactic parse error.

(And since unescaped keywords are valid IdentifierNames, you won't
ever need escapes to make something valid that wouldn't otherwise be).


More information about the es-discuss mailing list