mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Parse "this" as ThisExpression
This commit is contained in:
parent
110ca6b0b6
commit
f8f65053bd
Notes:
sideshowbarker
2024-07-19 07:39:59 +09:00
Author: https://github.com/sunverwerth
Commit: f8f65053bd
Pull-request: https://github.com/SerenityOS/serenity/pull/1772
6 changed files with 37 additions and 17 deletions
|
@ -662,6 +662,16 @@ void Identifier::dump(int indent) const
|
|||
printf("Identifier \"%s\"\n", m_string.characters());
|
||||
}
|
||||
|
||||
Value ThisExpression::execute(Interpreter& interpreter) const
|
||||
{
|
||||
return interpreter.this_value();
|
||||
}
|
||||
|
||||
void ThisExpression::dump(int indent) const
|
||||
{
|
||||
ASTNode::dump(indent);
|
||||
}
|
||||
|
||||
Value AssignmentExpression::execute(Interpreter& interpreter) const
|
||||
{
|
||||
auto rhs_result = m_rhs->execute(interpreter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue