mirror of
https://github.com/RGBCube/serenity
synced 2025-05-26 02:05:08 +00:00
LibJS: Add sequence expression bytecode generation
This commit is contained in:
parent
cac94b1c16
commit
1dc31842cb
2 changed files with 11 additions and 0 deletions
|
@ -449,4 +449,14 @@ Optional<Bytecode::Register> ConditionalExpression::generate_bytecode(Bytecode::
|
|||
return result_reg;
|
||||
}
|
||||
|
||||
Optional<Bytecode::Register> SequenceExpression::generate_bytecode(Bytecode::Generator& generator) const
|
||||
{
|
||||
Optional<Bytecode::Register> last_reg;
|
||||
|
||||
for (auto& expression : m_expressions)
|
||||
last_reg = expression.generate_bytecode(generator);
|
||||
|
||||
return last_reg;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue