[cfe-dev] [patch] Support for C++0x raw string literals

Craig Topper craig.topper at gmail.com
Tue Aug 9 00:07:35 PDT 2011


Here's my new and improved patch. Changes from previous version:

Fix up the error messages to give example delimiter. Added ending
delimiter to the unterminated message.
Fixed the lexing to not do phase 1 and phase 2 conversions per
lex.pptoken paragraph 3.
Use CharInfo array to simplify detection of valid delimiter characters.
On errors, lex forward to the next quote character hoping to get the
lexer back on track.
Factored out duplicate code from IsIdentifierStringPrefix and better
commented exactly what the checks were doing.
Fixed the comment block above StringLiteralParser to include unicode
and raw string literals. Added similar block above CharLiteralParser.
Factored out the code that copies characters into ResultBuf in
StringLiteralParser to better separate raw and non-raw string
handling.

~Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_strings.patch
Type: application/octet-stream
Size: 30163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110809/e99097e7/attachment.obj>


More information about the cfe-dev mailing list