Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/splitting/loops.stmt

Issue 1255703002: Don't force for fully split if initializers or updaters do. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/regression/0300/0377.stmt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « test/regression/0300/0377.stmt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698