fix toggling of AST validation (#4499)
This commit is contained in:
@@ -160,6 +160,8 @@ var restore_transforms = [];
|
||||
AST_Node.enable_validation = function() {
|
||||
AST_Node.disable_validation();
|
||||
(function validate_transform(ctor) {
|
||||
ctor.SUBCLASSES.forEach(validate_transform);
|
||||
if (!HOP(ctor.prototype, "transform")) return;
|
||||
var transform = ctor.prototype.transform;
|
||||
ctor.prototype.transform = function(tw, in_list) {
|
||||
var node = transform.call(this, tw, in_list);
|
||||
@@ -173,7 +175,6 @@ AST_Node.enable_validation = function() {
|
||||
restore_transforms.push(function() {
|
||||
ctor.prototype.transform = transform;
|
||||
});
|
||||
ctor.SUBCLASSES.forEach(validate_transform);
|
||||
})(this);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user