process code with implicit return statement (#1522)

Bookmarklet for instance implicitedly assumes a "completion value" without using `return`.
The `expression` option now supports such use cases.
Optimisations on IIFEs also enhanced.

fixes #354
fixes #543
fixes #625
fixes #628
fixes #640
closes #1293
This commit is contained in:
Alex Lam S.L
2017-03-03 18:13:07 +08:00
committed by GitHub
parent 18059cc94f
commit 07accd2fbb
8 changed files with 485 additions and 32 deletions

View File

@@ -248,6 +248,6 @@ iife: {
}
expect: {
x = 42, function a() {}(), function b() {}(), function c() {}(),
function d() {}(), function e() {}(), function f() {}(), function g() {}()
function d() {}(), function e() {}(), function f() {}(), function g() {}();
}
}