Remove always false param allowExpressionBody (#9591)

This commit is contained in:
Daniel Tschinder
2019-02-26 11:15:34 -08:00
committed by GitHub
parent e1ff4c47b9
commit 244e4580e9
4 changed files with 6 additions and 15 deletions

View File

@@ -881,7 +881,7 @@ export default class ExpressionParser extends LValParser {
!this.canInsertSemicolon()
) {
this.next();
return this.parseFunction(node, undefined, false, true);
return this.parseFunction(node, undefined, true);
} else if (
canBeArrow &&
id.name === "async" &&
@@ -1804,10 +1804,9 @@ export default class ExpressionParser extends LValParser {
parseFunctionBodyAndFinish(
node: N.BodilessFunctionOrMethodBase,
type: string,
allowExpressionBody?: boolean,
): void {
// $FlowIgnore (node is not bodiless if we get here)
this.parseFunctionBody(node, allowExpressionBody);
this.parseFunctionBody(node);
this.finishNode(node, type);
}