summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/code.l b/src/code.l
index 1fd0a91..5e0e724 100644
--- a/src/code.l
+++ b/src/code.l
@@ -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)
{