Allen Wirfs-Brock wrote:
I agree that this is a real hazard. I think eliminating it requires
two token look-ahead. If that is ok, then we could specify
/ConciseBody /*:*
[lookahead ∉ { *{*}]/AssignmentExpression
/*{*[lookahead ∉ { /IdentifierName/}] [lookahead ∉ { *:*}]
/FunctionBody /*}*
See
http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax&rev=1307152413
and later revisions at
http://wiki.ecmascript.org/doku.php?do=revisions&id=strawman%3Aarrow_function_syntax
These lookahead(2) restrictions I drafted in the strawman stage of arrow
function syntax are not enough if we keep extending object literals. But
perhaps we should stop extending object literals.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss