mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:05:09 +00:00
LibJS: Parse "this" as ThisExpression
This commit is contained in:
parent
110ca6b0b6
commit
f8f65053bd
6 changed files with 37 additions and 17 deletions
|
@ -158,10 +158,6 @@ void Interpreter::set_variable(const FlyString& name, Value value, bool first_as
|
|||
|
||||
Optional<Value> Interpreter::get_variable(const FlyString& name)
|
||||
{
|
||||
static FlyString this_name = "this";
|
||||
if (name == this_name)
|
||||
return this_value();
|
||||
|
||||
for (ssize_t i = m_scope_stack.size() - 1; i >= 0; --i) {
|
||||
auto& scope = m_scope_stack.at(i);
|
||||
auto value = scope.variables.get(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue