Implement support for async generator functions and for-await statements

This commit is contained in:
zenparsing
2016-04-14 09:35:25 -04:00
committed by Henry Zhu
parent bf0e256c3a
commit 26e79c5433
44 changed files with 779 additions and 25 deletions

View File

@@ -8,10 +8,9 @@ export default function () {
Function(path, state) {
if (!path.node.async || path.node.generator) return;
remapAsyncToGenerator(
path,
state.addImport(state.opts.module, state.opts.method)
);
remapAsyncToGenerator(path, state.file, {
wrapAsync: state.addImport(state.opts.module, state.opts.method)
});
}
}
};