Improve yield support and restrict usage of strict
- Partially reverting91cdb93e57andeaf3911c31and 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:
@@ -196,6 +196,10 @@ TreeTransformer.prototype = new TreeWalker;
|
||||
self.property = self.property.transform(tw);
|
||||
});
|
||||
|
||||
_(AST_Yield, function(self, tw){
|
||||
if (self.expression) self.expression = self.expression.transform(tw);
|
||||
});
|
||||
|
||||
_(AST_Unary, function(self, tw){
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user