ES6 spec: `export default` HoistableDeclaration

Axel Rauschmayer axel at rauschma.de
Wed Nov 19 06:54:12 PST 2014


Quoting https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports

> `export default` HoistableDeclaration
> `export default` [lookahead ≠ `function`] AssignmentExpression `;`

Questions:

* Do these grammar rules mean that you have to put anonymous function expressions in parentheses? Is that desirable (given that it’s a frequent use case)?
* If the purpose of the first rule is to enable default-exporting of declarations (= no semicolon) – shouldn’t classes be included?

Thanks!

Axel

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141119/2733648f/attachment.html>


More information about the es-discuss mailing list