From f86db5a776ed429e0df0e3d871c5692f86b0f4be Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 5 Sep 2005 00:12:27 +0000 Subject: 2005-09-04 Frank Ch. Eigler * translate.cxx (visit_literal_string): \-prefix double-quotes. --- ChangeLog | 4 ++++ translate.cxx | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index de6634af..2a59812b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-09-04 Frank Ch. Eigler + + * translate.cxx (visit_literal_string): \-prefix double-quotes. + 2005-09-04 Martin Hunt * testsuite/buildok/context_test.stp: New test. diff --git a/translate.cxx b/translate.cxx index 4b2960f4..c3412cda 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1640,7 +1640,14 @@ c_unparser::visit_continue_statement (continue_statement* s) void c_unparser::visit_literal_string (literal_string* e) { - o->line() << '"' << e->value << '"'; // XXX: escape special chars + const string& v = e->value; + o->line() << '"'; + for (unsigned i=0; iline() << '\\' << '"'; + else + o->line() << v[i]; + o->line() << '"'; } -- cgit