diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-07 11:03:37 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-07 11:03:37 +0100 |
commit | 7fcf6cb25535c3f96a3dc453ea9583b0732ca08b (patch) | |
tree | 1fe97ec3d8fabb57bafe3d4fbf3ea9548fb31c58 /shared/cplusplus/PrettyPrinter.cpp | |
parent | f4bf0a3a6db41dd7ce6f122053a0d144c01b5bd8 (diff) | |
download | qt-creator-7fcf6cb25535c3f96a3dc453ea9583b0732ca08b.tar.gz |
Pretty printing of wide string literals.
Diffstat (limited to 'shared/cplusplus/PrettyPrinter.cpp')
-rw-r--r-- | shared/cplusplus/PrettyPrinter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp index 2acb98b14e..72338576b6 100644 --- a/shared/cplusplus/PrettyPrinter.cpp +++ b/shared/cplusplus/PrettyPrinter.cpp @@ -1006,10 +1006,13 @@ bool PrettyPrinter::visit(SizeofExpressionAST *ast) bool PrettyPrinter::visit(StringLiteralAST *ast) { - out << '"' << spell(ast->token) << '"'; - if (ast->next) { - out << ' '; - accept(ast->next); + for (StringLiteralAST *it = ast; it; it = it->next) { + if (tokenKind(ast->token) == T_STRING_LITERAL) + out << '"' << spell(ast->token) << '"'; + else + out << "L\"" << spell(ast->token) << '"'; + if (it->next) + out << ' '; } return false; } |