made --nodes output soak-aware

This commit is contained in:
satyr
2010-09-30 05:29:20 +09:00
parent b5261abb6b
commit 54f162e523
2 changed files with 7 additions and 5 deletions

View File

@@ -103,7 +103,7 @@
return this.traverseChildren(true, block);
};
BaseNode.prototype.toString = function(idt, override) {
var _i, _len, _ref2, _result, child, children;
var _i, _len, _ref2, _result, child, children, klass;
idt || (idt = '');
children = (function() {
_result = []; _ref2 = this.collectChildren();
@@ -113,7 +113,8 @@
}
return _result;
}).call(this).join('');
return '\n' + idt + (override || this["class"]) + children;
klass = override || this["class"] + (this.soakNode || this.exist ? '?' : '');
return '\n' + idt + klass + children;
};
BaseNode.prototype.eachChild = function(func) {
var _i, _j, _len, _len2, _ref2, _ref3, _result, attr, child;
@@ -1302,7 +1303,7 @@
};
OpNode.prototype.isMutator = function() {
var _ref2;
return ends(this.operator, '=') && !(('===' === (_ref2 = this.operator) || '!==' === _ref2));
return ends(this.operator, '=') && !('===' === (_ref2 = this.operator) || '!==' === _ref2);
};
OpNode.prototype.isChainable = function() {
return include(this.CHAINABLE, this.operator);