OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 util_implementation; | 5 library compiler_util.link_implementation; |
| 6 |
| 7 import 'dart:collection' show |
| 8 IterableBase; |
| 9 |
| 10 import '../link.dart' show |
| 11 Link, |
| 12 LinkBuilder; |
6 | 13 |
7 class LinkIterator<T> implements Iterator<T> { | 14 class LinkIterator<T> implements Iterator<T> { |
8 T _current; | 15 T _current; |
9 Link<T> _link; | 16 Link<T> _link; |
10 | 17 |
11 LinkIterator(Link<T> this._link); | 18 LinkIterator(Link<T> this._link); |
12 | 19 |
13 T get current => _current; | 20 T get current => _current; |
14 | 21 |
15 bool moveNext() { | 22 bool moveNext() { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 216 } |
210 throw new StateError("no elements"); | 217 throw new StateError("no elements"); |
211 } | 218 } |
212 | 219 |
213 void clear() { | 220 void clear() { |
214 head = null; | 221 head = null; |
215 lastLink = null; | 222 lastLink = null; |
216 length = 0; | 223 length = 0; |
217 } | 224 } |
218 } | 225 } |
OLD | NEW |