Unicode Escape sequences for keywords, what's the correct behaviour?

BelleveInvis infinte.cdda at hotmail.com
Thu Mar 21 20:42:42 PDT 2013


________________________________
> Subject: Re: Unicode Escape sequences for keywords, what's the correct 
> behaviour? 
> From: allen at wirfs-brock.com 
> Date: Thu, 21 Mar 2013 08:41:35 -0700 
> CC: es-discuss at mozilla.org 
> To: infinte.cdda at hotmail.com 
> 
> As a keyword. 
> 
> This is clarified in the ES6 draft 
> (http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.6.1 ) 
> 
> Allen 
> 
> 
> 
> On Mar 21, 2013, at 3:04 AM, BelleveInvis wrote: 
> 
> If a keyword represented as unicode escape sequences, should it 
> interpreted as identifier or keyword? 
> 
> Example code: 
> 
> \u0076\u0061\u0072 a 
> 
> Should it throw a syntax error? 
> _______________________________________________ 
> es-discuss mailing list 
> es-discuss at mozilla.org<mailto:es-discuss at mozilla.org> 
> https://mail.mozilla.org/listinfo/es-discuss 
> 
>

However I detected some weird implementations.

In Chrome 25, `\u0076\u0061\u0072 a` throws a syntax error, means that Chrome treat escape sequences as identifier. Though IE10 runs `\u0076\u0061\u0072 a` well, shows that it treat `\u0076\u0061\u0072` a keyword. Hmmmmmmm, perhaps I should establish an issue for Chrome. 		 	   		  


More information about the es-discuss mailing list