checkpoint (refactoring, WIP)

This commit is contained in:
Mihai Bazon
2012-09-26 12:16:16 +03:00
parent e979d01f04
commit a24e7ee976
3 changed files with 52 additions and 61 deletions

View File

@@ -45,22 +45,11 @@
// XXX: eventually I should refactor the compressor to use this infrastructure.
function TreeTransformer(before, after) {
TreeWalker.call(this);
this.before = before;
this.after = after;
this.stack = [];
}
TreeTransformer.prototype = {
push: function (node) {
this.stack.push(node);
},
pop: function() {
return this.stack.pop();
},
parent: function (n) {
return this.stack[this.stack.length - 2 - (n || 0)];
}
};
TreeTransformer.prototype = new TreeWalker;
(function(undefined){