diff options
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -1002,10 +1002,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" <SkipCxxComment>. { g_code->codify(yytext); } -<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*{B}*"/*"[*!]/[^/*] { +<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*"//@"[{}]{B}*\n)?{B}*"/*"[*!]/[^/*] { g_yyLineNr+=QCString(yytext).contains('\n'); } -<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)* { +<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*"//@"[{}]{B}*\n)? { g_yyLineNr+=QCString(yytext).contains('\n'); g_code->endCodeLine(); if (g_yyLineNr<g_inputLines) @@ -1046,6 +1046,40 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" endFontClass(); } } +<*>\n({B}*"//@"[{}]{B}*\n) { // remove one-line group marker + if (Config::stripCommentsFlag) + { + g_yyLineNr+=((QCString)yytext).contains('\n'); + g_code->endCodeLine(); + if (g_yyLineNr<g_inputLines) + { + startCodeLine(*g_code); + } + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + } +<*>^{B}*"//@"[{}]{B}*\n { // remove one-line group marker + if (Config::stripCommentsFlag) + { + g_yyLineNr++; + g_code->endCodeLine(); + if (g_yyLineNr<g_inputLines) + { + startCodeLine(*g_code); + } + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + } <*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment if (Config::stripCommentsFlag) { |