turn async functions into generators - fixes babel/babel-eslint#22
This commit is contained in:
parent
02f4f5e885
commit
955dd1e126
@ -45,6 +45,15 @@ var astTransformVisitor = {
|
||||
delete node.name;
|
||||
}
|
||||
|
||||
if (t.isFunction(node) && node.async) {
|
||||
node.generator = true;
|
||||
node.async - false;
|
||||
}
|
||||
|
||||
if (t.isAwaitExpression(node)) {
|
||||
node.type = "YieldExpression";
|
||||
}
|
||||
|
||||
// classes
|
||||
|
||||
if (t.isReferencedIdentifier(node, parent, { name: "super" })) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user