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

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

Issue 139263011: dartfmt line wrapping bypass option support. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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: pkg/analyzer/lib/src/services/writer.dart
===================================================================
--- pkg/analyzer/lib/src/services/writer.dart (revision 32022)
+++ pkg/analyzer/lib/src/services/writer.dart (working copy)
@@ -5,10 +5,7 @@
library source_writer;
-/// DEBUG flag indicating whether to use the experimental line-breaker
-const _USE_LINE_BREAKER = false;
-
class Line {
final tokens = <LineToken>[];
@@ -293,7 +290,7 @@
SourceWriter({this.indentCount: 0, this.lineSeparator: NEW_LINE,
bool useTabs: false, int spacesPerIndent: 2, int maxLineLength: 80}) {
- if (_USE_LINE_BREAKER) {
+ if (maxLineLength > -1) {
Brian Wilkerson 2014/01/27 20:14:50 Will the SimpleLineBreaker work if the line length
lukechurch 2014/01/27 20:39:44 I agree (+1 seems loaded in this context ;)) Zero
pquitslund 2014/01/27 22:23:37 Good call. Done!
pquitslund 2014/01/27 22:23:37 Done.
linePrinter = new SimpleLineBreaker(maxLineLength, (n) =>
getIndentString(n, useTabs: useTabs, spacesPerIndent: spacesPerIndent));
} else {
« pkg/analyzer/bin/formatter.dart ('K') | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698