OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library immi; | 5 library immi; |
6 | 6 |
7 import 'package:service/dart/struct.dart'; | 7 import 'package:service/dart/struct.dart'; |
8 | 8 |
9 // TODO(zerny): Can we find a way to depend on the generated builder hierarchy | 9 // TODO(zerny): Can we find a way to depend on the generated builder hierarchy |
10 // so we can use the actual builder types below? Otherwise, remove the commented | 10 // so we can use the actual builder types below? Otherwise, remove the commented |
11 // builder types. | 11 // builder types. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 if (currentLength > previousLength) { | 168 if (currentLength > previousLength) { |
169 patches.add(new ListInsertPatch( | 169 patches.add(new ListInsertPatch( |
170 previousLength, currentLength - previousLength, current)); | 170 previousLength, currentLength - previousLength, current)); |
171 } else if (currentLength < previousLength) { | 171 } else if (currentLength < previousLength) { |
172 patches.add(new ListRemovePatch( | 172 patches.add(new ListRemovePatch( |
173 currentLength, previousLength - currentLength, previous)); | 173 currentLength, previousLength - currentLength, previous)); |
174 } | 174 } |
175 | 175 |
176 return patches.isEmpty ? null : new ListPatch(type, patches); | 176 return patches.isEmpty ? null : new ListPatch(type, patches); |
177 } | 177 } |
OLD | NEW |