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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10990060: Added support for exports and re-exports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed redundant check. Created 8 years, 3 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
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 398e30a1c96f282b1e81a667524eefba77bc407c..43ee30140eb1531451162c662f0350c0f0595360 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -1642,14 +1642,20 @@ class LibraryName extends LibraryTag {
Token getEndToken() => name.getEndToken().next;
}
-class Import extends LibraryTag {
+abstract class ImportExport extends LibraryTag {
Lasse Reichstein Nielsen 2012/09/28 07:45:36 Call it LibraryDependency (or something better if
Johnni Winther 2012/10/09 09:47:10 Done.
final LiteralString uri;
- final Identifier prefix;
final NodeList combinators;
+ ImportExport(this.uri, this.combinators);
+}
+
+class Import extends ImportExport {
Lasse Reichstein Nielsen 2012/09/28 07:45:36 Comment to the effect that an Import is dependency
Johnni Winther 2012/10/09 09:47:10 Done.
+ final Identifier prefix;
final Token importKeyword;
- Import(this.importKeyword, this.uri, this.prefix, this.combinators);
+ Import(this.importKeyword, LiteralString uri,
+ this.prefix, NodeList combinators)
+ : super(uri, combinators);
bool get isImport => true;
@@ -1672,13 +1678,11 @@ class Import extends LibraryTag {
}
}
-class Export extends LibraryTag {
- final LiteralString uri;
- final NodeList combinators;
-
+class Export extends ImportExport {
Lasse Reichstein Nielsen 2012/09/28 07:45:36 And a comment too, describing what an export is re
Johnni Winther 2012/10/09 09:47:10 Done.
final Token exportKeyword;
- Export(this.exportKeyword, this.uri, this.combinators);
+ Export(this.exportKeyword, LiteralString uri, NodeList combinators)
+ : super(uri, combinators);
bool get isExport => true;

Powered by Google App Engine
This is Rietveld 408576698