mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibJS: Say "return {}" instead of "return js_undefined()" in AST nodes
This looks a bit nicer somehow.
This commit is contained in:
parent
ad6ede7ee4
commit
4802413f71
Notes:
sideshowbarker
2024-07-19 08:07:02 +09:00
Author: https://github.com/awesomekling
Commit: 4802413f71
1 changed files with 3 additions and 3 deletions
|
@ -109,7 +109,7 @@ Value IfStatement::execute(Interpreter& interpreter) const
|
|||
if (m_alternate)
|
||||
return interpreter.run(*m_alternate);
|
||||
|
||||
return js_undefined();
|
||||
return {};
|
||||
}
|
||||
|
||||
Value WhileStatement::execute(Interpreter& interpreter) const
|
||||
|
@ -616,7 +616,7 @@ Value VariableDeclaration::execute(Interpreter& interpreter) const
|
|||
interpreter.set_variable(name().string(), initalizer_result, true);
|
||||
}
|
||||
|
||||
return js_undefined();
|
||||
return {};
|
||||
}
|
||||
|
||||
void VariableDeclaration::dump(int indent) const
|
||||
|
@ -707,7 +707,7 @@ Value BooleanLiteral::execute(Interpreter&) const
|
|||
|
||||
Value UndefinedLiteral::execute(Interpreter&) const
|
||||
{
|
||||
return js_undefined();
|
||||
return {};
|
||||
}
|
||||
|
||||
Value NullLiteral::execute(Interpreter&) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue