summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-16 17:27:25 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-16 17:27:25 (GMT)
commit8feba3b60badccd732e753fadb089d13799db829 (patch)
tree156f3b8b79f2df8ecf0c8d3175e2788e40b4b824 /src/pre.l
parent61a83f312ce95090dc02ca3b8ce8dd3319d97df1 (diff)
downloadDoxygen-8feba3b60badccd732e753fadb089d13799db829.zip
Doxygen-8feba3b60badccd732e753fadb089d13799db829.tar.gz
Doxygen-8feba3b60badccd732e753fadb089d13799db829.tar.bz2
Release-1.1.5-20000716
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index 66eebfb..cc80748 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -668,12 +668,26 @@ QCString removeIdsAndMarkers(const char *s)
}
p+=2;
}
- else if (isdigit(c))
+ else if (isdigit(c)) // number
{
result+=c;
p++;
inNum=TRUE;
}
+ else if (c=='d') // identifier starting with a `d'
+ {
+ if (strncmp(p,"defined ",8)==0 || strncmp(p,"defined(",8)==0)
+ // defined keyword
+ {
+ p+=7; // skip defined
+ }
+ else
+ {
+ result+="0L";
+ p++;
+ while ((c=*p) && isId(c)) p++;
+ }
+ }
else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
{
result+="0L";
@@ -731,8 +745,10 @@ bool computeExpression(const QCString &expr)
{
QCString e=expr;
expandExpression(e,0,0);
+ //printf("after expansion `%s'\n",e.data());
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
+ //printf("parsing `%s'\n",e.data());
return parseCppExpression(e);
}