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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/tree/dartstring.dart

Issue 14022007: Move Iterable implementation to collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 tree; 5 part of tree;
6 6
7 /** 7 /**
8 * The [DartString] type represents a Dart string value as a sequence of Unicode 8 * The [DartString] type represents a Dart string value as a sequence of Unicode
9 * Scalar Values. 9 * Scalar Values.
10 * After parsing, any valid [LiteralString] will contain a [DartString] 10 * After parsing, any valid [LiteralString] will contain a [DartString]
11 * representing its content after removing quotes and resolving escapes in 11 * representing its content after removing quotes and resolving escapes in
12 * its source. 12 * its source.
13 */ 13 */
14 abstract class DartString extends Iterable<int> { 14 abstract class DartString extends IterableBase<int> {
15 factory DartString.empty() => const LiteralDartString(""); 15 factory DartString.empty() => const LiteralDartString("");
16 // This is a convenience constructor. If you need a const literal DartString, 16 // This is a convenience constructor. If you need a const literal DartString,
17 // use [const LiteralDartString(string)] directly. 17 // use [const LiteralDartString(string)] directly.
18 factory DartString.literal(String string) => new LiteralDartString(string); 18 factory DartString.literal(String string) => new LiteralDartString(string);
19 factory DartString.rawString(SourceString source, int length) => 19 factory DartString.rawString(SourceString source, int length) =>
20 new RawSourceDartString(source, length); 20 new RawSourceDartString(source, length);
21 factory DartString.escapedString(SourceString source, int length) => 21 factory DartString.escapedString(SourceString source, int length) =>
22 new EscapedSourceDartString(source, length); 22 new EscapedSourceDartString(source, length);
23 factory DartString.concat(DartString first, DartString second) { 23 factory DartString.concat(DartString first, DartString second) {
24 if (first.isEmpty) return second; 24 if (first.isEmpty) return second;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 _current = value; 227 _current = value;
228 break; 228 break;
229 default: 229 default:
230 _current = code; 230 _current = code;
231 } 231 }
232 return true; 232 return true;
233 } 233 }
234 } 234 }
235 235
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698