Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10831406: Make ClassNode visit type parameters in visitChildren (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ClassNode(this.name, this.typeParameters, this.superclass, this.interfaces, 197 ClassNode(this.name, this.typeParameters, this.superclass, this.interfaces,
198 this.defaultClause, this.beginToken, this.extendsKeyword, 198 this.defaultClause, this.beginToken, this.extendsKeyword,
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 (typeParameters !== null) typeParameters.accept(visitor);
207 if (superclass !== null) superclass.accept(visitor); 208 if (superclass !== null) superclass.accept(visitor);
208 if (interfaces !== null) interfaces.accept(visitor); 209 if (interfaces !== null) interfaces.accept(visitor);
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
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698