Kevin Smith wrote:
I wonder if you'd need to go back to the lexer in some cases:function(a = let) { "use strict"; }After seeing the "use strict", I'd have to go back and re-scan the "let" to find out that it was actually a keyword in this context (and hence a syntax error).
The current spec definitely makes 'let' reserved only in strict mode, but we have no let expression forms, so this looks like another case of parsing the kind of example you show above with 'let' in the parameter default value lexed as an Identifier but then rejected during the static semantics phase as an always-an-error-in-expressions reserved word. Good catch. Still tolerable, I think.
/be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

