| 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; | 9 isPrivateName; |
| 10 import '../constants/constant_constructors.dart'; | 10 import '../constants/constant_constructors.dart'; |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 if (enclosingElement.isPatch) { | 689 if (enclosingElement.isPatch) { |
| 690 implementationLibrary.addMember(element, listener); | 690 implementationLibrary.addMember(element, listener); |
| 691 } else { | 691 } else { |
| 692 library.addMember(element, listener); | 692 library.addMember(element, listener); |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 | 695 |
| 696 void setPartOf(PartOf tag, DiagnosticListener listener) { | 696 void setPartOf(PartOf tag, DiagnosticListener listener) { |
| 697 LibraryElementX library = enclosingElement; | 697 LibraryElementX library = enclosingElement; |
| 698 if (library.entryCompilationUnit == this) { | 698 if (library.entryCompilationUnit == this) { |
| 699 partTag = tag; |
| 699 listener.reportError(tag, MessageKind.IMPORT_PART_OF); | 700 listener.reportError(tag, MessageKind.IMPORT_PART_OF); |
| 700 return; | 701 return; |
| 701 } | 702 } |
| 702 if (!localMembers.isEmpty) { | 703 if (!localMembers.isEmpty) { |
| 703 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); | 704 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); |
| 704 return; | 705 return; |
| 705 } | 706 } |
| 706 if (partTag != null) { | 707 if (partTag != null) { |
| 707 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF); | 708 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF); |
| 708 return; | 709 return; |
| (...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2909 AstElement get definingElement; | 2910 AstElement get definingElement; |
| 2910 | 2911 |
| 2911 bool get hasResolvedAst => definingElement.hasTreeElements; | 2912 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2912 | 2913 |
| 2913 ResolvedAst get resolvedAst { | 2914 ResolvedAst get resolvedAst { |
| 2914 return new ResolvedAst(declaration, | 2915 return new ResolvedAst(declaration, |
| 2915 definingElement.node, definingElement.treeElements); | 2916 definingElement.node, definingElement.treeElements); |
| 2916 } | 2917 } |
| 2917 | 2918 |
| 2918 } | 2919 } |
| OLD | NEW |