mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
LibJS: Implement bytecode generation for BreakStatement
This commit is contained in:
committed by
Ali Mohammad Pur
parent
73cf16f643
commit
a0412e0d5e
@@ -62,5 +62,17 @@ void Generator::end_continuable_scope()
|
||||
{
|
||||
m_continuable_scopes.take_last();
|
||||
}
|
||||
|
||||
Label Generator::nearest_breakable_scope() const
|
||||
{
|
||||
return m_breakable_scopes.last();
|
||||
}
|
||||
void Generator::begin_breakable_scope(Label breakable_target)
|
||||
{
|
||||
m_breakable_scopes.append(breakable_target);
|
||||
}
|
||||
|
||||
void Generator::end_breakable_scope()
|
||||
{
|
||||
m_breakable_scopes.take_last();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user