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

Unified Diff: sdk/lib/_internal/compiler/implementation/code_buffer.dart

Issue 13008021: Add optional writeAll separator argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: sdk/lib/_internal/compiler/implementation/code_buffer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/code_buffer.dart b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
index 69fab9ae5ffd0a5d63ad071257cefff44c553857..e6c759dc99f214560eaa79bc4fb55e7782c9643f 100644
--- a/sdk/lib/_internal/compiler/implementation/code_buffer.dart
+++ b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
@@ -37,8 +37,14 @@ class CodeBuffer implements StringBuffer {
return this;
}
- CodeBuffer writeAll(Iterable<Object> objects) {
+ CodeBuffer writeAll(Iterable<Object> objects, [String separator = ""]) {
+ bool isFirst = true;
for (var object in objects) {
+ if (isFirst) {
+ isFirst = false;
+ } else {
+ if (separator != "") write(separator);
+ }
write(object);
}
return this;

Powered by Google App Engine
This is Rietveld 408576698