summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l349
1 files changed, 186 insertions, 163 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index e40d80f..39b0edc 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -30,8 +30,7 @@
#include <qstack.h>
#include <qregexp.h>
#include <qfile.h>
-#include <qstringlist.h>
-
+#include <qcstringlist.h>
#include "scanner.h"
#include "entry.h"
#include "doxygen.h"
@@ -55,81 +54,81 @@
#define YY_NO_UNISTD_H 1
// forward declarations
-static bool handleBrief(const QCString &, const QCString &);
-static bool handleFn(const QCString &, const QCString &);
-static bool handleDef(const QCString &, const QCString &);
-static bool handleOverload(const QCString &, const QCString &);
-static bool handleEnum(const QCString &, const QCString &);
-static bool handleDefGroup(const QCString &, const QCString &);
-static bool handleAddToGroup(const QCString &, const QCString &);
-static bool handleWeakGroup(const QCString &, const QCString &);
-static bool handleNamespace(const QCString &, const QCString &);
-static bool handlePackage(const QCString &, const QCString &);
-static bool handleClass(const QCString &, const QCString &);
-static bool handleHeaderFile(const QCString &, const QCString &);
-static bool handleProtocol(const QCString &, const QCString &);
-static bool handleCategory(const QCString &, const QCString &);
-static bool handleUnion(const QCString &, const QCString &);
-static bool handleStruct(const QCString &, const QCString &);
-static bool handleInterface(const QCString &, const QCString &);
-static bool handleIdlException(const QCString &, const QCString &);
-static bool handlePage(const QCString &, const QCString &);
-static bool handleMainpage(const QCString &, const QCString &);
-static bool handleFile(const QCString &, const QCString &);
-static bool handleDir(const QCString &, const QCString &);
-static bool handleExample(const QCString &, const QCString &);
-static bool handleDetails(const QCString &, const QCString &);
-static bool handleName(const QCString &, const QCString &);
-static bool handleTodo(const QCString &, const QCString &);
-static bool handleTest(const QCString &, const QCString &);
-static bool handleBug(const QCString &, const QCString &);
-static bool handleSubpage(const QCString &s, const QCString &);
-static bool handleDeprecated(const QCString &, const QCString &);
-static bool handleXRefItem(const QCString &, const QCString &);
-static bool handleRelated(const QCString &, const QCString &);
-static bool handleRelatedAlso(const QCString &, const QCString &);
-static bool handleMemberOf(const QCString &, const QCString &);
-static bool handleRefItem(const QCString &, const QCString &);
-static bool handleSection(const QCString &, const QCString &);
-static bool handleAnchor(const QCString &, const QCString &);
-static bool handleCite(const QCString &, const QCString &);
-static bool handleFormatBlock(const QCString &, const QCString &);
-static bool handleAddIndex(const QCString &, const QCString &);
-static bool handleIf(const QCString &, const QCString &);
-static bool handleIfNot(const QCString &, const QCString &);
-static bool handleElseIf(const QCString &, const QCString &);
-static bool handleElse(const QCString &, const QCString &);
-static bool handleEndIf(const QCString &, const QCString &);
-static bool handleIngroup(const QCString &, const QCString &);
-static bool handleNoSubGrouping(const QCString &, const QCString &);
-static bool handleShowInitializer(const QCString &, const QCString &);
-static bool handleHideInitializer(const QCString &, const QCString &);
-static bool handleCallgraph(const QCString &, const QCString &);
-static bool handleHideCallgraph(const QCString &, const QCString &);
-static bool handleCallergraph(const QCString &, const QCString &);
-static bool handleHideCallergraph(const QCString &, const QCString &);
-static bool handleInternal(const QCString &, const QCString &);
-static bool handleLineBr(const QCString &, const QCString &);
-static bool handleStatic(const QCString &, const QCString &);
-static bool handlePure(const QCString &, const QCString &);
-static bool handlePrivate(const QCString &, const QCString &);
-static bool handlePrivateSection(const QCString &, const QCString &);
-static bool handleProtected(const QCString &, const QCString &);
-static bool handleProtectedSection(const QCString &, const QCString &);
-static bool handlePublic(const QCString &s, const QCString &);
-static bool handlePublicSection(const QCString &s, const QCString &);
-static bool handleToc(const QCString &s, const QCString &);
-static bool handleInherit(const QCString &, const QCString &);
-static bool handleExtends(const QCString &, const QCString &);
-static bool handleCopyDoc(const QCString &, const QCString &);
-static bool handleCopyBrief(const QCString &, const QCString &);
-static bool handleCopyDetails(const QCString &, const QCString &);
-static bool handleParBlock(const QCString &, const QCString &);
-static bool handleEndParBlock(const QCString &, const QCString &);
-static bool handleParam(const QCString &, const QCString &);
-static bool handleRetval(const QCString &, const QCString &);
-
-typedef bool (*DocCmdFunc)(const QCString &name, const QCString &opt);
+static bool handleBrief(const QCString &, const QCStringList &);
+static bool handleFn(const QCString &, const QCStringList &);
+static bool handleDef(const QCString &, const QCStringList &);
+static bool handleOverload(const QCString &, const QCStringList &);
+static bool handleEnum(const QCString &, const QCStringList &);
+static bool handleDefGroup(const QCString &, const QCStringList &);
+static bool handleAddToGroup(const QCString &, const QCStringList &);
+static bool handleWeakGroup(const QCString &, const QCStringList &);
+static bool handleNamespace(const QCString &, const QCStringList &);
+static bool handlePackage(const QCString &, const QCStringList &);
+static bool handleClass(const QCString &, const QCStringList &);
+static bool handleHeaderFile(const QCString &, const QCStringList &);
+static bool handleProtocol(const QCString &, const QCStringList &);
+static bool handleCategory(const QCString &, const QCStringList &);
+static bool handleUnion(const QCString &, const QCStringList &);
+static bool handleStruct(const QCString &, const QCStringList &);
+static bool handleInterface(const QCString &, const QCStringList &);
+static bool handleIdlException(const QCString &, const QCStringList &);
+static bool handlePage(const QCString &, const QCStringList &);
+static bool handleMainpage(const QCString &, const QCStringList &);
+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 handleName(const QCString &, const QCStringList &);
+static bool handleTodo(const QCString &, const QCStringList &);
+static bool handleTest(const QCString &, const QCStringList &);
+static bool handleBug(const QCString &, const QCStringList &);
+static bool handleSubpage(const QCString &s, const QCStringList &);
+static bool handleDeprecated(const QCString &, const QCStringList &);
+static bool handleXRefItem(const QCString &, const QCStringList &);
+static bool handleRelated(const QCString &, const QCStringList &);
+static bool handleRelatedAlso(const QCString &, const QCStringList &);
+static bool handleMemberOf(const QCString &, const QCStringList &);
+static bool handleRefItem(const QCString &, const QCStringList &);
+static bool handleSection(const QCString &, const QCStringList &);
+static bool handleAnchor(const QCString &, const QCStringList &);
+static bool handleCite(const QCString &, const QCStringList &);
+static bool handleFormatBlock(const QCString &, const QCStringList &);
+static bool handleAddIndex(const QCString &, const QCStringList &);
+static bool handleIf(const QCString &, const QCStringList &);
+static bool handleIfNot(const QCString &, const QCStringList &);
+static bool handleElseIf(const QCString &, const QCStringList &);
+static bool handleElse(const QCString &, const QCStringList &);
+static bool handleEndIf(const QCString &, const QCStringList &);
+static bool handleIngroup(const QCString &, const QCStringList &);
+static bool handleNoSubGrouping(const QCString &, const QCStringList &);
+static bool handleShowInitializer(const QCString &, const QCStringList &);
+static bool handleHideInitializer(const QCString &, const QCStringList &);
+static bool handleCallgraph(const QCString &, const QCStringList &);
+static bool handleHideCallgraph(const QCString &, const QCStringList &);
+static bool handleCallergraph(const QCString &, const QCStringList &);
+static bool handleHideCallergraph(const QCString &, const QCStringList &);
+static bool handleInternal(const QCString &, const QCStringList &);
+static bool handleLineBr(const QCString &, const QCStringList &);
+static bool handleStatic(const QCString &, const QCStringList &);
+static bool handlePure(const QCString &, const QCStringList &);
+static bool handlePrivate(const QCString &, const QCStringList &);
+static bool handlePrivateSection(const QCString &, const QCStringList &);
+static bool handleProtected(const QCString &, const QCStringList &);
+static bool handleProtectedSection(const QCString &, const QCStringList &);
+static bool handlePublic(const QCString &s, const QCStringList &);
+static bool handlePublicSection(const QCString &s, const QCStringList &);
+static bool handleToc(const QCString &s, const QCStringList &);
+static bool handleInherit(const QCString &, const QCStringList &);
+static bool handleExtends(const QCString &, const QCStringList &);
+static bool handleCopyDoc(const QCString &, const QCStringList &);
+static bool handleCopyBrief(const QCString &, const QCStringList &);
+static bool handleCopyDetails(const QCString &, const QCStringList &);
+static bool handleParBlock(const QCString &, const QCStringList &);
+static bool handleEndParBlock(const QCString &, const QCStringList &);
+static bool handleParam(const QCString &, const QCStringList &);
+static bool handleRetval(const QCString &, const QCStringList &);
+
+typedef bool (*DocCmdFunc)(const QCString &name, const QCStringList &optList);
struct DocCmdMap
{
@@ -1106,16 +1105,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// the {B}* in the front was added for bug620924
QCString fullMatch = QCString(yytext);
int idx = fullMatch.find('{');
+ int idxEnd = fullMatch.find("}",idx+1);
QCString cmdName;
- QCString optName;
- if (idx == -1)
+ QCStringList optList;
+ if (idx == -1) // no options
{
cmdName = QCString(yytext).stripWhiteSpace().data()+1; // to remove {CMD}
}
- else
+ else // options present
{
cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD}
- optName = fullMatch.right(fullMatch.length() - idx).stripWhiteSpace().data();
+ QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
+ optList = QCStringList::split(',',optStr);
}
DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName);
if (cmdPtr) // special action is required
@@ -1130,7 +1131,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
setOutput(OutputDoc);
}
//if (i>0) addOutput(QCString(yytext).left(i)); // removed for bug 689341
- if (cmdPtr->func && cmdPtr->func(cmdName, optName))
+ if (cmdPtr->func && cmdPtr->func(cmdName, optList))
{
// implicit split of the comment block into two
// entries. Restart the next block at the start
@@ -2293,14 +2294,14 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
//----------------------------------------------------------------------------
-static bool handleBrief(const QCString &, const QCString &)
+static bool handleBrief(const QCString &, const QCStringList &)
{
//printf("handleBrief\n");
setOutput(OutputBrief);
return FALSE;
}
-static bool handleFn(const QCString &, const QCString &)
+static bool handleFn(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MEMBERDOC_SEC);
functionProto.resize(0);
@@ -2309,7 +2310,7 @@ static bool handleFn(const QCString &, const QCString &)
return stop;
}
-static bool handleDef(const QCString &, const QCString &)
+static bool handleDef(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::DEFINEDOC_SEC);
functionProto.resize(0);
@@ -2317,21 +2318,21 @@ static bool handleDef(const QCString &, const QCString &)
return stop;
}
-static bool handleOverload(const QCString &, const QCString &)
+static bool handleOverload(const QCString &, const QCStringList &)
{
functionProto.resize(0);
BEGIN(OverloadParam);
return FALSE;
}
-static bool handleEnum(const QCString &, const QCString &)
+static bool handleEnum(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::ENUMDOC_SEC);
BEGIN(EnumDocArg1);
return stop;
}
-static bool handleDefGroup(const QCString &, const QCString &)
+static bool handleDefGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_NORMAL;
@@ -2339,7 +2340,7 @@ static bool handleDefGroup(const QCString &, const QCString &)
return stop;
}
-static bool handleAddToGroup(const QCString &, const QCString &)
+static bool handleAddToGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_ADD;
@@ -2347,7 +2348,7 @@ static bool handleAddToGroup(const QCString &, const QCString &)
return stop;
}
-static bool handleWeakGroup(const QCString &, const QCString &)
+static bool handleWeakGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_WEAK;
@@ -2355,83 +2356,83 @@ static bool handleWeakGroup(const QCString &, const QCString &)
return stop;
}
-static bool handleNamespace(const QCString &, const QCString &)
+static bool handleNamespace(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::NAMESPACEDOC_SEC);
BEGIN( NameSpaceDocArg1 );
return stop;
}
-static bool handlePackage(const QCString &, const QCString &)
+static bool handlePackage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::PACKAGEDOC_SEC);
BEGIN( PackageDocArg1 );
return stop;
}
-static bool handleClass(const QCString &, const QCString &)
+static bool handleClass(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::CLASSDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleHeaderFile(const QCString &, const QCString &)
+static bool handleHeaderFile(const QCString &, const QCStringList &)
{
BEGIN( ClassDocArg2 );
return FALSE;
}
-static bool handleProtocol(const QCString &, const QCString &)
+static bool handleProtocol(const QCString &, const QCStringList &)
{ // Obj-C protocol
bool stop=makeStructuralIndicator(Entry::PROTOCOLDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleCategory(const QCString &, const QCString &)
+static bool handleCategory(const QCString &, const QCStringList &)
{ // Obj-C category
bool stop=makeStructuralIndicator(Entry::CATEGORYDOC_SEC);
BEGIN( CategoryDocArg1 );
return stop;
}
-static bool handleUnion(const QCString &, const QCString &)
+static bool handleUnion(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::UNIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleStruct(const QCString &, const QCString &)
+static bool handleStruct(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::STRUCTDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleInterface(const QCString &, const QCString &)
+static bool handleInterface(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::INTERFACEDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleIdlException(const QCString &, const QCString &)
+static bool handleIdlException(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::EXCEPTIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handlePage(const QCString &, const QCString &)
+static bool handlePage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::PAGEDOC_SEC);
BEGIN( PageDocArg1 );
return stop;
}
-static bool handleMainpage(const QCString &, const QCString &)
+static bool handleMainpage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MAINPAGEDOC_SEC);
if (!stop)
@@ -2442,7 +2443,7 @@ static bool handleMainpage(const QCString &, const QCString &)
return stop;
}
-static bool handleFile(const QCString &, const QCString &)
+static bool handleFile(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::FILEDOC_SEC);
if (!stop)
@@ -2453,7 +2454,7 @@ static bool handleFile(const QCString &, const QCString &)
return stop;
}
-static bool handleParam(const QCString &, const QCString &)
+static bool handleParam(const QCString &, const QCStringList &)
{
// we need process param and retval arguments to escape leading underscores in case of
// markdown processing, see bug775493
@@ -2462,14 +2463,14 @@ static bool handleParam(const QCString &, const QCString &)
return FALSE;
}
-static bool handleRetval(const QCString &, const QCString &)
+static bool handleRetval(const QCString &, const QCStringList &)
{
addOutput("@retval ");
BEGIN( ParamArg1 );
return FALSE;
}
-static bool handleDir(const QCString &, const QCString &)
+static bool handleDir(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::DIRDOC_SEC);
if (!stop) current->name = yyFileName;
@@ -2477,15 +2478,30 @@ static bool handleDir(const QCString &, const QCString &)
return stop;
}
-static bool handleExample(const QCString &, const QCString &)
+static bool handleExample(const QCString &cmd, const QCStringList &optList)
{
- bool stop=makeStructuralIndicator(Entry::EXAMPLE_SEC);
+ Entry::Sections section=Entry::EXAMPLE_SEC;
+ QCStringList::ConstIterator it;
+ for ( it = optList.begin(); it != optList.end(); ++it )
+ {
+ QCString opt = (*it).stripWhiteSpace().lower();
+ if (opt=="lineno")
+ {
+ section=Entry::EXAMPLE_LINENO_SEC;
+ }
+ else
+ {
+ warn(yyFileName,yyLineNr,
+ "unsupported option '%s' for command '\\%s'",qPrint(opt),qPrint(cmd));
+ }
+ }
+ bool stop=makeStructuralIndicator(section);
if (!stop) current->name = yyFileName;
BEGIN( FileDocArg1 );
return stop;
}
-static bool handleDetails(const QCString &, const QCString &)
+static bool handleDetails(const QCString &, const QCStringList &)
{
if (inContext!=OutputBrief)
{
@@ -2496,7 +2512,7 @@ static bool handleDetails(const QCString &, const QCString &)
return FALSE;
}
-static bool handleName(const QCString &, const QCString &)
+static bool handleName(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);
if (!stop)
@@ -2511,7 +2527,7 @@ static bool handleName(const QCString &, const QCString &)
return stop;
}
-static bool handleTodo(const QCString &, const QCString &)
+static bool handleTodo(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Todo;
setOutput(OutputXRef);
@@ -2519,7 +2535,7 @@ static bool handleTodo(const QCString &, const QCString &)
return FALSE;
}
-static bool handleTest(const QCString &, const QCString &)
+static bool handleTest(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Test;
setOutput(OutputXRef);
@@ -2527,7 +2543,7 @@ static bool handleTest(const QCString &, const QCString &)
return FALSE;
}
-static bool handleBug(const QCString &, const QCString &)
+static bool handleBug(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Bug;
setOutput(OutputXRef);
@@ -2535,7 +2551,7 @@ static bool handleBug(const QCString &, const QCString &)
return FALSE;
}
-static bool handleDeprecated(const QCString &, const QCString &)
+static bool handleDeprecated(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Deprecated;
setOutput(OutputXRef);
@@ -2543,14 +2559,14 @@ static bool handleDeprecated(const QCString &, const QCString &)
return FALSE;
}
-static bool handleXRefItem(const QCString &, const QCString &)
+static bool handleXRefItem(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Item;
BEGIN(XRefItemParam1);
return FALSE;
}
-static bool handleParBlock(const QCString &, const QCString &)
+static bool handleParBlock(const QCString &, const QCStringList &)
{
if (g_insideParBlock)
{
@@ -2567,7 +2583,7 @@ static bool handleParBlock(const QCString &, const QCString &)
return FALSE;
}
-static bool handleEndParBlock(const QCString &, const QCString &)
+static bool handleEndParBlock(const QCString &, const QCStringList &)
{
if (!g_insideParBlock)
{
@@ -2580,7 +2596,7 @@ static bool handleEndParBlock(const QCString &, const QCString &)
return FALSE;
}
-static bool handleRelated(const QCString &, const QCString &)
+static bool handleRelated(const QCString &, const QCStringList &)
{
if (!current->relates.isEmpty())
{
@@ -2592,7 +2608,7 @@ static bool handleRelated(const QCString &, const QCString &)
return FALSE;
}
-static bool handleRelatedAlso(const QCString &, const QCString &)
+static bool handleRelatedAlso(const QCString &, const QCStringList &)
{
if (!current->relates.isEmpty())
{
@@ -2604,7 +2620,7 @@ static bool handleRelatedAlso(const QCString &, const QCString &)
return FALSE;
}
-static bool handleMemberOf(const QCString &, const QCString &)
+static bool handleMemberOf(const QCString &, const QCStringList &)
{
if (!current->relates.isEmpty())
{
@@ -2616,14 +2632,14 @@ static bool handleMemberOf(const QCString &, const QCString &)
return FALSE;
}
-static bool handleRefItem(const QCString &, const QCString &)
+static bool handleRefItem(const QCString &, const QCStringList &)
{
addOutput("@refitem ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleSection(const QCString &s, const QCString &)
+static bool handleSection(const QCString &s, const QCStringList &)
{
setOutput(OutputDoc);
addOutput("@"+s+" ");
@@ -2635,7 +2651,7 @@ static bool handleSection(const QCString &s, const QCString &)
return FALSE;
}
-static bool handleSubpage(const QCString &s, const QCString &)
+static bool handleSubpage(const QCString &s, const QCStringList &)
{
if (current->section!=Entry::EMPTY_SEC &&
current->section!=Entry::PAGEDOC_SEC &&
@@ -2655,14 +2671,14 @@ static bool handleSubpage(const QCString &s, const QCString &)
return FALSE;
}
-static bool handleAnchor(const QCString &s, const QCString &)
+static bool handleAnchor(const QCString &s, const QCStringList &)
{
addOutput("@"+s+" ");
BEGIN(AnchorLabel);
return FALSE;
}
-static bool handleCite(const QCString &s, const QCString &)
+static bool handleCite(const QCString &s, const QCStringList &)
{
if (!g_spaceBeforeCmd.isEmpty())
{
@@ -2674,9 +2690,16 @@ static bool handleCite(const QCString &s, const QCString &)
return FALSE;
}
-static bool handleFormatBlock(const QCString &s, const QCString &opt)
+static bool handleFormatBlock(const QCString &s, const QCStringList &optList)
{
- addOutput("@"+s+" "+opt);
+ if (optList.isEmpty())
+ {
+ addOutput("@"+s+" ");
+ }
+ else
+ {
+ addOutput("@"+s+"{"+optList.join(",")+"} ");
+ }
//printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data());
blockName=s;
g_commentCount=0;
@@ -2684,14 +2707,14 @@ static bool handleFormatBlock(const QCString &s, const QCString &opt)
return FALSE;
}
-static bool handleAddIndex(const QCString &, const QCString &)
+static bool handleAddIndex(const QCString &, const QCStringList &)
{
addOutput("@addindex ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleIf(const QCString &, const QCString &)
+static bool handleIf(const QCString &, const QCStringList &)
{
enabledSectionFound=FALSE;
guardType = Guard_If;
@@ -2700,7 +2723,7 @@ static bool handleIf(const QCString &, const QCString &)
return FALSE;
}
-static bool handleIfNot(const QCString &, const QCString &)
+static bool handleIfNot(const QCString &, const QCStringList &)
{
enabledSectionFound=FALSE;
guardType = Guard_IfNot;
@@ -2709,7 +2732,7 @@ static bool handleIfNot(const QCString &, const QCString &)
return FALSE;
}
-static bool handleElseIf(const QCString &, const QCString &)
+static bool handleElseIf(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2724,7 +2747,7 @@ static bool handleElseIf(const QCString &, const QCString &)
return FALSE;
}
-static bool handleElse(const QCString &, const QCString &)
+static bool handleElse(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2738,7 +2761,7 @@ static bool handleElse(const QCString &, const QCString &)
return FALSE;
}
-static bool handleEndIf(const QCString &, const QCString &)
+static bool handleEndIf(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2759,56 +2782,56 @@ static bool handleEndIf(const QCString &, const QCString &)
return FALSE;
}
-static bool handleIngroup(const QCString &, const QCString &)
+static bool handleIngroup(const QCString &, const QCStringList &)
{
inGroupParamFound=FALSE;
BEGIN( InGroupParam );
return FALSE;
}
-static bool handleNoSubGrouping(const QCString &, const QCString &)
+static bool handleNoSubGrouping(const QCString &, const QCStringList &)
{
current->subGrouping = FALSE;
return FALSE;
}
-static bool handleShowInitializer(const QCString &, const QCString &)
+static bool handleShowInitializer(const QCString &, const QCStringList &)
{
current->initLines = 100000; // ON
return FALSE;
}
-static bool handleHideInitializer(const QCString &, const QCString &)
+static bool handleHideInitializer(const QCString &, const QCStringList &)
{
current->initLines = 0; // OFF
return FALSE;
}
-static bool handleCallgraph(const QCString &, const QCString &)
+static bool handleCallgraph(const QCString &, const QCStringList &)
{
current->callGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallgraph(const QCString &, const QCString &)
+static bool handleHideCallgraph(const QCString &, const QCStringList &)
{
current->callGraph = FALSE; // OFF
return FALSE;
}
-static bool handleCallergraph(const QCString &, const QCString &)
+static bool handleCallergraph(const QCString &, const QCStringList &)
{
current->callerGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallergraph(const QCString &, const QCString &)
+static bool handleHideCallergraph(const QCString &, const QCStringList &)
{
current->callerGraph = FALSE; // OFF
return FALSE;
}
-static bool handleInternal(const QCString &, const QCString &)
+static bool handleInternal(const QCString &, const QCStringList &)
{
if (!Config_getBool(INTERNAL_DOCS))
{
@@ -2830,74 +2853,71 @@ static bool handleInternal(const QCString &, const QCString &)
return FALSE;
}
-static bool handleLineBr(const QCString &, const QCString &)
+static bool handleLineBr(const QCString &, const QCStringList &)
{
addOutput('\n');
return FALSE;
}
-static bool handleStatic(const QCString &, const QCString &)
+static bool handleStatic(const QCString &, const QCStringList &)
{
endBrief();
current->stat = TRUE;
return FALSE;
}
-static bool handlePure(const QCString &, const QCString &)
+static bool handlePure(const QCString &, const QCStringList &)
{
endBrief();
current->virt = Pure;
return FALSE;
}
-static bool handlePrivate(const QCString &, const QCString &)
+static bool handlePrivate(const QCString &, const QCStringList &)
{
current->protection = Private;
return FALSE;
}
-static bool handlePrivateSection(const QCString &, const QCString &)
+static bool handlePrivateSection(const QCString &, const QCStringList &)
{
current->protection = protection = Private;
return FALSE;
}
-static bool handleProtected(const QCString &, const QCString &)
+static bool handleProtected(const QCString &, const QCStringList &)
{
current->protection = Protected;
return FALSE;
}
-static bool handleProtectedSection(const QCString &, const QCString &)
+static bool handleProtectedSection(const QCString &, const QCStringList &)
{
current->protection = protection = Protected ;
return FALSE;
}
-static bool handlePublic(const QCString &, const QCString &)
+static bool handlePublic(const QCString &, const QCStringList &)
{
current->protection = Public;
return FALSE;
}
-static bool handlePublicSection(const QCString &, const QCString &)
+static bool handlePublicSection(const QCString &, const QCStringList &)
{
current->protection = protection = Public;
return FALSE;
}
-static bool handleToc(const QCString &, const QCString &opt)
+static bool handleToc(const QCString &, const QCStringList &optList)
{
if (current->section==Entry::PAGEDOC_SEC ||
current->section==Entry::MAINPAGEDOC_SEC)
{
- QString optName = opt.stripWhiteSpace(); // to be sure
- optName = optName.left(optName.length() - 1).right(optName.length() - 2);
- QStringList optList=QStringList::split(",",optName,FALSE);
- QStringList::Iterator it;
+ QCStringList::ConstIterator it;
for ( it = optList.begin(); it != optList.end(); ++it )
{
- QString opt = (*it).stripWhiteSpace().lower();
+ QCString opt = (*it).stripWhiteSpace().lower();
char dum;
int level = 5;
int i = opt.find(':');
@@ -2929,7 +2949,10 @@ static bool handleToc(const QCString &, const QCString &opt)
{
current->localToc.enableXml(level);
}
- else warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ else
+ {
+ warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ }
}
}
if (current->localToc.nothingEnabled())
@@ -2940,19 +2963,19 @@ static bool handleToc(const QCString &, const QCString &opt)
return FALSE;
}
-static bool handleInherit(const QCString &, const QCString &)
+static bool handleInherit(const QCString &, const QCStringList &)
{
BEGIN(InheritParam);
return FALSE;
}
-static bool handleExtends(const QCString &, const QCString &)
+static bool handleExtends(const QCString &, const QCStringList &)
{
BEGIN(ExtendsParam);
return FALSE;
}
-static bool handleCopyBrief(const QCString &, const QCString &)
+static bool handleCopyBrief(const QCString &, const QCStringList &)
{
if (current->brief.isEmpty() && current->doc.isEmpty())
{ // if we don't have a brief or detailed description yet,
@@ -2969,7 +2992,7 @@ static bool handleCopyBrief(const QCString &, const QCString &)
return FALSE;
}
-static bool handleCopyDetails(const QCString &, const QCString &)
+static bool handleCopyDetails(const QCString &, const QCStringList &)
{
setOutput(OutputDoc);
if (!g_spaceBeforeCmd.isEmpty())
@@ -2981,7 +3004,7 @@ static bool handleCopyDetails(const QCString &, const QCString &)
return FALSE;
}
-static bool handleCopyDoc(const QCString &, const QCString &)
+static bool handleCopyDoc(const QCString &, const QCStringList &)
{
setOutput(OutputBrief);
if (!g_spaceBeforeCmd.isEmpty())