| 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 part of tree; | 5 part of tree; |
| 6 | 6 |
| 7 abstract class Visitor<R> { | 7 abstract class Visitor<R> { |
| 8 const Visitor(); | 8 const Visitor(); |
| 9 | 9 |
| 10 R visitNode(Node node); | 10 R visitNode(Node node); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 For asFor() => null; | 155 For asFor() => null; |
| 156 ForIn asForIn() => null; | 156 ForIn asForIn() => null; |
| 157 FunctionDeclaration asFunctionDeclaration() => null; | 157 FunctionDeclaration asFunctionDeclaration() => null; |
| 158 FunctionExpression asFunctionExpression() => null; | 158 FunctionExpression asFunctionExpression() => null; |
| 159 Identifier asIdentifier() => null; | 159 Identifier asIdentifier() => null; |
| 160 If asIf() => null; | 160 If asIf() => null; |
| 161 Import asImport() => null; | 161 Import asImport() => null; |
| 162 Label asLabel() => null; | 162 Label asLabel() => null; |
| 163 LabeledStatement asLabeledStatement() => null; | 163 LabeledStatement asLabeledStatement() => null; |
| 164 LibraryName asLibraryName() => null; | 164 LibraryName asLibraryName() => null; |
| 165 LibraryDependency asLibraryDependency() => null; |
| 165 LiteralBool asLiteralBool() => null; | 166 LiteralBool asLiteralBool() => null; |
| 166 LiteralDouble asLiteralDouble() => null; | 167 LiteralDouble asLiteralDouble() => null; |
| 167 LiteralInt asLiteralInt() => null; | 168 LiteralInt asLiteralInt() => null; |
| 168 LiteralList asLiteralList() => null; | 169 LiteralList asLiteralList() => null; |
| 169 LiteralMap asLiteralMap() => null; | 170 LiteralMap asLiteralMap() => null; |
| 170 LiteralMapEntry asLiteralMapEntry() => null; | 171 LiteralMapEntry asLiteralMapEntry() => null; |
| 171 LiteralNull asLiteralNull() => null; | 172 LiteralNull asLiteralNull() => null; |
| 172 LiteralString asLiteralString() => null; | 173 LiteralString asLiteralString() => null; |
| 173 MixinApplication asMixinApplication() => null; | 174 MixinApplication asMixinApplication() => null; |
| 174 Modifiers asModifiers() => null; | 175 Modifiers asModifiers() => null; |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 * Combinators filter away some identifiers from the other library. | 1771 * Combinators filter away some identifiers from the other library. |
| 1771 */ | 1772 */ |
| 1772 abstract class LibraryDependency extends LibraryTag { | 1773 abstract class LibraryDependency extends LibraryTag { |
| 1773 final StringNode uri; | 1774 final StringNode uri; |
| 1774 final NodeList combinators; | 1775 final NodeList combinators; |
| 1775 | 1776 |
| 1776 LibraryDependency(this.uri, | 1777 LibraryDependency(this.uri, |
| 1777 this.combinators, | 1778 this.combinators, |
| 1778 Link<MetadataAnnotation> metadata) | 1779 Link<MetadataAnnotation> metadata) |
| 1779 : super(metadata); | 1780 : super(metadata); |
| 1781 |
| 1782 LibraryDependency asLibraryDependency() => this; |
| 1780 } | 1783 } |
| 1781 | 1784 |
| 1782 /** | 1785 /** |
| 1783 * An [:import:] library tag. | 1786 * An [:import:] library tag. |
| 1784 * | 1787 * |
| 1785 * An import tag is dependency on another library where the exported identifiers | 1788 * An import tag is dependency on another library where the exported identifiers |
| 1786 * are put into the import scope of the importing library. The import scope is | 1789 * are put into the import scope of the importing library. The import scope is |
| 1787 * only visible inside the library. | 1790 * only visible inside the library. |
| 1788 */ | 1791 */ |
| 1789 class Import extends LibraryDependency { | 1792 class Import extends LibraryDependency { |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 * argument). | 2091 * argument). |
| 2089 * | 2092 * |
| 2090 * TODO(ahe): This method is controversial, the team needs to discuss | 2093 * TODO(ahe): This method is controversial, the team needs to discuss |
| 2091 * if top-level methods are acceptable and what naming conventions to | 2094 * if top-level methods are acceptable and what naming conventions to |
| 2092 * use. | 2095 * use. |
| 2093 */ | 2096 */ |
| 2094 initializerDo(Node node, f(Node node)) { | 2097 initializerDo(Node node, f(Node node)) { |
| 2095 SendSet send = node.asSendSet(); | 2098 SendSet send = node.asSendSet(); |
| 2096 if (send != null) return f(send.arguments.head); | 2099 if (send != null) return f(send.arguments.head); |
| 2097 } | 2100 } |
| OLD | NEW |