style tweaks to previous patch.

This commit is contained in:
Jeremy Ashkenas 2010-12-03 01:23:54 -05:00
parent c50cb65019
commit 67c20c0715
2 changed files with 7 additions and 7 deletions

View File

@ -1476,7 +1476,7 @@
if (this.isChainable() && this.first.isChainable()) {
allInvertable = true;
curr = this;
while (curr && (curr.operator != null)) {
while (curr && curr.operator) {
allInvertable && (allInvertable = curr.operator in INVERSIONS);
curr = curr.first;
}
@ -1484,7 +1484,7 @@
return new Parens(this).invert();
}
curr = this;
while (curr && (curr.operator != null)) {
while (curr && curr.operator) {
curr.invert = !curr.invert;
curr.operator = INVERSIONS[curr.operator];
curr = curr.first;

View File

@ -1175,13 +1175,13 @@ exports.Op = class Op extends Base
invert: ->
if @isChainable() and @first.isChainable()
allInvertable = yes
curr = @
while curr and curr.operator?
allInvertable &&= (curr.operator of INVERSIONS)
curr = this
while curr and curr.operator
allInvertable and= (curr.operator of INVERSIONS)
curr = curr.first
return new Parens(this).invert() unless allInvertable
curr = @
while curr and curr.operator?
curr = this
while curr and curr.operator
curr.invert = !curr.invert
curr.operator = INVERSIONS[curr.operator]
curr = curr.first