diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2009-07-20 20:05:52 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2009-07-20 20:05:52 (GMT) |
commit | 142b4807d2ae7479691bd0800d28364b9857b82f (patch) | |
tree | b8b0cb3ac894bdb88087d78e328a8a0d88943b97 /src/pre.l | |
parent | b70a5b4f9325ec703db37394feeaa9ebc11228b4 (diff) | |
download | Doxygen-142b4807d2ae7479691bd0800d28364b9857b82f.zip Doxygen-142b4807d2ae7479691bd0800d28364b9857b82f.tar.gz Doxygen-142b4807d2ae7479691bd0800d28364b9857b82f.tar.bz2 |
Release-1.5.9-20090720
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -104,6 +104,7 @@ static QCString g_blockName; static int g_condCtx; static bool g_skip; static QStack<bool> g_condStack; +static bool g_insideCS; // C# has simpler preprocessor static bool g_lexInit = FALSE; @@ -118,6 +119,7 @@ static void setFileName(const char *name) g_yyFileName=convertToQCString(fi.absFilePath()); g_yyFileDef=findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig); if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0; + g_insideCS = g_yyFileName.right(3)==".cs"; } static void incrLevel() @@ -1817,7 +1819,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) g_insideComment=FALSE; BEGIN(DefineText); } -<DefName>{ID}/{B}*"\n" { +<DefName>{ID}/{B}*"\n" { // bare define g_argDict = 0; g_defArgs = -1; g_defName = yytext; @@ -1831,6 +1833,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputArray(tmp.data(),tmp.length()); g_quoteArg=FALSE; g_insideComment=FALSE; + if (g_insideCS) g_defText="1"; // for C#, use "1" as define text BEGIN(DefineText); } else // define is a guard => hide |