OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 js_backend; | 5 part of js_backend; |
6 | 6 |
7 abstract class _NamerName extends jsAst.Name { | 7 abstract class _NamerName extends jsAst.Name { |
8 int get _kind; | 8 int get _kind; |
9 _NamerName get _target => this; | 9 _NamerName get _target => this; |
10 | 10 |
11 toString() => throw new UnsupportedError("Cannot convert a name to a string"); | 11 String toString() { |
| 12 if (DEBUG_MODE) { |
| 13 return 'Name($key)'; |
| 14 } |
| 15 throw new UnsupportedError("Cannot convert a name to a string"); |
| 16 } |
12 } | 17 } |
13 | 18 |
14 enum _NamerNameKinds { | 19 enum _NamerNameKinds { |
15 StringBacked, | 20 StringBacked, |
16 Getter, | 21 Getter, |
17 Setter, | 22 Setter, |
18 Async, | 23 Async, |
19 Compound, | 24 Compound, |
20 Token | 25 Token |
21 } | 26 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 218 |
214 @override | 219 @override |
215 int compareTo(_NamerName other) => _target.compareTo(other); | 220 int compareTo(_NamerName other) => _target.compareTo(other); |
216 | 221 |
217 @override | 222 @override |
218 bool operator==(other) => _target == other; | 223 bool operator==(other) => _target == other; |
219 | 224 |
220 @override | 225 @override |
221 int get hashCode => _target.hashCode; | 226 int get hashCode => _target.hashCode; |
222 } | 227 } |
OLD | NEW |