Chromium Code Reviews| 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 } | 8 } |
| 9 | 9 |
| 10 class TreeElementMapping implements TreeElements { | 10 class TreeElementMapping implements TreeElements { |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 | 895 |
| 896 visitLiteralBool(LiteralBool node) { | 896 visitLiteralBool(LiteralBool node) { |
| 897 } | 897 } |
| 898 | 898 |
| 899 visitLiteralString(LiteralString node) { | 899 visitLiteralString(LiteralString node) { |
| 900 } | 900 } |
| 901 | 901 |
| 902 visitLiteralNull(LiteralNull node) { | 902 visitLiteralNull(LiteralNull node) { |
| 903 } | 903 } |
| 904 | 904 |
| 905 visitStringJuxtaposition(StringJuxtaposition node) { | |
| 906 if (node.isInterpolation) node.visitChildren(this); | |
|
ngeoffray
2012/03/14 12:29:58
Do you need the check? I'd prefer if visitChildren
Lasse Reichstein Nielsen
2012/03/14 13:04:49
visitChildren will visit everything - which will b
| |
| 907 } | |
| 908 | |
| 905 visitNodeList(NodeList node) { | 909 visitNodeList(NodeList node) { |
| 906 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { | 910 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { |
| 907 visit(link.head); | 911 visit(link.head); |
| 908 } | 912 } |
| 909 } | 913 } |
| 910 | 914 |
| 911 visitOperator(Operator node) { | 915 visitOperator(Operator node) { |
| 912 unimplemented(node, 'operator'); | 916 unimplemented(node, 'operator'); |
| 913 } | 917 } |
| 914 | 918 |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1655 class TopScope extends Scope { | 1659 class TopScope extends Scope { |
| 1656 LibraryElement get library() => element; | 1660 LibraryElement get library() => element; |
| 1657 | 1661 |
| 1658 TopScope(LibraryElement library) : super(null, library); | 1662 TopScope(LibraryElement library) : super(null, library); |
| 1659 Element lookup(SourceString name) => library.find(name); | 1663 Element lookup(SourceString name) => library.find(name); |
| 1660 | 1664 |
| 1661 Element add(Element element) { | 1665 Element add(Element element) { |
| 1662 throw "Cannot add an element in the top scope"; | 1666 throw "Cannot add an element in the top scope"; |
| 1663 } | 1667 } |
| 1664 } | 1668 } |
| OLD | NEW |