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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2682103002: Correctly resolve package parts. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | pkg/front_end/lib/src/fasta/translate_uri.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.source_library_builder; 5 library fasta.source_library_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 AsyncMarker, 8 AsyncMarker,
9 ProcedureKind; 9 ProcedureKind;
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 imports.add(new Import(loader.read(resolve(uri)), prefix, combinators)); 124 imports.add(new Import(loader.read(resolve(uri)), prefix, combinators));
125 } 125 }
126 126
127 void addPart(List<MetadataBuilder> metadata, String path) { 127 void addPart(List<MetadataBuilder> metadata, String path) {
128 Uri resolvedUri; 128 Uri resolvedUri;
129 Uri newFileUri; 129 Uri newFileUri;
130 if (uri.scheme == "dart") { 130 if (uri.scheme == "dart") {
131 resolvedUri = new Uri(scheme: "dart", path: "${uri.path}/$path"); 131 resolvedUri = new Uri(scheme: "dart", path: "${uri.path}/$path");
132 newFileUri = fileUri.resolve(path); 132 newFileUri = fileUri.resolve(path);
133 } else { 133 } else {
134 newFileUri = resolvedUri = resolve(path); 134 resolvedUri = uri.resolve(path);
135 newFileUri = fileUri.resolve(path);
135 } 136 }
136 parts.add(loader.read(resolvedUri, newFileUri)); 137 parts.add(loader.read(resolvedUri, newFileUri));
137 } 138 }
138 139
139 void addPartOf(List<MetadataBuilder> metadata, String name) { 140 void addPartOf(List<MetadataBuilder> metadata, String name) {
140 partOf = name; 141 partOf = name;
141 } 142 }
142 143
143 ClassBuilder addClass(List<MetadataBuilder> metadata, 144 ClassBuilder addClass(List<MetadataBuilder> metadata,
144 int modifiers, String name, 145 int modifiers, String name,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 334 }
334 335
335 int resolveConstructors(_) { 336 int resolveConstructors(_) {
336 int count = 0; 337 int count = 0;
337 members.forEach((String name, Builder member) { 338 members.forEach((String name, Builder member) {
338 count += member.resolveConstructors(this); 339 count += member.resolveConstructors(this);
339 }); 340 });
340 return count; 341 return count;
341 } 342 }
342 } 343 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/translate_uri.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698