summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2018-07-23 19:49:05 (GMT)
committerGitHub <noreply@github.com>2018-07-23 19:49:05 (GMT)
commit3c3813a5463814d066f77550dd0fbd651e34e4fe (patch)
treebf45c26667fc6e05fe60b2b97320d1b0b1f8c853 /src
parent9ceba00e4def6d375be2666519b8a5fe60caa43c (diff)
parent179f80e666d6c017f7130b6b26e687f2b5ea54d9 (diff)
downloadDoxygen-3c3813a5463814d066f77550dd0fbd651e34e4fe.zip
Doxygen-3c3813a5463814d066f77550dd0fbd651e34e4fe.tar.gz
Doxygen-3c3813a5463814d066f77550dd0fbd651e34e4fe.tar.bz2
Merge pull request #770 from albert-github/feature/bug_630931
Bug 630931 - \cond after @string literal containing backslash fails in C#
Diffstat (limited to 'src')
-rw-r--r--src/pre.l11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index 2cc66c1..09a946d 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1739,6 +1739,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x SkipString
%x CopyLine
%x CopyString
+%x CopyStringCs
%x CopyStringFtn
%x CopyStringFtnDouble
%x Include
@@ -1850,6 +1851,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);
if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran)
@@ -1869,10 +1875,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 );
}