Pass the node the Doxygen comment is attached to to DoxygenParser.
This will be needed to take into account various Doxygen-specific features that can be attached to this node.
This commit is contained in:
parent
a7b67a2cac
commit
dc3102a535
4 changed files with 16 additions and 15 deletions
|
|
@ -954,12 +954,16 @@ DoxygenEntityList DoxygenParser::parse(TokenListCIt endParsingIndex,
|
|||
return aNewList;
|
||||
}
|
||||
|
||||
DoxygenEntityList DoxygenParser::createTree(const std::string &doxygenBlob,
|
||||
const std::string &fileName,
|
||||
int lineNumber)
|
||||
DoxygenEntityList DoxygenParser::createTree(Node* node, String* documentation)
|
||||
{
|
||||
m_node = node;
|
||||
|
||||
tokenizeDoxygenComment(
|
||||
Char(documentation),
|
||||
Char(Getfile(documentation)),
|
||||
Getline(documentation)
|
||||
);
|
||||
|
||||
tokenizeDoxygenComment(doxygenBlob, fileName, lineNumber);
|
||||
if (noisy) {
|
||||
cout << "---TOKEN LIST---" << endl;
|
||||
printList();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include "swig.h"
|
||||
|
||||
#include "DoxygenEntity.h"
|
||||
|
||||
class DoxygenParser {
|
||||
|
|
@ -91,6 +94,7 @@ private:
|
|||
bool m_isVerbatimText; // used to handle \htmlonly and \verbatim commands
|
||||
bool m_isInQuotedString;
|
||||
|
||||
Node* m_node;
|
||||
std::string m_fileName;
|
||||
int m_fileLineNo;
|
||||
|
||||
|
|
@ -375,9 +379,7 @@ private:
|
|||
public:
|
||||
DoxygenParser(bool noisy = false);
|
||||
virtual ~DoxygenParser();
|
||||
DoxygenEntityList createTree(const std::string &doxygen,
|
||||
const std::string &fileName,
|
||||
int lineNumber);
|
||||
DoxygenEntityList createTree(Node* node, String* documentation);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -928,8 +928,7 @@ String *JavaDocConverter::makeDocumentation(Node *node)
|
|||
return comment;
|
||||
}
|
||||
|
||||
DoxygenEntityList entityList = parser.createTree(Char (documentation),
|
||||
Char (Getfile(documentation)), Getline(documentation));
|
||||
DoxygenEntityList entityList = parser.createTree(node, documentation);
|
||||
|
||||
// entityList.sort(CompareDoxygenEntities()); sorting currently not used,
|
||||
|
||||
|
|
|
|||
|
|
@ -852,9 +852,7 @@ String *PyDocConverter::makeDocumentation(Node *n)
|
|||
oneDoc = Char (comment);
|
||||
Delete(comment);
|
||||
} else {
|
||||
std::list<DoxygenEntity> entityList = parser.createTree(
|
||||
Char (documentation), Char (Getfile(documentation)),
|
||||
Getline(documentation));
|
||||
std::list<DoxygenEntity> entityList = parser.createTree(n, documentation);
|
||||
DoxygenEntity root("root", entityList);
|
||||
|
||||
oneDoc = translateSubtree(root);
|
||||
|
|
@ -908,9 +906,7 @@ String *PyDocConverter::makeDocumentation(Node *n)
|
|||
pyDocString = Char (comment);
|
||||
Delete(comment);
|
||||
} else {
|
||||
std::list<DoxygenEntity> entityList = parser.createTree(
|
||||
Char (documentation), Char (Getfile(documentation)),
|
||||
Getline(documentation));
|
||||
std::list<DoxygenEntity> entityList = parser.createTree(n, documentation);
|
||||
DoxygenEntity root("root", entityList);
|
||||
pyDocString = translateSubtree(root);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue