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

Unified Diff: frog/leg/resolver.dart

Issue 8924001: First implementation of top-level fields without initializers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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: frog/leg/resolver.dart
===================================================================
--- frog/leg/resolver.dart (revision 2339)
+++ frog/leg/resolver.dart (working copy)
@@ -475,8 +475,12 @@
VariableDefinitions definitions;
ResolverVisitor resolver;
ElementKind kind;
+ VariableListElement variables;
- VariableDefinitionsVisitor(this.definitions, this.resolver, this.kind);
+ VariableDefinitionsVisitor(this.definitions, this.resolver, this.kind) {
+ variables = new VariableListElement.node(
+ definitions, ElementKind.VARIABLE_LIST, resolver.context.element);
+ }
SourceString visitSendSet(SendSet node) {
assert(node.arguments.tail.isEmpty()); // Sanity check
@@ -495,8 +499,8 @@
visitNodeList(NodeList node) {
for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) {
SourceString name = visit(link.head);
- Element element = new VariableElement(link.head, definitions.type,
- kind, name, resolver.context.element);
+ Element element = new VariableElement(
+ name, variables, kind, resolver.context.element);
resolver.defineElement(link.head, element);
}
}

Powered by Google App Engine
This is Rietveld 408576698