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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart

Issue 12294028: Fix warnings spotted by dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
Index: dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart b/dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart
index 129c637b98a894d349406f162b8c3c203f383f76..62b67441f631eae14c703d8593a9081efaa35256 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart
@@ -54,10 +54,10 @@ class PrettyPrinter implements Visitor {
void openNode(Node node, String type, [Map params]) {
if (params == null) params = new Map();
addCurrentIndent();
- sb.add("<");
+ sb.write("<");
addBeginAndEndTokensToParams(node, params);
addTypeWithParams(type, params);
- sb.add(">\n");
+ sb.write(">\n");
pushTag(type);
}
@@ -67,10 +67,10 @@ class PrettyPrinter implements Visitor {
void openAndCloseNode(Node node, String type, [Map params]) {
if (params == null) params = new Map();
addCurrentIndent();
- sb.add("<");
+ sb.write("<");
addBeginAndEndTokensToParams(node, params);
addTypeWithParams(type, params);
- sb.add("/>\n");
+ sb.write("/>\n");
}
/**
@@ -79,14 +79,14 @@ class PrettyPrinter implements Visitor {
void closeNode() {
String tag = popTag();
addCurrentIndent();
- sb.add("</");
+ sb.write("</");
addTypeWithParams(tag);
- sb.add(">\n");
+ sb.write(">\n");
}
void addTypeWithParams(String type, [Map params]) {
if (params == null) params = new Map();
- sb.add("${type}");
+ sb.write("${type}");
params.forEach((k, v) {
String value;
if (v != null) {
@@ -97,12 +97,12 @@ class PrettyPrinter implements Visitor {
} else {
value = "[null]";
}
- sb.add(' $k="$value"');
+ sb.write(' $k="$value"');
});
}
void addCurrentIndent() {
- tagStack.forEach((_) { sb.add(INDENT); });
+ tagStack.forEach((_) { sb.write(INDENT); });
}
/**
@@ -318,12 +318,12 @@ class PrettyPrinter implements Visitor {
visitChildNode(Node node, String fieldName) {
if (node == null) return;
addCurrentIndent();
- sb.add("<$fieldName>\n");
+ sb.write("<$fieldName>\n");
pushTag(fieldName);
node.accept(this);
popTag();
addCurrentIndent();
- sb.add("</$fieldName>\n");
+ sb.write("</$fieldName>\n");
}
openSendNodeWithFields(Send node, String type) {

Powered by Google App Engine
This is Rietveld 408576698