check if es7.exportExtensions ie enabled in parser

This commit is contained in:
Sebastian McKenzie 2015-06-03 10:05:39 +01:00
parent 0f7e010e3e
commit 41847162b1

View File

@ -568,7 +568,7 @@ pp.parseExport = function(node) {
this.parseExportFrom(node)
return this.finishNode(node, "ExportAllDeclaration")
}
} else if (this.isExportDefaultSpecifier()) {
} else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) {
let specifier = this.startNode()
specifier.exported = this.parseIdent(true)
node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]