summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2009-07-20 20:05:52 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2009-07-20 20:05:52 (GMT)
commit142b4807d2ae7479691bd0800d28364b9857b82f (patch)
treeb8b0cb3ac894bdb88087d78e328a8a0d88943b97 /src/pre.l
parentb70a5b4f9325ec703db37394feeaa9ebc11228b4 (diff)
downloadDoxygen-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.l5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index c818ce9..83f5c9f 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -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