| 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 case ReferenceKind.function: | 943 case ReferenceKind.function: |
| 944 case ReferenceKind.propertyAccessor: | 944 case ReferenceKind.propertyAccessor: |
| 945 case ReferenceKind.method: | 945 case ReferenceKind.method: |
| 946 case ReferenceKind.prefix: | 946 case ReferenceKind.prefix: |
| 947 case ReferenceKind.unresolved: | 947 case ReferenceKind.unresolved: |
| 948 case ReferenceKind.variable: | 948 case ReferenceKind.variable: |
| 949 // Should never happen. Exported names never refer to import prefixes, | 949 // Should never happen. Exported names never refer to import prefixes, |
| 950 // and they always refer to defined top-level entities. | 950 // and they always refer to defined top-level entities. |
| 951 throw new StateError('Unexpected export name kind: ${exportName.kind}'); | 951 throw new StateError('Unexpected export name kind: ${exportName.kind}'); |
| 952 } | 952 } |
| 953 return null; |
| 953 } | 954 } |
| 954 | 955 |
| 955 /** | 956 /** |
| 956 * Build the export namespace for the library by aggregating together its | 957 * Build the export namespace for the library by aggregating together its |
| 957 * [publicNamespace] and [exportNames]. | 958 * [publicNamespace] and [exportNames]. |
| 958 */ | 959 */ |
| 959 Namespace buildExportNamespace( | 960 Namespace buildExportNamespace( |
| 960 Namespace publicNamespace, List<LinkedExportName> exportNames) { | 961 Namespace publicNamespace, List<LinkedExportName> exportNames) { |
| 961 HashMap<String, Element> definedNames = new HashMap<String, Element>(); | 962 HashMap<String, Element> definedNames = new HashMap<String, Element>(); |
| 962 // Start by populating all the public names from [publicNamespace]. | 963 // Start by populating all the public names from [publicNamespace]. |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 static String _getElementIdentifier(String name, ReferenceKind kind) { | 1837 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 1837 if (kind == ReferenceKind.topLevelPropertyAccessor || | 1838 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 1838 kind == ReferenceKind.propertyAccessor) { | 1839 kind == ReferenceKind.propertyAccessor) { |
| 1839 if (!name.endsWith('=')) { | 1840 if (!name.endsWith('=')) { |
| 1840 return name + '?'; | 1841 return name + '?'; |
| 1841 } | 1842 } |
| 1842 } | 1843 } |
| 1843 return name; | 1844 return name; |
| 1844 } | 1845 } |
| 1845 } | 1846 } |
| OLD | NEW |