| 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 library summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 | 1012 |
| 1013 /** | 1013 /** |
| 1014 * Resynthesize a [NamespaceCombinator]. | 1014 * Resynthesize a [NamespaceCombinator]. |
| 1015 */ | 1015 */ |
| 1016 NamespaceCombinator buildCombinator(UnlinkedCombinator serializedCombinator) { | 1016 NamespaceCombinator buildCombinator(UnlinkedCombinator serializedCombinator) { |
| 1017 if (serializedCombinator.shows.isNotEmpty) { | 1017 if (serializedCombinator.shows.isNotEmpty) { |
| 1018 ShowElementCombinatorImpl combinator = new ShowElementCombinatorImpl(); | 1018 ShowElementCombinatorImpl combinator = new ShowElementCombinatorImpl(); |
| 1019 // Note: we call toList() so that we don't retain a reference to the | 1019 // Note: we call toList() so that we don't retain a reference to the |
| 1020 // deserialized data structure. | 1020 // deserialized data structure. |
| 1021 combinator.shownNames = serializedCombinator.shows.toList(); | 1021 combinator.shownNames = serializedCombinator.shows.toList(); |
| 1022 combinator.offset = serializedCombinator.offset; |
| 1023 combinator.end = serializedCombinator.end; |
| 1022 return combinator; | 1024 return combinator; |
| 1023 } else { | 1025 } else { |
| 1024 HideElementCombinatorImpl combinator = new HideElementCombinatorImpl(); | 1026 HideElementCombinatorImpl combinator = new HideElementCombinatorImpl(); |
| 1025 // Note: we call toList() so that we don't retain a reference to the | 1027 // Note: we call toList() so that we don't retain a reference to the |
| 1026 // deserialized data structure. | 1028 // deserialized data structure. |
| 1027 combinator.hiddenNames = serializedCombinator.hides.toList(); | 1029 combinator.hiddenNames = serializedCombinator.hides.toList(); |
| 1028 return combinator; | 1030 return combinator; |
| 1029 } | 1031 } |
| 1030 } | 1032 } |
| 1031 | 1033 |
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2419 List<DartType> typeArguments = const <DartType>[]; | 2421 List<DartType> typeArguments = const <DartType>[]; |
| 2420 if (numTypeArguments != 0) { | 2422 if (numTypeArguments != 0) { |
| 2421 typeArguments = <DartType>[]; | 2423 typeArguments = <DartType>[]; |
| 2422 for (int i = 0; i < numTypeArguments; i++) { | 2424 for (int i = 0; i < numTypeArguments; i++) { |
| 2423 typeArguments.add(getTypeArgument(i)); | 2425 typeArguments.add(getTypeArgument(i)); |
| 2424 } | 2426 } |
| 2425 } | 2427 } |
| 2426 return typeArguments; | 2428 return typeArguments; |
| 2427 } | 2429 } |
| 2428 } | 2430 } |
| OLD | NEW |