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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 18062003: Fix type annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.modelx; 5 library elements.modelx;
6 6
7 import 'dart:collection' show LinkedHashMap; 7 import 'dart:collection' show LinkedHashMap;
8 8
9 import 'elements.dart'; 9 import 'elements.dart';
10 import '../../compiler.dart' as api; 10 import '../../compiler.dart' as api;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return true; 173 return true;
174 } 174 }
175 175
176 Token position() => null; 176 Token position() => null;
177 177
178 Token findMyName(Token token) { 178 Token findMyName(Token token) {
179 // We search for the token that has the name of this element. 179 // We search for the token that has the name of this element.
180 // For constructors, that doesn't work because they may have 180 // For constructors, that doesn't work because they may have
181 // named formed out of multiple tokens (named constructors) so 181 // named formed out of multiple tokens (named constructors) so
182 // for those we search for the class name instead. 182 // for those we search for the class name instead.
183 String needle = isConstructor() ? enclosingElement.name : name; 183 SourceString needle = isConstructor() ? enclosingElement.name : name;
184 for (Token t = token; EOF_TOKEN != t.kind; t = t.next) { 184 for (Token t = token; EOF_TOKEN != t.kind; t = t.next) {
185 if (needle == t.value) return t; 185 if (needle == t.value) return t;
186 } 186 }
187 return token; 187 return token;
188 } 188 }
189 189
190 CompilationUnitElement getCompilationUnit() { 190 CompilationUnitElement getCompilationUnit() {
191 Element element = this; 191 Element element = this;
192 while (!element.isCompilationUnit()) { 192 while (!element.isCompilationUnit()) {
193 element = element.enclosingElement; 193 element = element.enclosingElement;
(...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 2208
2209 MetadataAnnotation ensureResolved(Compiler compiler) { 2209 MetadataAnnotation ensureResolved(Compiler compiler) {
2210 if (resolutionState == STATE_NOT_STARTED) { 2210 if (resolutionState == STATE_NOT_STARTED) {
2211 compiler.resolver.resolveMetadataAnnotation(this); 2211 compiler.resolver.resolveMetadataAnnotation(this);
2212 } 2212 }
2213 return this; 2213 return this;
2214 } 2214 }
2215 2215
2216 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2216 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2217 } 2217 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698