>> * 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)? > > No, HoistableDeclaration[Default] includes FunctionDeclaration that lacks a > BindingIdentifier.
OK, I take it the following wasn’t viable? > `export default` [lookahead ≠ `function (` ] HoistableDeclaration > `export default` AssignmentExpression `;` >> * If the purpose of the first rule is to enable default-exporting of >> declarations (= no semicolon) – shouldn’t classes be included? > > It has nothing to do with semicolons. It's so a function that is a default > export can also have a local name binding. Ah, interesting and useful. > We should also allow: > export default class Foo {}; > > where Foo is a module local binding. Without the semicolon, though? The “operand” of `export default` is also a declaration, right? > Please file a bug. Will do, once I fully understand the issue. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss