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 Visitor<R> { | 5 interface Visitor<R> { |
| 6 R visitBlock(Block node); | 6 R visitBlock(Block node); |
| 7 R visitBreakStatement(BreakStatement node); | 7 R visitBreakStatement(BreakStatement node); |
| 8 R visitCascade(Cascade node); | 8 R visitCascade(Cascade node); |
| 9 R visitCascadeReceiver(CascadeReceiver node); | 9 R visitCascadeReceiver(CascadeReceiver node); |
| 10 R visitCaseMatch(CaseMatch node); | 10 R visitCaseMatch(CaseMatch node); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 this.endToken); | 199 this.endToken); |
| 200 | 200 |
| 201 ClassNode asClassNode() => this; | 201 ClassNode asClassNode() => this; |
| 202 | 202 |
| 203 accept(Visitor visitor) => visitor.visitClassNode(this); | 203 accept(Visitor visitor) => visitor.visitClassNode(this); |
| 204 | 204 |
| 205 visitChildren(Visitor visitor) { | 205 visitChildren(Visitor visitor) { |
| 206 if (name !== null) name.accept(visitor); | 206 if (name !== null) name.accept(visitor); |
| 207 if (superclass !== null) superclass.accept(visitor); | 207 if (superclass !== null) superclass.accept(visitor); |
| 208 if (interfaces !== null) interfaces.accept(visitor); | 208 if (interfaces !== null) interfaces.accept(visitor); |
| 209 if (typeParameters !== null) typeParameters.accept(visitor); | |
|
Roman
2012/08/21 14:36:37
could there be any reason we didn't visit type par
ahe
2012/08/21 14:45:27
Oversight. However, messick already have a CL in t
messick
2012/08/21 14:56:37
Please commit this CL after moving the new code to
Roman
2012/08/21 15:00:18
207 in my CL. Done.
| |
| 209 } | 210 } |
| 210 | 211 |
| 211 bool get isInterface() => beginToken.stringValue === 'interface'; | 212 bool get isInterface() => beginToken.stringValue === 'interface'; |
| 212 | 213 |
| 213 bool get isClass() => !isInterface; | 214 bool get isClass() => !isInterface; |
| 214 | 215 |
| 215 Token getBeginToken() => beginToken; | 216 Token getBeginToken() => beginToken; |
| 216 | 217 |
| 217 Token getEndToken() => endToken; | 218 Token getEndToken() => endToken; |
| 218 } | 219 } |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1753 * argument). | 1754 * argument). |
| 1754 * | 1755 * |
| 1755 * TODO(ahe): This method is controversial, the team needs to discuss | 1756 * TODO(ahe): This method is controversial, the team needs to discuss |
| 1756 * if top-level methods are acceptable and what naming conventions to | 1757 * if top-level methods are acceptable and what naming conventions to |
| 1757 * use. | 1758 * use. |
| 1758 */ | 1759 */ |
| 1759 initializerDo(Node node, f(Node node)) { | 1760 initializerDo(Node node, f(Node node)) { |
| 1760 SendSet send = node.asSendSet(); | 1761 SendSet send = node.asSendSet(); |
| 1761 if (send !== null) return f(send.arguments.head); | 1762 if (send !== null) return f(send.arguments.head); |
| 1762 } | 1763 } |
| OLD | NEW |