Removal of unneeded importants; debugging parser
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10777 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
180171ddff
commit
88bd4e6331
12 changed files with 498 additions and 574 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "TokenList.h"
|
||||
#include "JavaDocConverter.h"
|
||||
|
||||
|
||||
DoxygenParser doxyParse;
|
||||
JavaDocConverter jDC;
|
||||
|
||||
|
|
@ -27,7 +28,7 @@ DoxygenTranslator::~DoxygenTranslator(){
|
|||
char *DoxygenTranslator::convert(char* doxygenBlob, char* option){
|
||||
|
||||
list <DoxygenEntity> rootList = doxyParse.createTree(string(doxygenBlob));
|
||||
rootList = doxyParse.createTree(string(doxygenBlob));
|
||||
|
||||
string returnedString;
|
||||
if(strcmp(option, "JAVADOC") == 0){
|
||||
returnedString = jDC.convertToJavaDoc(rootList);
|
||||
|
|
@ -39,3 +40,32 @@ char *DoxygenTranslator::convert(char* doxygenBlob, char* option){
|
|||
return nonConstString;
|
||||
}
|
||||
|
||||
int testCommands(){
|
||||
string exampleArray[] = {
|
||||
"/**\n * \n * Random Line \n * \\@ \n * Random Line After */",
|
||||
"/**\n * \n * Random Line Before \n * \\b bold \n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \\copydoc bold \n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \n * \\addindex An Entire Line\n * \\addindex An Entire Line\n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \n * \\return An Entire Paragraph \n * Including This Line \n * \n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \\return An Entire Paragraph \n * Including This Line \n * \\author Shouldn't be part of return */",
|
||||
"/**\n * \n * Random Line \n * \\code this should continue \n * until here \\endcode \n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \\param singleword then the rest of \n * the description \n * \n * Random Line After */",
|
||||
"/**\n * \n * Random Line \n * \\page singleword this should go til here \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\page singleword this should go til here \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\category singleword \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\category singleword oneword \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\category singleword oneword twoword \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\dir singleword \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\dir \n * but not this */",
|
||||
"/**\n * \n * Random Line \n * \\fakecommand details \n * but not this */"
|
||||
};
|
||||
//string exampleArrayUniques = {};
|
||||
DoxygenTranslator dT = DoxygenTranslator();
|
||||
for (int i = 0; i < 16; i ++ ){
|
||||
cout << "---ORIGINAL DOXYGEN--- " << endl << exampleArray[i] << endl;
|
||||
char *nonConstString = (char *)malloc(exampleArray[i].length()+1);
|
||||
strcpy(nonConstString, exampleArray[i].c_str());
|
||||
dT.convert(nonConstString, "JAVADOC");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue