Improve yield support and restrict usage of strict

- Partially reverting 91cdb93e57 and eaf3911c31 and reimplement
- Add generators support for objects and classes
- Only classes can have static methods so restrict use of it

Special thanks to @rvanvelzen and @kzc for reviewing this patch and
providing constructive feedback over and over again.
This commit is contained in:
Anthony Van de Gejuchte
2016-05-26 17:00:37 +02:00
parent 8ad8d7b717
commit dcfc514c38
10 changed files with 318 additions and 32 deletions

View File

@@ -128,7 +128,7 @@ module.exports = function () {
});
var generators_yield_def = UglifyJS.parse('function* fn() {\nyield remote();\}').body[0].body[0];
ok.equal(generators_yield_def.body.operator, 'yield');
ok.strictEqual(generators_yield_def.body.is_star, false);
}
// Run standalone