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

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

Issue 1252323003: Allow arguments before and after block-formatted functions. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Update pubspec and changelog. Created 5 years, 4 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/splitting/arguments.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 >>> args before and after function forces nesting 2 >>> args before and after function do not force nesting
3 method(first,() {fn;},third); 3 method(first,() {fn;},third);
4 <<< 4 <<<
5 method( 5 method(first, () {
6 first, 6 fn;
7 () { 7 }, third);
8 fn;
9 },
10 third);
11 >>> nothing but function args does not nest 8 >>> nothing but function args does not nest
12 longFunctionName(() {;}, () {;}, () {;}); 9 longFunctionName(() {;}, () {;}, () {;});
13 <<< 10 <<<
14 longFunctionName(() { 11 longFunctionName(() {
15 ; 12 ;
16 }, () { 13 }, () {
17 ; 14 ;
18 }, () { 15 }, () {
19 ; 16 ;
20 }); 17 });
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 body; 158 body;
162 })); 159 }));
163 >>> do nest because of nested many-arg method call 160 >>> do nest because of nested many-arg method call
164 obj.outer(argument, obj.inner(() {body;})); 161 obj.outer(argument, obj.inner(() {body;}));
165 <<< 162 <<<
166 obj.outer( 163 obj.outer(
167 argument, 164 argument,
168 obj.inner(() { 165 obj.inner(() {
169 body; 166 body;
170 })); 167 }));
171 >>> force named args to split on positional function 168 >>> do not force named args to split on positional function
172 function(argument, () {;}, 169 function(argument, () {;},
173 named: argument, another: argument); 170 named: argument, another: argument);
174 <<< 171 <<<
175 function( 172 function(argument, () {
176 argument, 173 ;
177 () { 174 }, named: argument, another: argument);
178 ; 175 >>> args before and after functions split independently
179 }, 176 longFunction(argument, argument, argument, argument, argument,
180 named: argument, 177 () {;}, () {;}, argument, argument, argument, argument, argument);
181 another: argument); 178 <<<
179 longFunction(argument, argument,
180 argument, argument, argument, () {
181 ;
182 }, () {
183 ;
184 }, argument, argument, argument,
185 argument, argument);
OLDNEW
« no previous file with comments | « test/splitting/arguments.stmt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698