diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-06-25 15:06:41 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-06-25 15:06:41 (GMT) |
commit | 5ade6c6ef255f31d264e74b176c257bbc85cd4c7 (patch) | |
tree | 85b63c5acfeaa5def630341302a12b466fbc3a42 /src/code.l | |
parent | cb417a1f59c3bf956677a59ce94cf13b4010f3c4 (diff) | |
download | Doxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.zip Doxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.tar.gz Doxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.tar.bz2 |
Release-1.1.4-20000625
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 40 |
1 files changed, 37 insertions, 3 deletions
@@ -396,6 +396,7 @@ static bool getLink(const char *className, static ClassDef *stripClassName(const char *s) { QCString tmp=s; + if (tmp.isEmpty()) return 0; static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*"); int p=0,i,l; while ((i=re.match(tmp,p,&l))!=-1) @@ -1131,10 +1132,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" endFontClass(); } } -<*>\n({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n) { // remove one-line group marker +<*>\n{B}*"//@"[{}].*\n { // remove one-line group marker if (Config::stripCommentsFlag) { - g_yyLineNr+=((QCString)yytext).contains('\n'); + g_yyLineNr+=2; g_code->endCodeLine(); if (g_yyLineNr<g_inputLines) { @@ -1148,7 +1149,26 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" endFontClass(); } } -<*>^{B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n { // remove one-line group marker +<*>\n{B}*"/*@"[{}] { // remove one-line group marker + if (Config::stripCommentsFlag) + { + g_lastSpecialCContext = YY_START; + g_yyLineNr++; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + codifyLines(yytext); + BEGIN(SkipComment); + } + } +<*>^{B}*"//@"[{}].*\n { // remove one-line group marker if (Config::stripCommentsFlag) { g_yyLineNr++; @@ -1165,6 +1185,20 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" endFontClass(); } } +<*>^{B}*"/*@"[{}] { // remove multi-line group marker + if (Config::stripCommentsFlag) + { + g_lastSpecialCContext = YY_START; + BEGIN(RemoveSpecialCComment); + } + else + { + g_lastCContext = YY_START ; + startFontClass("comment"); + g_code->codify(yytext); + BEGIN(SkipComment); + } + } <*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment if (Config::stripCommentsFlag) { |