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

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

Issue 2991753002: Add export dependencies to Kernel libraries and use them to resynthesize ExportElement(s) in Analyz… (Closed)
Patch Set: Extract exportedLibrary. Created 3 years, 4 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
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.import; 5 library fasta.import;
6 6
7 import 'builder/builder.dart' show Builder, LibraryBuilder, PrefixBuilder; 7 import 'builder/builder.dart' show Builder, LibraryBuilder, PrefixBuilder;
8 8
9 import 'combinator.dart' show Combinator; 9 import 'combinator.dart' show Combinator;
10 10
(...skipping 26 matching lines...) Expand all
37 PrefixBuilder prefix; 37 PrefixBuilder prefix;
38 if (this.prefix == null) { 38 if (this.prefix == null) {
39 add = (String name, Builder member) { 39 add = (String name, Builder member) {
40 importer.addToScope(name, member, charOffset, true); 40 importer.addToScope(name, member, charOffset, true);
41 }; 41 };
42 } else { 42 } else {
43 prefix = 43 prefix =
44 new PrefixBuilder(this.prefix, deferred, importer, prefixCharOffset); 44 new PrefixBuilder(this.prefix, deferred, importer, prefixCharOffset);
45 add = (String name, Builder member) { 45 add = (String name, Builder member) {
46 if (member.isSetter) { 46 if (member.isSetter) {
47 prefix.exports.setters[name] = member; 47 prefix.exportScope.setters[name] = member;
48 } else { 48 } else {
49 prefix.exports.local[name] = member; 49 prefix.exportScope.local[name] = member;
50 } 50 }
51 }; 51 };
52 } 52 }
53 imported.exports.forEach((String name, Builder member) { 53 imported.exportScope.forEach((String name, Builder member) {
54 if (combinators != null) { 54 if (combinators != null) {
55 for (Combinator combinator in combinators) { 55 for (Combinator combinator in combinators) {
56 if (combinator.isShow && !combinator.names.contains(name)) return; 56 if (combinator.isShow && !combinator.names.contains(name)) return;
57 if (combinator.isHide && combinator.names.contains(name)) return; 57 if (combinator.isHide && combinator.names.contains(name)) return;
58 } 58 }
59 } 59 }
60 add(name, member); 60 add(name, member);
61 }); 61 });
62 if (prefix != null) { 62 if (prefix != null) {
63 Builder existing = importer.addBuilder(prefix.name, prefix, charOffset); 63 Builder existing = importer.addBuilder(prefix.name, prefix, charOffset);
64 if (existing == prefix) { 64 if (existing == prefix) {
65 importer.addToScope(prefix.name, prefix, prefixCharOffset, true); 65 importer.addToScope(prefix.name, prefix, prefixCharOffset, true);
66 } 66 }
67 } 67 }
68 } 68 }
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698