JS: transfer all empty statement simplifications RedundantLabelRemoval to EmptyStatementElimination, so that empty statements can be eliminated everywhere, not in labeled blocks only.

This commit is contained in:
Alexey Andreev
2017-01-19 18:53:56 +03:00
parent ac0df8eef9
commit c1838d423b
10 changed files with 148 additions and 87 deletions
@@ -0,0 +1,20 @@
function box() {
{}
{
{}
{}
}
var $x = "OK";
if ($x == "123") {}
else if ($x == "234") {} else {}
if ($x == "qwe") {}
switch ($x) {
case 1:
case 2:
default:
}
return $x;
}