| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 interface TreeElements { | 5 interface TreeElements { |
| 6 Element operator[](Node node); | 6 Element operator[](Node node); |
| 7 Selector getSelector(Send send); | 7 Selector getSelector(Send send); |
| 8 DartType getType(TypeAnnotation annotation); | 8 DartType getType(TypeAnnotation annotation); |
| 9 bool isParameterChecked(Element element); | 9 bool isParameterChecked(Element element); |
| 10 } | 10 } |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 void internalError(Node node, String message) { | 709 void internalError(Node node, String message) { |
| 710 compiler.internalError(message, node: node); | 710 compiler.internalError(message, node: node); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void unimplemented(Node node, String message) { | 713 void unimplemented(Node node, String message) { |
| 714 compiler.unimplemented(message, node: node); | 714 compiler.unimplemented(message, node: node); |
| 715 } | 715 } |
| 716 } | 716 } |
| 717 | 717 |
| 718 interface LabelScope { | 718 interface LabelScope { |
| 719 LabelScope get outer(); | 719 LabelScope get outer; |
| 720 LabelElement lookup(String label); | 720 LabelElement lookup(String label); |
| 721 } | 721 } |
| 722 | 722 |
| 723 class LabeledStatementLabelScope implements LabelScope { | 723 class LabeledStatementLabelScope implements LabelScope { |
| 724 final LabelScope outer; | 724 final LabelScope outer; |
| 725 final Map<String, LabelElement> labels; | 725 final Map<String, LabelElement> labels; |
| 726 LabeledStatementLabelScope(this.outer, this.labels); | 726 LabeledStatementLabelScope(this.outer, this.labels); |
| 727 LabelElement lookup(String labelName) { | 727 LabelElement lookup(String labelName) { |
| 728 LabelElement label = labels[labelName]; | 728 LabelElement label = labels[labelName]; |
| 729 if (label !== null) return label; | 729 if (label !== null) return label; |
| (...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2703 TopScope(LibraryElement library) : super(null, library); | 2703 TopScope(LibraryElement library) : super(null, library); |
| 2704 Element lookup(SourceString name) { | 2704 Element lookup(SourceString name) { |
| 2705 return library.find(name); | 2705 return library.find(name); |
| 2706 } | 2706 } |
| 2707 | 2707 |
| 2708 Element add(Element newElement) { | 2708 Element add(Element newElement) { |
| 2709 throw "Cannot add an element in the top scope"; | 2709 throw "Cannot add an element in the top scope"; |
| 2710 } | 2710 } |
| 2711 String toString() => '$element'; | 2711 String toString() => '$element'; |
| 2712 } | 2712 } |
| OLD | NEW |