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

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

Issue 1504553002: Better handling for binary operators in => bodies. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years 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/0400/0434.unit ('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 >>> keeps map on one line if possible 2 >>> keeps map on one line if possible
3 sendPort.send({'type': 'error', 'error': 'oops'}); 3 sendPort.send({'type': 'error', 'error': 'oops'});
4 <<< 4 <<<
5 sendPort.send( 5 sendPort.send(
6 {'type': 'error', 'error': 'oops'}); 6 {'type': 'error', 'error': 'oops'});
7 >>> prefers to wrap before "." 7 >>> prefers to wrap before "."
8 new Future.sync(() => callback('msg')).then( 8 new Future.sync(() => callback('msg')).then(
9 (result) => replyTo.send()).catchError((error) {}); 9 (result) => replyTo.send()).catchError((error) {});
10 <<< 10 <<<
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ; 88 ;
89 }, 89 },
90 argument, 90 argument,
91 () { 91 () {
92 ; 92 ;
93 })); 93 }));
94 >>> wrap before => 94 >>> wrap before =>
95 receiver.firstMethod().next((parameter) => longIdentifier == veryLongIdentifier) ; 95 receiver.firstMethod().next((parameter) => longIdentifier == veryLongIdentifier) ;
96 <<< 96 <<<
97 receiver.firstMethod().next( 97 receiver.firstMethod().next(
98 (parameter) => longIdentifier == 98 (parameter) =>
99 longIdentifier ==
99 veryLongIdentifier); 100 veryLongIdentifier);
100 >>> wrap after => 101 >>> wrap after =>
101 receiver.firstMethod().next(() => veryveryveryverylongIdentifier == veryLongIden tifier); 102 receiver.firstMethod().next(() => veryveryveryverylongIdentifier == veryLongIden tifier);
102 <<< 103 <<<
103 receiver.firstMethod().next(() => 104 receiver.firstMethod().next(() =>
104 veryveryveryverylongIdentifier == 105 veryveryveryverylongIdentifier ==
105 veryLongIdentifier); 106 veryLongIdentifier);
106 >>> wrap at nested binary operator 107 >>> wrap at nested binary operator
107 receiver.firstMethod().next(longIdentifier == veryLongIdentifier); 108 receiver.firstMethod().next(longIdentifier == veryLongIdentifier);
108 <<< 109 <<<
109 receiver.firstMethod().next( 110 receiver.firstMethod().next(
110 longIdentifier == 111 longIdentifier ==
111 veryLongIdentifier); 112 veryLongIdentifier);
112 >>> list inside method chain 113 >>> list inside method chain
113 receiver.first([listItem, secondItem, thirdItem]).second(); 114 receiver.first([listItem, secondItem, thirdItem]).second();
114 <<< 115 <<<
115 receiver.first([ 116 receiver.first([
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 veryLongIdentifier / 191 veryLongIdentifier /
191 veryLongIdentifier - 192 veryLongIdentifier -
192 veryLongIdentifier; 193 veryLongIdentifier;
193 >>> choose extra nesting if it leads to better solution 194 >>> choose extra nesting if it leads to better solution
194 longIdentifier + 195 longIdentifier +
195 (longIdentifier ? 0 : 196 (longIdentifier ? 0 :
196 1) == identifier; 197 1) == identifier;
197 <<< 198 <<<
198 longIdentifier + 199 longIdentifier +
199 (longIdentifier ? 0 : 1) == 200 (longIdentifier ? 0 : 1) ==
200 identifier; 201 identifier;
202 >>> normal indent before unsplit binary operators in => body
203 veryLongFunction() => extremelyLongArgument + argument;
204 <<<
205 veryLongFunction() =>
206 extremelyLongArgument + argument;
207 >>> no extra indent before binary operators in => body
208 veryLongFunction() => longArgument + longArgument + longArgument;
209 <<<
210 veryLongFunction() =>
211 longArgument +
212 longArgument +
213 longArgument;
OLDNEW
« no previous file with comments | « test/regression/0400/0434.unit ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698