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

Side by Side Diff: sdk/lib/convert/chunked_conversion.dart

Issue 1908943004: Fix void foo(..) => ... to use { } instead. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Upload Created 4 years, 8 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 | « sdk/lib/convert/byte_conversion.dart ('k') | sdk/lib/convert/html_escape.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.convert; 5 part of dart.convert;
6 6
7 typedef void _ChunkedConversionCallback<T>(T accumulated); 7 typedef void _ChunkedConversionCallback<T>(T accumulated);
8 8
9 /** 9 /**
10 * A converter that supports chunked conversions. 10 * A converter that supports chunked conversions.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 * [handleData] is added into this sink. 123 * [handleData] is added into this sink.
124 */ 124 */
125 ChunkedConversionSink<S> _chunkedSink; 125 ChunkedConversionSink<S> _chunkedSink;
126 126
127 _ConverterStreamEventSink( 127 _ConverterStreamEventSink(
128 Converter/*=ChunkedConverter<dynamic, dynamic, S, T>*/ converter, 128 Converter/*=ChunkedConverter<dynamic, dynamic, S, T>*/ converter,
129 EventSink<T> sink) 129 EventSink<T> sink)
130 : this._eventSink = sink, 130 : this._eventSink = sink,
131 _chunkedSink = converter.startChunkedConversion(sink); 131 _chunkedSink = converter.startChunkedConversion(sink);
132 132
133 void add(S o) => _chunkedSink.add(o); 133 void add(S o) { _chunkedSink.add(o); }
134 void addError(Object error, [StackTrace stackTrace]) { 134 void addError(Object error, [StackTrace stackTrace]) {
135 _eventSink.addError(error, stackTrace); 135 _eventSink.addError(error, stackTrace);
136 } 136 }
137 void close() => _chunkedSink.close(); 137 void close() { _chunkedSink.close(); }
138 } 138 }
139 139
140 /** 140 /**
141 * Fuses two chunked converters. 141 * Fuses two chunked converters.
142 */ 142 */
143 class _FusedChunkedConverter<S, M, T, S2, M2, T2> extends 143 class _FusedChunkedConverter<S, M, T, S2, M2, T2> extends
144 ChunkedConverter<S, T, S2, T2> { 144 ChunkedConverter<S, T, S2, T2> {
145 final ChunkedConverter<S, M, S2, M2> _first; 145 final ChunkedConverter<S, M, S2, M2> _first;
146 final ChunkedConverter<M, T, M2, T2> _second; 146 final ChunkedConverter<M, T, M2, T2> _second;
147 147
148 _FusedChunkedConverter(this._first, this._second); 148 _FusedChunkedConverter(this._first, this._second);
149 149
150 T convert(S input) => _second.convert(_first.convert(input)); 150 T convert(S input) => _second.convert(_first.convert(input));
151 151
152 ChunkedConversionSink<S2> startChunkedConversion(Sink<T2> sink) { 152 ChunkedConversionSink<S2> startChunkedConversion(Sink<T2> sink) {
153 return _first.startChunkedConversion(_second.startChunkedConversion(sink)); 153 return _first.startChunkedConversion(_second.startChunkedConversion(sink));
154 } 154 }
155 } 155 }
OLDNEW
« no previous file with comments | « sdk/lib/convert/byte_conversion.dart ('k') | sdk/lib/convert/html_escape.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698