Allow namespace exotic to be exported as default (#474)

This commit is contained in:
Brian Ng
2017-04-19 06:59:49 -05:00
committed by Daniel Tschinder
parent 482b8155a3
commit 17f2a2036c
3 changed files with 105 additions and 1 deletions

View File

@@ -816,7 +816,7 @@ pp.parseExport = function (node) {
const specifier = this.startNode();
this.next();
if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
specifier.exported = this.parseIdentifier();
specifier.exported = this.parseIdentifier(true);
node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
this.parseExportSpecifiersMaybe(node);
this.parseExportFrom(node, true);