cppparser: fix escaping of string literals in preprocessor mode

[skip ci]
This commit is contained in:
rdb 2024-03-28 22:17:49 +01:00
parent ba51b2cdca
commit bddb7cb262

View File

@ -736,7 +736,11 @@ output_code(std::ostream &out) const {
break;
case '\'':
out << "\\\'";
out << (_token == CHAR_TOK ? "\\\'" : "'");
break;
case '"':
out << (_token == CHAR_TOK ? "\"" : "\\\"");
break;
case '\\':