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

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

Issue 136453008: Interpolated String hack-around. (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
« no previous file with comments | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | pkg/analyzer/test/services/data/stmt_tests.data » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/services/writer.dart
===================================================================
--- pkg/analyzer/lib/src/services/writer.dart (revision 31810)
+++ pkg/analyzer/lib/src/services/writer.dart (working copy)
@@ -5,6 +5,10 @@
library source_writer;
+/// DEBUG flag indicating whether to use the experimental line-breaker
+const _USE_LINE_BREAKER = false;
+
+
class Line {
final tokens = <LineToken>[];
@@ -256,9 +260,12 @@
SourceWriter({this.indentCount: 0, this.lineSeparator: NEW_LINE,
bool useTabs: false, int spacesPerIndent: 2, int maxLineLength: 80}) {
-// linePrinter = new SimpleLineBreaker(maxLineLength, (n) =>
-// getIndentString(n, useTabs: useTabs, spacesPerIndent: spacesPerIndent));
- linePrinter = new SimpleLinePrinter();
+ if (_USE_LINE_BREAKER) {
+ linePrinter = new SimpleLineBreaker(maxLineLength, (n) =>
+ getIndentString(n, useTabs: useTabs, spacesPerIndent: spacesPerIndent));
+ } else {
+ linePrinter = new SimpleLinePrinter();
+ }
currentLine = new Line(indent: indentCount, printer: linePrinter);
}
« no previous file with comments | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | pkg/analyzer/test/services/data/stmt_tests.data » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698