set canBeArrow to true when parsing async functions

This commit is contained in:
Sebastian McKenzie 2015-04-10 13:51:30 -07:00
parent d0bf19681a
commit 4f41b7c5e5

View File

@ -273,7 +273,7 @@ pp.parseExprAtom = function(refShorthandDefaultPos) {
if (id.name === "async") { if (id.name === "async") {
// arrow functions // arrow functions
if (this.type === tt.parenL) { if (this.type === tt.parenL) {
let expr = this.parseParenAndDistinguishExpression(start, true) let expr = this.parseParenAndDistinguishExpression(start, true, true)
if (expr && expr.type === "ArrowFunctionExpression") { if (expr && expr.type === "ArrowFunctionExpression") {
return expr return expr
} else { } else {