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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10834374: Add a field to ClassNode that holds a NodeList of its members. (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/tree/nodes.dart
===================================================================
--- lib/compiler/implementation/tree/nodes.dart (revision 10901)
+++ lib/compiler/implementation/tree/nodes.dart (working copy)
@@ -186,6 +186,7 @@
final TypeAnnotation superclass;
final NodeList interfaces;
final NodeList typeParameters;
+ final NodeList body;
// TODO(ahe, karlklose): the default keyword is not recorded.
final TypeAnnotation defaultClause;
@@ -196,7 +197,7 @@
ClassNode(this.name, this.typeParameters, this.superclass, this.interfaces,
this.defaultClause, this.beginToken, this.extendsKeyword,
- this.endToken);
+ this.body, this.endToken);
ClassNode asClassNode() => this;
@@ -206,6 +207,8 @@
if (name !== null) name.accept(visitor);
if (superclass !== null) superclass.accept(visitor);
if (interfaces !== null) interfaces.accept(visitor);
+ if (typeParameters != null) typeParameters.accept(visitor);
ahe 2012/08/21 11:56:17 You should probably move this to line 208. Then we
messick 2012/08/21 15:35:40 Good point. Done.
+ if (body !== null) body.accept(visitor);
Roman 2012/08/21 14:56:34 Body will have all class members, right? To Anton
Anton Muhin 2012/08/21 15:00:16 Yes, indeed. Steve, Peter, any opinion on this?
ahe 2012/08/21 15:03:36 I think body will be null in your case.
Anton Muhin 2012/08/21 15:04:19 That'd be great, Peter, thanks a lot. On 2012/08/
messick 2012/08/21 15:35:40 Peter, are you sure body will be null? It looks to
ahe 2012/08/21 15:43:16 Empty or null, it doesn't matter in this case, I t
}
bool get isInterface() => beginToken.stringValue === 'interface';
@@ -1678,7 +1681,7 @@
final Token onKeyword;
final Token catchKeyword;
- CatchBlock(this.type, this.formals, this.block,
+ CatchBlock(this.type, this.formals, this.block,
this.onKeyword, this.catchKeyword);
CatchBlock asCatchBlock() => this;

Powered by Google App Engine
This is Rietveld 408576698