mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibJS: Make "break" actually work inside "switch"
This commit is contained in:
parent
9d099835f9
commit
e3b92caa6d
3 changed files with 33 additions and 1 deletions
|
@ -86,6 +86,8 @@ public:
|
|||
Heap& heap() { return m_heap; }
|
||||
|
||||
void unwind(ScopeType type) { m_unwind_until = type; }
|
||||
void stop_unwind() { m_unwind_until = ScopeType::None; }
|
||||
bool should_unwind_until(ScopeType type) const { return m_unwind_until == type; }
|
||||
bool should_unwind() const { return m_unwind_until != ScopeType::None; }
|
||||
|
||||
Optional<Value> get_variable(const FlyString& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue