remove dead TraversalContext code

This commit is contained in:
Sebastian McKenzie
2015-02-07 23:51:05 +11:00
parent f9efd8a272
commit 9f7bcf585d

View File

@@ -14,36 +14,13 @@ function TraversalContext(scope, opts, state) {
this.scope = scope;
this.state = state;
this.opts = opts;
this.reset();
}
TraversalContext.prototype.flatten = function () {
this.shouldFlatten = true;
};
TraversalContext.prototype.remove = function () {
this.shouldRemove = true;
this.shouldSkip = true;
};
TraversalContext.prototype.skip = function () {
this.shouldSkip = true;
};
TraversalContext.prototype.stop = function () {
this.shouldStop = true;
this.shouldSkip = true;
};
TraversalContext.prototype.reset = function () {
this.shouldRemove = false;
this.shouldSkip = false;
this.shouldStop = false;
};
TraversalContext.prototype.visitNode = function (node, obj, key) {
this.reset();
var iteration = new TraversalPath(this, node, obj, key);
return iteration.visit();
};