clean up TreeWalker.pop() (#2195)

Remove superfluous parameter.
This commit is contained in:
Alex Lam S.L
2017-07-03 03:23:38 +08:00
committed by GitHub
parent 20e4f8277f
commit 6b3aeff1d8
2 changed files with 4 additions and 5 deletions

View File

@@ -859,7 +859,7 @@ TreeWalker.prototype = {
if (!ret && descend) {
descend.call(node);
}
this.pop(node);
this.pop();
return ret;
},
parent: function(n) {
@@ -873,9 +873,8 @@ TreeWalker.prototype = {
}
this.stack.push(node);
},
pop: function(node) {
this.stack.pop();
if (node instanceof AST_Lambda) {
pop: function() {
if (this.stack.pop() instanceof AST_Lambda) {
this.directives = Object.getPrototypeOf(this.directives);
}
},

View File

@@ -70,7 +70,7 @@ TreeTransformer.prototype = new TreeWalker;
if (y !== undefined) x = y;
}
}
tw.pop(this);
tw.pop();
return x;
});
};