| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'dart:collection' show LinkedHashMap; | 7 import 'dart:collection' show LinkedHashMap; |
| 8 | 8 |
| 9 import 'elements.dart'; | 9 import 'elements.dart'; |
| 10 import '../../compiler.dart' as api; | 10 import '../../compiler.dart' as api; |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 return localScope.values.where((Element element) { | 788 return localScope.values.where((Element element) { |
| 789 // At this point [localScope] only contains members so we don't need | 789 // At this point [localScope] only contains members so we don't need |
| 790 // to check for foreign or prefix elements. | 790 // to check for foreign or prefix elements. |
| 791 return !element.name.isPrivate(); | 791 return !element.name.isPrivate(); |
| 792 }); | 792 }); |
| 793 } | 793 } |
| 794 | 794 |
| 795 bool hasLibraryName() => libraryTag != null; | 795 bool hasLibraryName() => libraryTag != null; |
| 796 | 796 |
| 797 /** | 797 /** |
| 798 * Returns the library name (as defined by the #library tag) or for script | 798 * Returns the library name (as defined by the library tag) or for script |
| 799 * (which have no #library tag) the script file name. The latter case is used | 799 * (which have no library tag) the script file name. The latter case is used |
| 800 * to private 'library name' for scripts to use for instance in dartdoc. | 800 * to private 'library name' for scripts to use for instance in dartdoc. |
| 801 */ | 801 */ |
| 802 String getLibraryOrScriptName() { | 802 String getLibraryOrScriptName() { |
| 803 if (libraryTag != null) { | 803 if (libraryTag != null) { |
| 804 return libraryTag.name.toString(); | 804 return libraryTag.name.toString(); |
| 805 } else { | 805 } else { |
| 806 // Use the file name as script name. | 806 // Use the file name as script name. |
| 807 String path = canonicalUri.path; | 807 String path = canonicalUri.path; |
| 808 return path.substring(path.lastIndexOf('/') + 1); | 808 return path.substring(path.lastIndexOf('/') + 1); |
| 809 } | 809 } |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 | 2179 |
| 2180 MetadataAnnotation ensureResolved(Compiler compiler) { | 2180 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2181 if (resolutionState == STATE_NOT_STARTED) { | 2181 if (resolutionState == STATE_NOT_STARTED) { |
| 2182 compiler.resolver.resolveMetadataAnnotation(this); | 2182 compiler.resolver.resolveMetadataAnnotation(this); |
| 2183 } | 2183 } |
| 2184 return this; | 2184 return this; |
| 2185 } | 2185 } |
| 2186 | 2186 |
| 2187 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2187 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2188 } | 2188 } |
| OLD | NEW |