Allen, what was the motivation for allowing random escapes in identifiers but not in keywords? AFAICS, it would be simpler and more consistent to allow them anywhere and render "escape normalisation" a uniform prepass before tokenisation. IIUC, that's what other languages do. The current ES rules are far from ideal, and require jumping through extra hoops, in particular, to handle context-dependent keywords like `yield`.
/Andreas On 7 November 2015 at 20:34, Eric Suen <eric.suen.t...@gmail.com> wrote: > Like Caitlin said, logically > > Escaped ReservedWords is IdentifierName > Escaped ReservedWords is not ReservedWord > Identifier is IdentifierName but not ReservedWord > Escaped ReservedWords is not Identifier? > > I'm writing javascript parser myself, those inconsistency really confuse me... > > On Sun, Nov 8, 2015 at 2:07 AM, Allen Wirfs-Brock <al...@wirfs-brock.com> > wrote: >> >>> On Nov 7, 2015, at 9:58 AM, Eric Suen <eric.suen.t...@gmail.com> wrote: >>> >>> I see, I thought you were refer 'get'/'set'. Indeed escaped >>> ReservedWords should be ReservedWords. >>> >>> Class a = \u006eew Class() >>> >>> is valid in Java and C#. >> >> But not in ECMAScript 2015. JavaScript is neither Java or C# >> >> >> > > > > -- > ------------------------------------------------ > Spket IDE - Development Tool for RIA. > > http://www.spket.com > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss