1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibJS: Track whether ScriptFunctions and FunctionExpressions are arrow

functions
This commit is contained in:
Jack Karamanian 2020-05-30 00:10:42 -05:00 committed by Andreas Kling
parent 5243e9974d
commit c12125fa81
5 changed files with 13 additions and 8 deletions

View file

@ -382,7 +382,7 @@ RefPtr<FunctionExpression> Parser::try_parse_arrow_function_expression(bool expe
if (!function_body_result.is_null()) {
state_rollback_guard.disarm();
auto body = function_body_result.release_nonnull();
return create_ast_node<FunctionExpression>("", move(body), move(parameters), function_length, m_parser_state.m_var_scopes.take_last());
return create_ast_node<FunctionExpression>("", move(body), move(parameters), function_length, m_parser_state.m_var_scopes.take_last(), true);
}
return nullptr;