summaryrefslogtreecommitdiff
path: root/src/pre.l
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:54:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:54:45 +0900
commit5e552810bc3dfc820036b4b16ae53561bb7cf3c6 (patch)
tree50ee6379d4fdad236b392051a73a2825dc98fb5e /src/pre.l
parentd6f1e74d173f59fc63d7e031cd9685b4eb38fed2 (diff)
downloaddoxygen-5e552810bc3dfc820036b4b16ae53561bb7cf3c6.tar.gz
doxygen-5e552810bc3dfc820036b4b16ae53561bb7cf3c6.tar.bz2
doxygen-5e552810bc3dfc820036b4b16ae53561bb7cf3c6.zip
Imported Upstream version 1.8.15upstream/1.8.15
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/pre.l b/src/pre.l
index bf1ec9b..5eb0c5c 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1405,7 +1405,7 @@ void addDefine()
MemberDef *md=new MemberDef(
g_yyFileName,g_yyLineNr-g_yyMLines,g_yyColNr,
"#define",g_defName,g_defArgsStr,0,
- Public,Normal,FALSE,Member,MemberType_Define,0,0);
+ Public,Normal,FALSE,Member,MemberType_Define,0,0,"");
if (!g_defArgsStr.isEmpty())
{
ArgumentList *argList = new ArgumentList;
@@ -1739,7 +1739,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x SkipString
%x CopyLine
%x CopyString
+%x CopyStringCs
%x CopyStringFtn
+%x CopyStringFtnDouble
%x Include
%x IncludeID
%x EndImport
@@ -1849,9 +1851,21 @@ 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 );
+ if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran)
+ {
+ BEGIN( CopyString );
+ }
+ else
+ {
+ BEGIN( CopyStringFtnDouble );
+ }
}
<CopyLine>\' {
if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT;
@@ -1859,17 +1873,30 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( CopyStringFtn );
}
<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 );
+ }
+<CopyStringFtnDouble>[^\"\\\r\n]+ {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\\. {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\" {
outputChar(*yytext);
BEGIN( CopyLine );
}
<CopyStringFtn>[^\'\\\r\n]+ {
- outputArray(yytext,(int)yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyStringFtn>\\. {
outputArray(yytext,(int)yyleng);
@@ -1934,6 +1961,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<CopyLine>"\\"\r?/\n { // strip line continuation characters
+ if (getLanguageFromFileName(g_yyFileName)==SrcLangExt_Fortran) outputChar(*yytext);
}
<CopyLine>. {
outputChar(*yytext);
@@ -3195,7 +3223,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
{
CondCtx *ctx = g_condStack.pop();
QCString sectionInfo = " ";
- if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data());
+ if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data());
warn(fileName,ctx->lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
delete ctx;