summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-01-05 10:26:10 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-01-05 10:26:10 (GMT)
commita66e1ada3c7467e267ff39262178fa4577f0b6ab (patch)
treeee15d10d932fa1d21de3ebfcb445e2bd81b9f00b /src/pre.l
parentff11b7d98ad7d24770afd151aa6b439adc7506d2 (diff)
downloadDoxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.zip
Doxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.tar.gz
Doxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.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);