| 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 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../helpers/helpers.dart'; // Included for debug helpers. | 9 import '../helpers/helpers.dart'; // Included for debug helpers. |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 if (enclosingElement.isPatch) { | 556 if (enclosingElement.isPatch) { |
| 557 implementationLibrary.addMember(element, listener); | 557 implementationLibrary.addMember(element, listener); |
| 558 } else { | 558 } else { |
| 559 library.addMember(element, listener); | 559 library.addMember(element, listener); |
| 560 } | 560 } |
| 561 } | 561 } |
| 562 | 562 |
| 563 void setPartOf(PartOf tag, DiagnosticListener listener) { | 563 void setPartOf(PartOf tag, DiagnosticListener listener) { |
| 564 LibraryElementX library = enclosingElement; | 564 LibraryElementX library = enclosingElement; |
| 565 if (library.entryCompilationUnit == this) { | 565 if (library.entryCompilationUnit == this) { |
| 566 listener.reportError(tag, MessageKind.ILLEGAL_DIRECTIVE); | 566 listener.reportError(tag, MessageKind.IMPORT_PART_OF); |
| 567 return; | 567 return; |
| 568 } | 568 } |
| 569 if (!localMembers.isEmpty) { | 569 if (!localMembers.isEmpty) { |
| 570 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); | 570 listener.reportError(tag, MessageKind.BEFORE_TOP_LEVEL); |
| 571 return; | 571 return; |
| 572 } | 572 } |
| 573 if (partTag != null) { | 573 if (partTag != null) { |
| 574 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF); | 574 listener.reportWarning(tag, MessageKind.DUPLICATED_PART_OF); |
| 575 return; | 575 return; |
| 576 } | 576 } |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 AstElement get definingElement; | 2825 AstElement get definingElement; |
| 2826 | 2826 |
| 2827 bool get hasResolvedAst => definingElement.hasTreeElements; | 2827 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2828 | 2828 |
| 2829 ResolvedAst get resolvedAst { | 2829 ResolvedAst get resolvedAst { |
| 2830 return new ResolvedAst(declaration, | 2830 return new ResolvedAst(declaration, |
| 2831 definingElement.node, definingElement.treeElements); | 2831 definingElement.node, definingElement.treeElements); |
| 2832 } | 2832 } |
| 2833 | 2833 |
| 2834 } | 2834 } |
| OLD | NEW |