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

Side by Side Diff: dart/frog/leg/elements/elements.dart

Issue 9600059: Resolve constructors with type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 years, 9 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 | dart/frog/leg/resolver.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 #library('elements'); 5 #library('elements');
6 6
7 #import('../tree/tree.dart'); 7 #import('../tree/tree.dart');
8 #import('../scanner/scannerlib.dart'); 8 #import('../scanner/scannerlib.dart');
9 #import('../leg.dart'); // TODO(karlklose): we only need type. 9 #import('../leg.dart'); // TODO(karlklose): we only need type.
10 #import('../util/util.dart'); 10 #import('../util/util.dart');
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 LibraryElement getLibrary() { 101 LibraryElement getLibrary() {
102 Element element = this; 102 Element element = this;
103 while (element.kind !== ElementKind.LIBRARY) { 103 while (element.kind !== ElementKind.LIBRARY) {
104 element = element.enclosingElement; 104 element = element.enclosingElement;
105 } 105 }
106 return element; 106 return element;
107 } 107 }
108 108
109 toString() => '$kind($name)'; 109 toString() => '$kind(${name.slowToString()})';
110 } 110 }
111 111
112 class ContainerElement extends Element { 112 class ContainerElement extends Element {
113 ContainerElement(name, kind, enclosingElement) : 113 ContainerElement(name, kind, enclosingElement) :
114 super(name, kind, enclosingElement); 114 super(name, kind, enclosingElement);
115 115
116 abstract void addMember(Element element, DiagnosticListener listener); 116 abstract void addMember(Element element, DiagnosticListener listener);
117 } 117 }
118 118
119 class CompilationUnitElement extends ContainerElement { 119 class CompilationUnitElement extends ContainerElement {
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 LabelElement addLabel(Identifier label, String labelName) { 807 LabelElement addLabel(Identifier label, String labelName) {
808 LabelElement result = new LabelElement(label, labelName, this, 808 LabelElement result = new LabelElement(label, labelName, this,
809 enclosingElement); 809 enclosingElement);
810 labels = labels.prepend(result); 810 labels = labels.prepend(result);
811 return result; 811 return result;
812 } 812 }
813 813
814 Node parseNode(DiagnosticListener l) => statement; 814 Node parseNode(DiagnosticListener l) => statement;
815 } 815 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698