mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +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
6 changed files with 31 additions and 21 deletions
|
@ -0,0 +1,9 @@
|
|||
test("basic support for statement with many labels", () => {
|
||||
function foo() {
|
||||
a: b: c: for (;;) {
|
||||
break b;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
expect(foo()).toBe(1);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue