> var let = function() {};
> let();
>
If let is a contextual keyword (in non-strict mode of course), then we can
look ahead to the token after `let` to validate it. An open paren cannot
follow a let *keyword*, so therefore it must be an identifier.
var let = { it: "be" };
> let.it // be
>
Same logic applies. A dot cannot follow a let keyword so we parse it as an
identifier.
On the other hand, an open square bracket *can* follow a let keyword (by
array destructuring), so we have a potential ambiguity there.
- Kevin
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss