summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-09-16 18:19:40 (GMT)
committerGitHub <noreply@github.com>2019-09-16 18:19:40 (GMT)
commitae4608f5dfadc7c43e047fc5ffb13598c2b3094a (patch)
tree531b0cb7d9bd13c8e580e4ae3635af64fe07b330
parente9af075e2ca5a1178516130bc7ee2ee13634ba5b (diff)
parenta5d92dd49950dfddf739fd8808c0101965539a17 (diff)
downloadDoxygen-ae4608f5dfadc7c43e047fc5ffb13598c2b3094a.zip
Doxygen-ae4608f5dfadc7c43e047fc5ffb13598c2b3094a.tar.gz
Doxygen-ae4608f5dfadc7c43e047fc5ffb13598c2b3094a.tar.bz2
Merge pull request #7264 from albert-github/feature/bug_164073
Bug 164073 - There should be a dummy tag that Doxygen ignores
-rw-r--r--doc/commands.doc7
-rw-r--r--src/commentscan.l17
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/commands.doc b/doc/commands.doc
index 615e239..4e0a6f9 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -1411,6 +1411,13 @@ contains \c TEST, or \c DEV
then the \c \\details command is not needed.
<hr>
+\section cmdnoop \\noop ( text to be ignored )
+
+ \addindex \\noop
+ All the text, including the command, till the end of the line is ignored.
+ The command will most commonly be used in combination with \ref cfg_aliases "ALIASES"
+ to ignore not supported commands that are present for e.g. other processing tools.
+<hr>
\section cmdelse \\else
\addindex \\else
diff --git a/src/commentscan.l b/src/commentscan.l
index d8de073..abf218c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -78,6 +78,7 @@ static bool handleFile(const QCString &, const QCStringList &);
static bool handleDir(const QCString &, const QCStringList &);
static bool handleExample(const QCString &, const QCStringList &);
static bool handleDetails(const QCString &, const QCStringList &);
+static bool handleNoop(const QCString &, const QCStringList &);
static bool handleName(const QCString &, const QCStringList &);
static bool handleTodo(const QCString &, const QCStringList &);
static bool handleTest(const QCString &, const QCStringList &);
@@ -281,6 +282,7 @@ static DocCmdMap docCmdMap[] =
{ "warning", 0, TRUE },
{ "snippet", 0, TRUE },
{ "snippetlineno", 0, TRUE },
+ { "noop", &handleNoop, TRUE },
{ 0, 0, FALSE }
};
@@ -1000,6 +1002,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
%x CopyDoc
%x GuardExpr
%x CdataSection
+%x Noop
%%
@@ -2131,6 +2134,14 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
current->name+=*yytext;
}
+ /* ----- handle argument of noop command ------- */
+<Noop>{DOCNL} { // end of argument
+ if (*yytext=='\n') yyLineNr++;
+ addOutput('\n');
+ BEGIN( Comment );
+ }
+<Noop>. { // ignore other stuff
+ }
/* ----- handle argument of ingroup command ------- */
<InGroupParam>{LABELID} { // group id
@@ -2542,6 +2553,12 @@ static bool handleDetails(const QCString &, const QCStringList &)
return FALSE;
}
+static bool handleNoop(const QCString &, const QCStringList &)
+{
+ BEGIN( Noop );
+ return FALSE;
+}
+
static bool handleName(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);