mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Improve ResolveBinding + add GetIdentifierReference
ResolveBinding now matches the spec, while the non-conforming parts are moved to GetIdentifierReference. Implementing this properly requires variable bindings.
This commit is contained in:
parent
4b87dd5c5c
commit
fd43d1e205
3 changed files with 36 additions and 9 deletions
|
@ -713,9 +713,9 @@ Reference Expression::to_reference(Interpreter&, GlobalObject&) const
|
|||
return {};
|
||||
}
|
||||
|
||||
Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject& global_object) const
|
||||
Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) const
|
||||
{
|
||||
return interpreter.vm().resolve_binding(global_object, string());
|
||||
return interpreter.vm().resolve_binding(string());
|
||||
}
|
||||
|
||||
Reference MemberExpression::to_reference(Interpreter& interpreter, GlobalObject& global_object) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue