improve AST_For.init & AST_Switch.expression compression (#2546)

This commit is contained in:
Alex Lam S.L
2017-12-01 12:53:59 +08:00
committed by GitHub
parent 09b320e8a5
commit f6610baaa8
4 changed files with 50 additions and 8 deletions

View File

@@ -252,13 +252,12 @@ negate_iife_for: {
input: {
(function() {})();
for (i = 0; i < 5; i++) console.log(i);
(function() {})();
for (; i < 5; i++) console.log(i);
for (; i < 10; i++) console.log(i);
}
expect: {
for (!function() {}(), i = 0; i < 5; i++) console.log(i);
for (function() {}(); i < 5; i++) console.log(i);
for (!function() {}(); i < 10; i++) console.log(i);
}
expect_stdout: true
}