Another variant of export added - export {Name}. (#1737)
This commit is contained in:
committed by
Alex Lam S.L
parent
66e9039350
commit
a729c43e87
11
lib/parse.js
11
lib/parse.js
@@ -2294,7 +2294,8 @@ function parse($TEXT, options) {
|
||||
}
|
||||
|
||||
if (exported_names) {
|
||||
expect_token("name", "from");
|
||||
if (is("name", "from")) {
|
||||
next();
|
||||
|
||||
var mod_str = S.token;
|
||||
if (mod_str.type !== 'string') {
|
||||
@@ -2314,6 +2315,14 @@ function parse($TEXT, options) {
|
||||
}),
|
||||
end: prev(),
|
||||
});
|
||||
} else {
|
||||
return new AST_Export({
|
||||
start: start,
|
||||
is_default: is_default,
|
||||
exported_names: exported_names,
|
||||
end: prev(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var is_definition =
|
||||
|
||||
@@ -204,8 +204,9 @@ export_module_statement: {
|
||||
export * from "a.js";
|
||||
export {A} from "a.js";
|
||||
export {A, B} from "a.js";
|
||||
export {C};
|
||||
}
|
||||
expect_exact: 'export*from"a.js";export{A}from"a.js";export{A,B}from"a.js";'
|
||||
expect_exact: 'export*from"a.js";export{A}from"a.js";export{A,B}from"a.js";export{C};'
|
||||
}
|
||||
|
||||
import_statement_mangling: {
|
||||
|
||||
Reference in New Issue
Block a user