diff options
author | albert-github <albert.tests@gmail.com> | 2018-06-18 12:44:08 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-06-18 12:44:08 (GMT) |
commit | 179f80e666d6c017f7130b6b26e687f2b5ea54d9 (patch) | |
tree | 3f729e0cd4b4798e0bfcdf348a2da9c0762398b4 /src/pre.l | |
parent | 4536982bdebc0056d0c5d64a12881f20b5801c06 (diff) | |
download | Doxygen-179f80e666d6c017f7130b6b26e687f2b5ea54d9.zip Doxygen-179f80e666d6c017f7130b6b26e687f2b5ea54d9.tar.gz Doxygen-179f80e666d6c017f7130b6b26e687f2b5ea54d9.tar.bz2 |
Bug 630931 - \cond after @string literal containing backslash fails in C#
Special handling in preprocessor for CSharp literal strings (i.e. strings starting with @).
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1739,6 +1739,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x SkipString %x CopyLine %x CopyString +%x CopyStringCs %x CopyStringFtn %x Include %x IncludeID @@ -1849,6 +1850,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <CopyLine>"'"."'" { outputArray(yytext,(int)yyleng); } +<CopyLine>@\" { + if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_CSharp) REJECT; + outputArray(yytext,(int)yyleng); + BEGIN( CopyStringCs ); + } <CopyLine>\" { outputChar(*yytext); BEGIN( CopyString ); @@ -1861,10 +1867,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <CopyString>[^\"\\\r\n]+ { outputArray(yytext,(int)yyleng); } +<CopyStringCs>[^\"\r\n]+ { + outputArray(yytext,(int)yyleng); + } <CopyString>\\. { outputArray(yytext,(int)yyleng); } -<CopyString>\" { +<CopyString,CopyStringCs>\" { outputChar(*yytext); BEGIN( CopyLine ); } |