| Index: sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
|
| index f9757db86140af75f5b2f10b64ca89ba0e432b19..fb4b241fba64692d20ca8531eb758351d014bf1d 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
|
| @@ -1239,6 +1239,17 @@ class Unparser {
|
| }
|
| }
|
|
|
| + /// A list of string quotings that the printer may use to quote strings.
|
| + // Ignore multiline quotings for now. Would need to make sure that no
|
| + // newline (potentially prefixed by whitespace) follows the quoting.
|
| + // TODO(asgerf): Include multiline quotation schemes.
|
| + static const _QUOTINGS = const <tree.StringQuoting>[
|
| + const tree.StringQuoting(characters.$DQ, raw: false, leftQuoteLength: 1),
|
| + const tree.StringQuoting(characters.$DQ, raw: true, leftQuoteLength: 1),
|
| + const tree.StringQuoting(characters.$SQ, raw: false, leftQuoteLength: 1),
|
| + const tree.StringQuoting(characters.$SQ, raw: true, leftQuoteLength: 1),
|
| + ];
|
| +
|
| static StringLiteralOutput analyzeStringLiteral(Expression node) {
|
| // TODO(asgerf): This might be a bit too expensive. Benchmark.
|
| // Flatten the StringConcat tree.
|
| @@ -1281,11 +1292,7 @@ class Unparser {
|
| List<int> nonRaws = <int>[];
|
| List<int> sqs = <int>[];
|
| List<int> dqs = <int>[];
|
| - for (tree.StringQuoting q in tree.StringQuoting.mapping) {
|
| - // Ignore multiline quotings for now. Encoding of line breaks is unclear.
|
| - // TODO(asgerf): Include multiline quotation schemes.
|
| - if (q.leftQuoteCharCount >= 3)
|
| - continue;
|
| + for (tree.StringQuoting q in _QUOTINGS) {
|
| OpenStringChunk chunk = new OpenStringChunk(null, q, getQuoteCost(q));
|
| int index = best.length;
|
| best.add(chunk);
|
|
|