Fix issues with default object params in async functions (#96)

This change allows async functions to have a spread argument which
defines a default value.
This commit is contained in:
Daniel Tschinder
2016-08-23 23:19:49 +02:00
committed by Henry Zhu
parent 4506822180
commit 2cfae60b15
3 changed files with 231 additions and 1 deletions

View File

@@ -335,7 +335,7 @@ pp.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
innerParenStart = this.state.start;
}
elts.push(this.parseExprListItem());
elts.push(this.parseExprListItem(undefined, possibleAsyncArrow ? { start: 0 } : undefined));
}
// we found an async arrow function so let's not allow any inner parens