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

Unified Diff: pkg/analyzer_experimental/lib/src/services/writer.dart

Issue 18487005: Initial indent fix and a few more tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | pkg/analyzer_experimental/test/services/formatter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_experimental/lib/src/services/writer.dart
===================================================================
--- pkg/analyzer_experimental/lib/src/services/writer.dart (revision 24818)
+++ pkg/analyzer_experimental/lib/src/services/writer.dart (working copy)
@@ -78,13 +78,15 @@
class SourceWriter {
final StringBuffer buffer = new StringBuffer();
- Line currentLine = new Line();
+ Line currentLine;
final String lineSeparator;
int indentCount = 0;
SourceWriter({int initialIndent: 0, this.lineSeparator: '\n'}) :
Brian Wilkerson 2013/07/08 21:49:11 Just out of curiosity, why not SourceWriter({th
pquitslund 2013/07/08 21:56:38 I like that better. Thanks!
- indentCount = initialIndent;
+ indentCount = initialIndent {
+ currentLine = new Line(indent: indentCount);
+ }
indent() {
++indentCount;
« no previous file with comments | « no previous file | pkg/analyzer_experimental/test/services/formatter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698