
23 Jun
2004
23 Jun
'04
8:04 a.m.
Clement Vasseur <nitro@epita.fr> writes:
Olivier found out the following fact:
As stated in sections 2.1 and 2.13.4 of the C++ standard, adjacent string literals must be concatenated during the translation phase.
const char* s = "bon" "jour." "\n";
is equivalent to:
const char* s = "bonjour.\n";
Here is the difference in the AST: StringLiteral(STRING-LITERAL("\"bon\" \"jour.\" \"\\n\"")) vs StringLiteral(STRING-LITERAL("\"bonjour.\\n\""))
Is it parse-cxx job to perform this concatenation, using a desugaring filter?
No. We can stay with it. It is simple enough. -- Valentin David valentin@lrde.epita.fr