set canBeArrow to true when parsing async functions
This commit is contained in:
parent
d0bf19681a
commit
4f41b7c5e5
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user