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

@@ -11,6 +11,22 @@ defineType("AwaitExpression", {
}
});
defineType("ForAwaitStatement", {
visitor: ["left", "right", "body"],
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
fields: {
left: {
validate: assertNodeType("VariableDeclaration", "LVal")
},
right: {
validate: assertNodeType("Expression")
},
body: {
validate: assertNodeType("Statement")
}
}
});
defineType("BindExpression", {
visitor: ["object", "callee"],
aliases: ["Expression"],