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

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

Issue 1513263002: Support optional package name arguments to --show-package-warnings (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 5 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | tests/compiler/dart2js/mock_compiler.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 8 import '../common/resolution.dart' show
9 Parsing, 9 Parsing,
10 Resolution; 10 Resolution;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 }); 291 });
292 return definitions; 292 return definitions;
293 } 293 }
294 294
295 computeType(Element element, Resolution resolution) { 295 computeType(Element element, Resolution resolution) {
296 if (type != null) return type; 296 if (type != null) return type;
297 // TODO(johnniwinther): Compute this in the resolver. 297 // TODO(johnniwinther): Compute this in the resolver.
298 VariableDefinitions node = parseNode(element, resolution.parsing); 298 VariableDefinitions node = parseNode(element, resolution.parsing);
299 if (node.type != null) { 299 if (node.type != null) {
300 type = resolution.resolveTypeAnnotation(element, node.type); 300 type = resolution.reporter.withCurrentElement(element, () {
301 return resolution.resolveTypeAnnotation(element, node.type);
302 });
301 } else { 303 } else {
302 type = const DynamicType(); 304 type = const DynamicType();
303 } 305 }
304 assert(type != null); 306 assert(type != null);
305 return type; 307 return type;
306 } 308 }
307 } 309 }
308 310
309 class PartialTypedefElement extends TypedefElementX with PartialElement { 311 class PartialTypedefElement extends TypedefElementX with PartialElement {
310 312
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } on ParserError catch (e) { 495 } on ParserError catch (e) {
494 partial.hasParseError = true; 496 partial.hasParseError = true;
495 return new ErrorNode(element.position, e.reason); 497 return new ErrorNode(element.position, e.reason);
496 } 498 }
497 Node node = listener.popNode(); 499 Node node = listener.popNode();
498 assert(listener.nodes.isEmpty); 500 assert(listener.nodes.isEmpty);
499 return node; 501 return node;
500 }); 502 });
501 }); 503 });
502 } 504 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698