domenic at domenicdenicola.com (2013-12-10T01:13:29.480Z)
Agree on all counts, but not quite understanding yet.
Say I'm parsing this, and the token stream is paused at the "#":
function(a = # yield
I assume that we're not un-reserving yield in strict mode. That means that
I don't know whether to treat `yield` as an identifier or reserved word
until I get to that goofy prologue.
Previously, I've just naively parsed parameter initializers using the same
strictness as the code which contains the function.
> > > This makes for wtfjs additions, but they all seem non-wtf on reflection > (or did to us when Waldemar threw them up on a whiteboard last week). By > non-wtf, I mean anyone who groks that yield is reserved only in function* > can work them out. > > The star after function really helps. ES5's "use strict" directive > prologue in the body applying to its left (even in ES5 -- duplicate formals > are a strict error) is goofy. Agree on all counts, but not quite understanding yet. Say I'm parsing this, and the token stream is paused at the "#": function(a = # yield I assume that we're not un-reserving yield in strict mode. That means that I don't know whether to treat `yield` as an identifier or reserved word until I get to that goofy prologue. Previously, I've just naively parsed parameter initializers using the same strictness as the code which contains the function. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131125/65fd02af/attachment-0001.html>