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

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: 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') | dart/frog/leg/resolver.dart » ('J')
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 LibraryElement getLibrary() { 94 LibraryElement getLibrary() {
95 Element element = this; 95 Element element = this;
96 while (element.kind !== ElementKind.LIBRARY) { 96 while (element.kind !== ElementKind.LIBRARY) {
97 element = element.enclosingElement; 97 element = element.enclosingElement;
98 } 98 }
99 return element; 99 return element;
100 } 100 }
101 101
102 toString() => '$kind($name)'; 102 toString() => '$kind(${name.slowToString()})';
103 } 103 }
104 104
105 class ContainerElement extends Element { 105 class ContainerElement extends Element {
106 ContainerElement(name, kind, enclosingElement) : 106 ContainerElement(name, kind, enclosingElement) :
107 super(name, kind, enclosingElement); 107 super(name, kind, enclosingElement);
108 108
109 abstract void addMember(Element element, DiagnosticListener listener); 109 abstract void addMember(Element element, DiagnosticListener listener);
110 } 110 }
111 111
112 class CompilationUnitElement extends ContainerElement { 112 class CompilationUnitElement extends ContainerElement {
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 783
784 LabelElement addLabel(Identifier label, String labelName) { 784 LabelElement addLabel(Identifier label, String labelName) {
785 LabelElement result = new LabelElement(label, labelName, this, 785 LabelElement result = new LabelElement(label, labelName, this,
786 enclosingElement); 786 enclosingElement);
787 labels = labels.prepend(result); 787 labels = labels.prepend(result);
788 return result; 788 return result;
789 } 789 }
790 790
791 Node parseNode(DiagnosticListener l) => statement; 791 Node parseNode(DiagnosticListener l) => statement;
792 } 792 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/resolver.dart » ('j') | dart/frog/leg/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698