mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
expressions nested in expressions made for some indentation issues -- statements are now responsible for their own leading indentation
This commit is contained in:
20
test/fixtures/generation/each.js
vendored
20
test/fixtures/generation/each.js
vendored
@@ -3,7 +3,7 @@
|
||||
// The cornerstone, an each implementation.
|
||||
// Handles objects implementing forEach, arrays, and raw objects.
|
||||
_.each = function each(obj, iterator, context) {
|
||||
var __a, __b, __c, __d, __e, i, index, item, key;
|
||||
var __a, __b, __c, __d, __e, __f, __g, i, index, item, key;
|
||||
index = 0;
|
||||
try {
|
||||
if (obj.forEach) {
|
||||
@@ -14,20 +14,22 @@
|
||||
for (i in __a) {
|
||||
if (__a.hasOwnProperty(i)) {
|
||||
item = __a[i];
|
||||
__b.push(iterator.call(context, item, i, obj));
|
||||
__c = iterator.call(context, item, i, obj);
|
||||
__b.push(__c);
|
||||
}
|
||||
}
|
||||
__b;
|
||||
} else {
|
||||
__c = _.keys(obj);
|
||||
__e = [];
|
||||
for (__d in __c) {
|
||||
if (__c.hasOwnProperty(__d)) {
|
||||
key = __c[__d];
|
||||
__e.push(iterator.call(context, obj[key], key, obj));
|
||||
__d = _.keys(obj);
|
||||
__f = [];
|
||||
for (__e in __d) {
|
||||
if (__d.hasOwnProperty(__e)) {
|
||||
key = __d[__e];
|
||||
__g = iterator.call(context, obj[key], key, obj);
|
||||
__f.push(__g);
|
||||
}
|
||||
}
|
||||
__e;
|
||||
__f;
|
||||
}
|
||||
} catch (e) {
|
||||
if (e !== breaker) {
|
||||
|
||||
20
test/fixtures/generation/each_no_wrap.js
vendored
20
test/fixtures/generation/each_no_wrap.js
vendored
@@ -2,7 +2,7 @@
|
||||
// The cornerstone, an each implementation.
|
||||
// Handles objects implementing forEach, arrays, and raw objects.
|
||||
_.each = function each(obj, iterator, context) {
|
||||
var __a, __b, __c, __d, __e, i, index, item, key;
|
||||
var __a, __b, __c, __d, __e, __f, __g, i, index, item, key;
|
||||
index = 0;
|
||||
try {
|
||||
if (obj.forEach) {
|
||||
@@ -13,20 +13,22 @@ _.each = function each(obj, iterator, context) {
|
||||
for (i in __a) {
|
||||
if (__a.hasOwnProperty(i)) {
|
||||
item = __a[i];
|
||||
__b.push(iterator.call(context, item, i, obj));
|
||||
__c = iterator.call(context, item, i, obj);
|
||||
__b.push(__c);
|
||||
}
|
||||
}
|
||||
__b;
|
||||
} else {
|
||||
__c = _.keys(obj);
|
||||
__e = [];
|
||||
for (__d in __c) {
|
||||
if (__c.hasOwnProperty(__d)) {
|
||||
key = __c[__d];
|
||||
__e.push(iterator.call(context, obj[key], key, obj));
|
||||
__d = _.keys(obj);
|
||||
__f = [];
|
||||
for (__e in __d) {
|
||||
if (__d.hasOwnProperty(__e)) {
|
||||
key = __d[__e];
|
||||
__g = iterator.call(context, obj[key], key, obj);
|
||||
__f.push(__g);
|
||||
}
|
||||
}
|
||||
__e;
|
||||
__f;
|
||||
}
|
||||
} catch (e) {
|
||||
if (e !== breaker) {
|
||||
|
||||
Reference in New Issue
Block a user