1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 06:45:08 +00:00

LibJS: Add bytecode generation for FunctionExpression :^)

This commit is contained in:
Andreas Kling 2021-06-11 10:46:46 +02:00
parent 749a3b9245
commit af48a066c6
3 changed files with 8 additions and 1 deletions

View file

@ -605,6 +605,11 @@ void FunctionDeclaration::generate_bytecode(Bytecode::Generator&) const
{
}
void FunctionExpression::generate_bytecode(Bytecode::Generator& generator) const
{
generator.emit<Bytecode::Op::NewFunction>(*this);
}
void VariableDeclaration::generate_bytecode(Bytecode::Generator& generator) const
{
for (auto& declarator : m_declarations) {