summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorJack Karamanian <karamanian.jack@gmail.com>2020-05-30 00:10:42 -0500
committerAndreas Kling <kling@serenityos.org>2020-05-30 10:33:24 +0200
commitc12125fa817bdbf423cb01e171addf9765eca417 (patch)
tree6b92b1eafa021da0979fdd5b519fd249aabd9cc6 /Libraries/LibJS/AST.cpp
parent5243e9974d20647c3ef3d94db224a66fdc100db5 (diff)
downloadserenity-c12125fa817bdbf423cb01e171addf9765eca417.zip
LibJS: Track whether ScriptFunctions and FunctionExpressions are arrow
functions
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r--Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp
index f3cad3a386..2414bfbf90 100644
--- a/Libraries/LibJS/AST.cpp
+++ b/Libraries/LibJS/AST.cpp
@@ -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