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

Unified Diff: pkg/front_end/lib/src/fasta/import.dart

Issue 2691523002: Ensure locations are always provided, but don't store them yet. (Closed)
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/export.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/import.dart
diff --git a/pkg/front_end/lib/src/fasta/import.dart b/pkg/front_end/lib/src/fasta/import.dart
index 0c04bdf215230b4b812335a734b4c25fd2c76470..5e3597fa9460d0fafd331ba2027f2a72bbc48f90 100644
--- a/pkg/front_end/lib/src/fasta/import.dart
+++ b/pkg/front_end/lib/src/fasta/import.dart
@@ -15,6 +15,9 @@ import 'combinator.dart' show
typedef void AddToScope(String name, Builder member);
class Import {
+ /// The library that is importing [imported];
+ final LibraryBuilder importer;
+
/// The library being imported.
final LibraryBuilder imported;
@@ -22,7 +25,14 @@ class Import {
final List<Combinator> combinators;
- Import(this.imported, this.prefix, this.combinators);
+ final int charOffset;
+
+ final int prefixCharOffset;
+
+ Import(this.importer, this.imported, this.prefix, this.combinators,
+ this.charOffset, this.prefixCharOffset);
+
+ Uri get fileUri => importer.fileUri;
void finalizeImports(LibraryBuilder importer) {
AddToScope add;
@@ -30,7 +40,8 @@ class Import {
if (this.prefix == null) {
add = importer.addToScope;
} else {
- prefix = new PrefixBuilder(this.prefix, <String, Builder>{}, importer);
+ prefix = new PrefixBuilder(
+ this.prefix, <String, Builder>{}, importer, prefixCharOffset);
add = (String name, Builder member) {
prefix.exports[name] = member;
};
« no previous file with comments | « pkg/front_end/lib/src/fasta/export.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698