Fix: Allow identifier async for default param in arrow expression (#165)

fixes #118
This commit is contained in:
Kai Cataldo
2016-10-12 04:46:40 -04:00
committed by Daniel Tschinder
parent 7dd45f7465
commit 4fc0a3839e
25 changed files with 2221 additions and 1 deletions

View File

@@ -750,7 +750,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
if (isGenerator) this.unexpected();
let asyncId = this.parseIdentifier();
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) {
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR) || this.match(tt.eq)) {
prop.key = asyncId;
} else {
isAsync = true;