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

Side by Side Diff: pkg/compiler/lib/src/parser/partial_elements.dart

Issue 2603263002: Prefix resolution_types with Resolution. (Closed)
Patch Set: Rebased Created 3 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/ordered_typeset.dart ('k') | pkg/compiler/lib/src/patch_parser.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.parser.partial_elements; 5 library dart2js.parser.partial_elements;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show ParsingContext, Resolution; 8 import '../common/resolution.dart' show ParsingContext, Resolution;
9 import '../elements/resolution_types.dart' show DynamicType; 9 import '../elements/resolution_types.dart' show ResolutionDynamicType;
10 import '../elements/elements.dart' 10 import '../elements/elements.dart'
11 show 11 show
12 CompilationUnitElement, 12 CompilationUnitElement,
13 Element, 13 Element,
14 ElementKind, 14 ElementKind,
15 GetterElement, 15 GetterElement,
16 MetadataAnnotation, 16 MetadataAnnotation,
17 SetterElement, 17 SetterElement,
18 STATE_NOT_STARTED, 18 STATE_NOT_STARTED,
19 STATE_DONE; 19 STATE_DONE;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 computeType(Element element, Resolution resolution) { 252 computeType(Element element, Resolution resolution) {
253 if (type != null) return type; 253 if (type != null) return type;
254 // TODO(johnniwinther): Compute this in the resolver. 254 // TODO(johnniwinther): Compute this in the resolver.
255 VariableDefinitions node = parseNode(element, resolution.parsingContext); 255 VariableDefinitions node = parseNode(element, resolution.parsingContext);
256 if (node.type != null) { 256 if (node.type != null) {
257 type = resolution.reporter.withCurrentElement(element, () { 257 type = resolution.reporter.withCurrentElement(element, () {
258 return resolution.resolveTypeAnnotation(element, node.type); 258 return resolution.resolveTypeAnnotation(element, node.type);
259 }); 259 });
260 } else { 260 } else {
261 type = const DynamicType(); 261 type = const ResolutionDynamicType();
262 } 262 }
263 assert(type != null); 263 assert(type != null);
264 return type; 264 return type;
265 } 265 }
266 } 266 }
267 267
268 class PartialTypedefElement extends TypedefElementX with PartialElement { 268 class PartialTypedefElement extends TypedefElementX with PartialElement {
269 PartialTypedefElement( 269 PartialTypedefElement(
270 String name, Element enclosing, Token beginToken, Token endToken) 270 String name, Element enclosing, Token beginToken, Token endToken)
271 : super(name, enclosing) { 271 : super(name, enclosing) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } on ParserError catch (e) { 444 } on ParserError catch (e) {
445 partial.hasParseError = true; 445 partial.hasParseError = true;
446 return new ErrorNode(element.position, e.reason); 446 return new ErrorNode(element.position, e.reason);
447 } 447 }
448 Node node = listener.popNode(); 448 Node node = listener.popNode();
449 assert(listener.nodes.isEmpty); 449 assert(listener.nodes.isEmpty);
450 return node; 450 return node;
451 }); 451 });
452 }); 452 });
453 } 453 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ordered_typeset.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698