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

View File

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