1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

fixes #1910: loop index should be mutable within a loop iteration and immutable between loop iterations

This commit is contained in:
Michael Ficarra 2011-12-21 14:06:34 -05:00
parent 0f1dbffa40
commit fc0a169a9a
18 changed files with 183 additions and 123 deletions

View file

@ -50,9 +50,9 @@
};
Rewriter.prototype.removeLeadingNewlines = function() {
var i, tag, _len, _ref;
var i, tag, _i, _len, _ref;
_ref = this.tokens;
for (i = 0, _len = _ref.length; i < _len; i++) {
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
tag = _ref[i][0];
if (tag !== 'TERMINATOR') break;
}
@ -283,7 +283,7 @@
EXPRESSION_END = [];
for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; ++_i) {
_ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
EXPRESSION_START.push(INVERSES[rite] = left);
EXPRESSION_END.push(INVERSES[left] = rite);