OLD | NEW |
1 40 columns | | 1 40 columns | |
2 >>> do not split before first clause | 2 >>> do not split before first clause |
3 for (extremelyReallyQuiteVeryLongFirstClause; second; third) {} | 3 for (extremelyReallyQuiteVeryLongFirstClause; second; third) {} |
4 <<< | 4 <<< |
5 for (extremelyReallyQuiteVeryLongFirstClause; | 5 for (extremelyReallyQuiteVeryLongFirstClause; |
6 second; | 6 second; |
7 third) {} | 7 third) {} |
8 >>> split after first clause | 8 >>> split after first clause |
9 for (veryLongFirstClause; veryLongSecondClause; third) {} | 9 for (veryLongFirstClause; veryLongSecondClause; third) {} |
10 <<< | 10 <<< |
(...skipping 15 matching lines...) Expand all Loading... |
26 <<< | 26 <<< |
27 for (var first = initializer, | 27 for (var first = initializer, |
28 second = initializer; | 28 second = initializer; |
29 1; | 29 1; |
30 2) {} | 30 2) {} |
31 >>> unsplit updaters | 31 >>> unsplit updaters |
32 for (foo; bar; a++, b++) {} | 32 for (foo; bar; a++, b++) {} |
33 <<< | 33 <<< |
34 for (foo; bar; a++, b++) {} | 34 for (foo; bar; a++, b++) {} |
35 >>> split between updaters splits everything | 35 >>> split between updaters splits everything |
36 for (foo; bar; first = 1, second = 2, third = 3) {} | 36 for (foo; bar; first = 1, second = 2, third = 3, fourth = 4) {} |
37 <<< | 37 <<< |
38 for (foo; | 38 for (foo; |
39 bar; | 39 bar; |
40 first = 1, | 40 first = 1, |
41 second = 2, | 41 second = 2, |
42 third = 3) {} | 42 third = 3, |
| 43 fourth = 4) {} |
43 >>> nest wrapped initializer | 44 >>> nest wrapped initializer |
44 for (very + long + initialization + expression; a; b) {} | 45 for (very + long + initialization + expression; a; b) {} |
45 <<< | 46 <<< |
46 for (very + | 47 for (very + |
47 long + | 48 long + |
48 initialization + | 49 initialization + |
49 expression; | 50 expression; |
50 a; | 51 a; |
51 b) {} | 52 b) {} |
52 >>> split in for-in loop | 53 >>> split in for-in loop |
53 for (var identifier in iteratableExpression) {} | 54 for (var identifier in iteratableExpression) {} |
54 <<< | 55 <<< |
55 for (var identifier | 56 for (var identifier |
56 in iteratableExpression) {} | 57 in iteratableExpression) {} |
57 >>> split in while condition | 58 >>> split in while condition |
58 while (aLongConditionExpressionThatWraps) { | 59 while (aLongConditionExpressionThatWraps) { |
59 ; | 60 ; |
60 } | 61 } |
61 <<< | 62 <<< |
62 while ( | 63 while ( |
63 aLongConditionExpressionThatWraps) { | 64 aLongConditionExpressionThatWraps) { |
64 ; | 65 ; |
| 66 } |
| 67 >>> don't force variables to split if clauses do |
| 68 for (var a = 1, b = 2; longCondition(expression); a += b) { |
| 69 ; |
| 70 } |
| 71 <<< |
| 72 for (var a = 1, b = 2; |
| 73 longCondition(expression); |
| 74 a += b) { |
| 75 ; |
| 76 } |
| 77 >>> don't force updates to split if clauses do |
| 78 for (var a = 0; longCondition(expression); a += 1, b += 1) { |
| 79 ; |
| 80 } |
| 81 <<< |
| 82 for (var a = 0; |
| 83 longCondition(expression); |
| 84 a += 1, b += 1) { |
| 85 ; |
65 } | 86 } |
OLD | NEW |