summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-03-10 18:30:07 (GMT)
committerGitHub <noreply@github.com>2019-03-10 18:30:07 (GMT)
commit4cef14ae4ca37133a39b9ad5d800904e425fef73 (patch)
tree3deb7bbb54c1f9f1668f4b25b8b8e5e794bf3c93
parent6549eb681f312442a85b4058924ddc15c0a391a3 (diff)
parent9c44f500a8305ba6603875e49bc682f721fafa1d (diff)
downloadDoxygen-4cef14ae4ca37133a39b9ad5d800904e425fef73.zip
Doxygen-4cef14ae4ca37133a39b9ad5d800904e425fef73.tar.gz
Doxygen-4cef14ae4ca37133a39b9ad5d800904e425fef73.tar.bz2
Merge pull request #6772 from albert-github/feature/issue_6764
issue #6764 Incorrect parsing of C enum comments defined using a macro
-rw-r--r--src/pre.l16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index 1e45ca3..460c97e 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -882,6 +882,21 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
arg+=c;
}
}
+ else if (c=='/') // possible start of a comment
+ {
+ char prevChar = '\0';
+ arg+=c;
+ if ((cc=getCurrentChar(expr,rest,j)) == '*') // we have a comment
+ {
+ while ((cc=getNextChar(expr,rest,j))!=EOF && cc!=0)
+ {
+ c=(char)cc;
+ arg+=c;
+ if (c == '/' && prevChar == '*') break; // we have an end of comment
+ prevChar = c;
+ }
+ }
+ }
else // append other characters
{
arg+=c;
@@ -1110,7 +1125,6 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
if (replaced) // expand the macro and rescan the expression
{
-
//printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
QCString resultExpr=expMacro;
QCString restExpr=expr.right(expr.length()-len-p);