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

Unified Diff: frog/leg/elements/elements.dart

Issue 9662035: When importing a library without a prefix, add the elements from the element map instead of the lis… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « no previous file | frog/leg/scanner/scanner_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/elements/elements.dart
===================================================================
--- frog/leg/elements/elements.dart (revision 5283)
+++ frog/leg/elements/elements.dart (working copy)
@@ -260,6 +260,8 @@
} else {
Element existing = elements.putIfAbsent(element.name, () => element);
if (existing !== element) {
+ print(existing);
ahe 2012/03/10 21:26:36 debug code?
ngeoffray 2012/03/10 21:30:50 Done.
+ print(element);
ahe 2012/03/10 21:26:36 ditto
ngeoffray 2012/03/10 21:30:50 Done.
listener.cancel('duplicate definition', token: element.position());
listener.cancel('existing definition', token: existing.position());
}
@@ -275,6 +277,16 @@
if (element === null) return null;
return (this === element.getLibrary()) ? element : null;
}
+
+ void forEachExport(f(Element element)) {
+ elements.forEach((SourceString _, Element e) {
+ if (this === e.getLibrary()
+ && e.kind !== ElementKind.PREFIX
ahe 2012/03/10 21:26:36 See the code above in lookupLocalMember. Shouldn't
ngeoffray 2012/03/10 21:30:50 Are you referring to the one line 278? I don't thi
ahe 2012/04/13 13:48:10 I was referring to the method above. However, that
+ && e.kind !== ElementKind.FOREIGN) {
+ f(e);
+ }
+ });
+ }
}
class PrefixElement extends Element {
« no previous file with comments | « no previous file | frog/leg/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698