Permalink
Browse files

feat(experimental): export extensions

  • Loading branch information...
h13i32maru committed Nov 26, 2016
1 parent c941951 commit 8803005b5927615027939ed42633bb06d060adaa
View
@@ -68,6 +68,7 @@ export default class ESParser {
if (experimental.asyncGenerators) option.plugins.push('asyncGenerators');
if (experimental.asyncGenerators) option.plugins.push('asyncGenerators');
if (experimental.decorators) option.plugins.push('decorators');
+ if (experimental.exportExtensions) option.plugins.push('exportExtensions');
}
return option;
View
@@ -36,6 +36,7 @@
* @property {boolean} experimentalProposal.functionSent
* @property {boolean} experimentalProposal.asyncGenerators
* @property {boolean} experimentalProposal.decorators
+ * @property {boolean} experimentalProposal.exportExtensions
* @see https://esdoc.org/config.html
*/
@@ -0,0 +1,4 @@
+export * as ns from 'mod'
+export v from "mod"
+export vv, {x, y as w} from "mod"
+export default from "mod"
@@ -22,4 +22,9 @@ describe('ESParser', ()=>{
const ast = ESParser.parse({experimentalProposal: {asyncGenerators: true}}, './test/fixture/syntax/AsyncGenerators.js');
assert(ast.program.sourceType === 'module');
});
+
+ it('can parse "export extensions"', ()=>{
+ const ast = ESParser.parse({experimentalProposal: {exportExtensions: true}}, './test/fixture/syntax/ExportExtensions.js');
+ assert(ast.program.sourceType === 'module');
+ });
});

0 comments on commit 8803005

Please sign in to comment.