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

Unified Diff: lib/text/ast_to_text.dart

Issue 2500453002: Fix a bug in printing of string literals with escape sequences. (Closed)
Patch Set: Add copyright Created 4 years, 1 month 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 | testcases/input/stringliteral.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/text/ast_to_text.dart
diff --git a/lib/text/ast_to_text.dart b/lib/text/ast_to_text.dart
index b6833bcc266913617e5eab2b08b48465209c1e67..d92b505ad004524e834c98a2838d6cf9803e1186 100644
--- a/lib/text/ast_to_text.dart
+++ b/lib/text/ast_to_text.dart
@@ -839,6 +839,8 @@ class Printer extends Visitor<Null> {
if (character != null) {
buffer ??= new StringBuffer(string.substring(0, i));
buffer.write(character);
+ } else {
+ buffer?.write(string[i]);
}
}
return buffer == null ? string : buffer.toString();
« no previous file with comments | « no previous file | testcases/input/stringliteral.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698