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 '../compiler.dart' show | 7 import '../compiler.dart' show |
8 Compiler, | 8 Compiler; |
9 isPrivateName; | |
10 import '../constants/constant_constructors.dart'; | 9 import '../constants/constant_constructors.dart'; |
11 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
12 import '../constants/expressions.dart'; | 11 import '../constants/expressions.dart'; |
13 import '../dart_types.dart'; | 12 import '../dart_types.dart'; |
14 import '../diagnostics/diagnostic_listener.dart'; | 13 import '../diagnostics/diagnostic_listener.dart'; |
15 import '../diagnostics/invariant.dart' show | 14 import '../diagnostics/invariant.dart' show |
16 invariant; | 15 invariant; |
17 import '../diagnostics/messages.dart'; | 16 import '../diagnostics/messages.dart'; |
18 import '../diagnostics/source_span.dart' show | 17 import '../diagnostics/source_span.dart' show |
19 SourceSpan; | 18 SourceSpan; |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 localMembers.forEach(filterPatch); | 1055 localMembers.forEach(filterPatch); |
1057 } else { | 1056 } else { |
1058 localMembers.forEach(f); | 1057 localMembers.forEach(f); |
1059 } | 1058 } |
1060 } | 1059 } |
1061 | 1060 |
1062 Iterable<Element> getNonPrivateElementsInScope() { | 1061 Iterable<Element> getNonPrivateElementsInScope() { |
1063 return localScope.values.where((Element element) { | 1062 return localScope.values.where((Element element) { |
1064 // At this point [localScope] only contains members so we don't need | 1063 // At this point [localScope] only contains members so we don't need |
1065 // to check for foreign or prefix elements. | 1064 // to check for foreign or prefix elements. |
1066 return !isPrivateName(element.name); | 1065 return !Name.isPrivateName(element.name); |
1067 }); | 1066 }); |
1068 } | 1067 } |
1069 | 1068 |
1070 bool hasLibraryName() => libraryTag != null; | 1069 bool hasLibraryName() => libraryTag != null; |
1071 | 1070 |
1072 /** | 1071 /** |
1073 * Returns the library name, which is either the name given in the library tag | 1072 * Returns the library name, which is either the name given in the library tag |
1074 * or the empty string if there is no library tag. | 1073 * or the empty string if there is no library tag. |
1075 */ | 1074 */ |
1076 String getLibraryName() { | 1075 String getLibraryName() { |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 AstElement get definingElement; | 2909 AstElement get definingElement; |
2911 | 2910 |
2912 bool get hasResolvedAst => definingElement.hasTreeElements; | 2911 bool get hasResolvedAst => definingElement.hasTreeElements; |
2913 | 2912 |
2914 ResolvedAst get resolvedAst { | 2913 ResolvedAst get resolvedAst { |
2915 return new ResolvedAst(declaration, | 2914 return new ResolvedAst(declaration, |
2916 definingElement.node, definingElement.treeElements); | 2915 definingElement.node, definingElement.treeElements); |
2917 } | 2916 } |
2918 | 2917 |
2919 } | 2918 } |
OLD | NEW |