1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +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

@ -76,7 +76,7 @@ Value FunctionDeclaration::execute(Interpreter& interpreter) const
Value FunctionExpression::execute(Interpreter& interpreter) const
{
return ScriptFunction::create(interpreter.global_object(), name(), body(), parameters(), function_length(), interpreter.current_environment());
return ScriptFunction::create(interpreter.global_object(), name(), body(), parameters(), function_length(), interpreter.current_environment(), m_is_arrow_function);
}
Value ExpressionStatement::execute(Interpreter& interpreter) const