| 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 abstract class TreeElements { | 5 abstract class 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { | 1755 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { |
| 1756 visit(link.head); | 1756 visit(link.head); |
| 1757 } | 1757 } |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 visitOperator(Operator node) { | 1760 visitOperator(Operator node) { |
| 1761 unimplemented(node, 'operator'); | 1761 unimplemented(node, 'operator'); |
| 1762 } | 1762 } |
| 1763 | 1763 |
| 1764 visitReturn(Return node) { | 1764 visitReturn(Return node) { |
| 1765 if (node.isRedirectingConstructorBody) { |
| 1766 unimplemented(node, 'redirecting constructors'); |
| 1767 } |
| 1765 visit(node.expression); | 1768 visit(node.expression); |
| 1766 } | 1769 } |
| 1767 | 1770 |
| 1768 visitThrow(Throw node) { | 1771 visitThrow(Throw node) { |
| 1769 if (!inCatchBlock && node.expression === null) { | 1772 if (!inCatchBlock && node.expression === null) { |
| 1770 error(node, MessageKind.THROW_WITHOUT_EXPRESSION); | 1773 error(node, MessageKind.THROW_WITHOUT_EXPRESSION); |
| 1771 } | 1774 } |
| 1772 visit(node.expression); | 1775 visit(node.expression); |
| 1773 } | 1776 } |
| 1774 | 1777 |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3137 return result; | 3140 return result; |
| 3138 } | 3141 } |
| 3139 Element lookup(SourceString name) => localLookup(name); | 3142 Element lookup(SourceString name) => localLookup(name); |
| 3140 Element lexicalLookup(SourceString name) => localLookup(name); | 3143 Element lexicalLookup(SourceString name) => localLookup(name); |
| 3141 | 3144 |
| 3142 Element add(Element newElement) { | 3145 Element add(Element newElement) { |
| 3143 throw "Cannot add an element in a patch library scope"; | 3146 throw "Cannot add an element in a patch library scope"; |
| 3144 } | 3147 } |
| 3145 String toString() => 'PatchLibraryScope($origin,$patch)'; | 3148 String toString() => 'PatchLibraryScope($origin,$patch)'; |
| 3146 } | 3149 } |
| OLD | NEW |