Chromium Code Reviews| OLD | NEW |
|---|---|
| 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] |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 DartString otherString = other; | 36 DartString otherString = other; |
| 37 if (length != otherString.length) return false; | 37 if (length != otherString.length) return false; |
| 38 Iterator it1 = iterator; | 38 Iterator it1 = iterator; |
| 39 Iterator it2 = otherString.iterator; | 39 Iterator it2 = otherString.iterator; |
| 40 while (it1.moveNext()) { | 40 while (it1.moveNext()) { |
| 41 if (!it2.moveNext()) return false; | 41 if (!it2.moveNext()) return false; |
| 42 if (it1.current != it2.current) return false; | 42 if (it1.current != it2.current) return false; |
| 43 } | 43 } |
| 44 return true; | 44 return true; |
| 45 } | 45 } |
| 46 | |
| 47 int get hashCode => throw new UnsupportedError('ArgumentsTypes.hashCode'); | |
|
ngeoffray
2013/06/24 19:43:10
ArgumentsTypes => DartString.
ahe
2013/06/24 20:43:50
Done.
| |
| 48 | |
| 46 String toString() => "DartString#${length}:${slowToString()}"; | 49 String toString() => "DartString#${length}:${slowToString()}"; |
| 47 SourceString get source; | 50 SourceString get source; |
| 48 } | 51 } |
| 49 | 52 |
| 50 | 53 |
| 51 /** | 54 /** |
| 52 * A [DartString] where the content is represented by an actual [String]. | 55 * A [DartString] where the content is represented by an actual [String]. |
| 53 */ | 56 */ |
| 54 class LiteralDartString extends DartString { | 57 class LiteralDartString extends DartString { |
| 55 final String string; | 58 final String string; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 } | 229 } |
| 227 _current = value; | 230 _current = value; |
| 228 break; | 231 break; |
| 229 default: | 232 default: |
| 230 _current = code; | 233 _current = code; |
| 231 } | 234 } |
| 232 return true; | 235 return true; |
| 233 } | 236 } |
| 234 } | 237 } |
| 235 | 238 |
| OLD | NEW |