summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2002-01-05 10:26:10 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2002-01-05 10:26:10 (GMT)
commit9d4d8095cd70a06a3536eea20c32ca7bbddd9f3a (patch)
treeee15d10d932fa1d21de3ebfcb445e2bd81b9f00b /src/pre.l
parentad53b7bebd3042598e5a11b1f3ef29468815138b (diff)
downloadDoxygen-9d4d8095cd70a06a3536eea20c32ca7bbddd9f3a.zip
Doxygen-9d4d8095cd70a06a3536eea20c32ca7bbddd9f3a.tar.gz
Doxygen-9d4d8095cd70a06a3536eea20c32ca7bbddd9f3a.tar.bz2
Release-1.2.13.1
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/pre.l b/src/pre.l
index 8586270..fdce24b 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1078,17 +1078,24 @@ BN [ \t\r\n]
BEGIN(CopyLine);
}
}
+<CopyLine>"extern"{BN}*"\"C\""*{BN}*"{" {
+ QCString text=yytext;
+ g_yyLineNr+=text.contains('\n');
+ outputArray(yytext,yyleng);
+ }
<CopyLine>"{" { // count brackets inside the main file
if (g_includeStack.isEmpty())
+ {
g_curlyCount++;
+ }
outputChar(*yytext);
}
<CopyLine>"}" { // count brackets inside the main file
- if (g_includeStack.isEmpty())
+ if (g_includeStack.isEmpty() && g_curlyCount>0)
+ {
g_curlyCount--;
+ }
outputChar(*yytext);
- // This should hold otherwise the preprocessor is confused
- //ASSERT(g_curlyCount>=0);
}
<CopyLine>"'"\\[0-7]{1,3}"'" {
outputArray(yytext,yyleng);