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

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

Issue 10918054: Introduce a helper to emit import script tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « lib/compiler/implementation/dart_backend/emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/unparser.dart
diff --git a/lib/compiler/implementation/tree/unparser.dart b/lib/compiler/implementation/tree/unparser.dart
index 6c199d83c51c92e24b926ef2515d20a8a7aebd3c..aabd65f369178d9c71f5494c63510c495f878723 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -24,11 +24,6 @@ class Unparser implements Visitor {
}
Unparser.withRenamer(this.rename) : sb = new StringBuffer();
- // TODO(antonm): will go away soon.
- void addString(String s) {
- sb.add(s);
- }
-
void add(SourceString string) {
string.printOn(sb);
}
@@ -468,6 +463,11 @@ class Unparser implements Visitor {
visit(node.statements);
}
+ unparseImportTag(String uri, [String prefix]) {
+ final suffix = prefix === null ? '' : ',prefix:"$prefix"';
+ sb.add('#import("$uri"$suffix);');
+ }
+
visitScriptTag(ScriptTag node) {
add(node.beginToken.value);
visit(node.tag);
« no previous file with comments | « lib/compiler/implementation/dart_backend/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698