[ES6] Implemented parse for export Name from Module variants. (#1701)

- add `AST_Export` new variants output
- add tests to `test/compress/`
- update `$propdoc` of `AST_Export` ("exported_names" & "module_name")
- add tests for `export ...  as ...` variants
This commit is contained in:
Ondřej Španěl
2017-03-30 11:07:50 +02:00
committed by Alex Lam S.L
parent fccefbeaca
commit 5dea52266b
6 changed files with 182 additions and 2 deletions

View File

@@ -789,11 +789,13 @@ var AST_Import = DEFNODE("Import", "imported_name imported_names module_name", {
}
});
var AST_Export = DEFNODE("Export", "exported_definition exported_value is_default", {
var AST_Export = DEFNODE("Export", "exported_definition exported_value is_default exported_names module_name", {
$documentation: "An `export` statement",
$propdoc: {
exported_definition: "[AST_Defun|AST_Definitions|AST_DefClass?] An exported definition",
exported_value: "[AST_Node?] An exported value",
exported_names: "[AST_NameImport*?] List of exported names",
module_name: "[AST_String?] Name of the file to load exports from",
is_default: "[Boolean] Whether this is the default exported value of this module"
},
_walk: function (visitor) {