| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 VariableDefinitions asVariableDefinitions() => null; | 194 VariableDefinitions asVariableDefinitions() => null; |
| 195 While asWhile() => null; | 195 While asWhile() => null; |
| 196 | 196 |
| 197 bool isValidBreakTarget() => false; | 197 bool isValidBreakTarget() => false; |
| 198 bool isValidContinueTarget() => false; | 198 bool isValidContinueTarget() => false; |
| 199 } | 199 } |
| 200 | 200 |
| 201 class ClassNode extends Node { | 201 class ClassNode extends Node { |
| 202 final Modifiers modifiers; | 202 final Modifiers modifiers; |
| 203 final Identifier name; | 203 final Identifier name; |
| 204 final TypeAnnotation superclass; | 204 final Node superclass; |
| 205 final NodeList interfaces; | 205 final NodeList interfaces; |
| 206 final NodeList typeParameters; | 206 final NodeList typeParameters; |
| 207 final NodeList body; | 207 final NodeList body; |
| 208 | 208 |
| 209 // TODO(ahe, karlklose): the default keyword is not recorded. | 209 // TODO(ahe, karlklose): the default keyword is not recorded. |
| 210 final TypeAnnotation defaultClause; | 210 final TypeAnnotation defaultClause; |
| 211 | 211 |
| 212 final Token beginToken; | 212 final Token beginToken; |
| 213 final Token extendsKeyword; | 213 final Token extendsKeyword; |
| 214 final Token endToken; | 214 final Token endToken; |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 * argument). | 2051 * argument). |
| 2052 * | 2052 * |
| 2053 * TODO(ahe): This method is controversial, the team needs to discuss | 2053 * TODO(ahe): This method is controversial, the team needs to discuss |
| 2054 * if top-level methods are acceptable and what naming conventions to | 2054 * if top-level methods are acceptable and what naming conventions to |
| 2055 * use. | 2055 * use. |
| 2056 */ | 2056 */ |
| 2057 initializerDo(Node node, f(Node node)) { | 2057 initializerDo(Node node, f(Node node)) { |
| 2058 SendSet send = node.asSendSet(); | 2058 SendSet send = node.asSendSet(); |
| 2059 if (send != null) return f(send.arguments.head); | 2059 if (send != null) return f(send.arguments.head); |
| 2060 } | 2060 } |
| OLD | NEW |