mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Allow statements to have multiple labels
This is a curious thing that occurs more often than you'd think in minified JavaScript: a: b: c: for (...) { ... break b; ... }
This commit is contained in:
parent
ababcc5725
commit
3252d984ae
Notes:
sideshowbarker
2024-07-18 03:26:06 +09:00
Author: https://github.com/awesomekling
Commit: 3252d984ae
6 changed files with 31 additions and 21 deletions
|
@ -193,7 +193,7 @@ Value Interpreter::execute_statement(GlobalObject& global_object, const Statemen
|
|||
if (!value.is_empty())
|
||||
last_value = value;
|
||||
if (vm().should_unwind()) {
|
||||
if (!block.label().is_null() && vm().should_unwind_until(ScopeType::Breakable, block.label()))
|
||||
if (!block.labels().is_empty() && vm().should_unwind_until(ScopeType::Breakable, block.labels()))
|
||||
vm().stop_unwind();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue