| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index c3f6802f2e8c4f880eecefcd0488a3e8a9817743..7515a3a4f522928463c37329e3ea6bd1e37095ff 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -1118,6 +1118,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| bool is_lazily_parsed = (outer_is_script_scope && allow_lazy() &&
|
| !function_state_->this_function_is_parenthesized());
|
|
|
| + function_state.set_parse_phase(FunctionParsePhase::FunctionBody);
|
| Expect(Token::LBRACE, CHECK_OK);
|
| function_state.set_parse_phase(FunctionParsePhase::FunctionBody);
|
| if (is_lazily_parsed) {
|
| @@ -1292,6 +1293,19 @@ PreParserExpression PreParser::ParseDoExpression(bool* ok) {
|
| return PreParserExpression::Default();
|
| }
|
|
|
| +void PreParserTraits::ParseAsyncArrowSingleExpressionBody(
|
| + PreParserStatementList body, bool accept_IN,
|
| + Type::ExpressionClassifier* classifier, int pos, bool* ok) {
|
| + Scope* scope = pre_parser_->scope_;
|
| + scope->ForceContextAllocation();
|
| +
|
| + PreParserExpression return_value =
|
| + pre_parser_->ParseAssignmentExpression(accept_IN, classifier, ok);
|
| + if (!*ok) return;
|
| +
|
| + body->Add(PreParserStatement::ExpressionStatement(return_value), zone());
|
| +}
|
| +
|
| #undef CHECK_OK
|
|
|
|
|
|
|