summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorJoenio Costa <joenio@joenio.me>2017-12-28 15:41:02 (GMT)
committerJoenio Costa <joenio@joenio.me>2017-12-28 15:45:57 (GMT)
commitb4ec5e1442ec24b0345ba4362cf202014d8371cf (patch)
treefe93f6e0d5ae9c6167ddd3a876525f67819152a7 /addon
parent2f4139de014bf03898320a45fe52c92872c1e0f4 (diff)
downloadDoxygen-b4ec5e1442ec24b0345ba4362cf202014d8371cf.zip
Doxygen-b4ec5e1442ec24b0345ba4362cf202014d8371cf.tar.gz
Doxygen-b4ec5e1442ec24b0345ba4362cf202014d8371cf.tar.bz2
doxyparse bugfixes and minor improvements
- removing double quotes from function arguments list - fix doxyparse segfault for python source files - documenting install instructions from source - documenting build dependencies - updating email address Signed-off-by: Igor Ribeiro Barbosa Duarte <igor.ribeiro.duarte@gmail.com> Signed-off-by: Jonathan Moraes <arkyebr@gmail.com> Signed-off-by: Kleber <kleberbritomoreira10@gmail.com> Signed-off-by: leonardork <leodegolim@yahoo.com.br> Signed-off-by: Marcelo Ferreira <marcelohpf@gmail.com> Signed-off-by: Matheus Miranda <matheusmirandalacerda@gmail.com> Signed-off-by: Sabryna de Sousa <sabryna.sousa1323@gmail.com> Signed-off-by: VinyPinheiro <viny-pinheiro@hotmail.com>
Diffstat (limited to 'addon')
-rw-r--r--addon/doxyparse/README10
-rw-r--r--addon/doxyparse/doxyparse.cpp35
2 files changed, 37 insertions, 8 deletions
diff --git a/addon/doxyparse/README b/addon/doxyparse/README
index 9f7429c..288b31e 100644
--- a/addon/doxyparse/README
+++ b/addon/doxyparse/README
@@ -5,16 +5,24 @@ This directory contains an "source parsing engine" based on doxyapp code.
More info and source code repository: https://github.com/analizo/doxygen
+## build dependencies
+
+ apt-get install flex bison cmake build-essential python
+
## build
cmake -G "Unix Makefiles" -Dbuild_parse=ON
make
+## install
+
+ sudo make install
+
AUTHORS
=======
Antonio Terceiro <terceiro@softwarelivre.org>
João M. Miranda <joaomm88@gmail.com>
-Joenio Costa <joenio@colivre.coop.br>
+Joenio Costa <joenio@joenio.me>
Paulo Meirelles <paulo@softwarelivre.org>
Vinicius Daros <vkdaros@mercurio.eclipse.ime.usp.br>
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 6a1886c..584e8b0 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -138,7 +138,7 @@ static void printDefines() {
modules[current_module] = true;
}
static void printDefinition(std::string type, std::string signature, int line) {
- printf(" - %s:\n", signature.c_str());
+ printf(" - \"%s\":\n", signature.c_str());
printf(" type: %s\n", type.c_str());
printf(" line: %d\n", line);
}
@@ -155,7 +155,7 @@ static void printUses() {
printf(" uses:\n");
}
static void printReferenceTo(std::string type, std::string signature, std::string defined_in) {
- printf(" - %s:\n", signature.c_str());
+ printf(" - \"%s\":\n", signature.c_str());
printf(" type: %s\n", type.c_str());
printf(" defined_in: %s\n", defined_in.c_str());
}
@@ -167,6 +167,24 @@ static int isPartOfCStruct(MemberDef * md) {
return is_c_code && md->getClassDef() != NULL;
}
+std::string removeDoubleQuotes(std::string data) {
+ // remove surrounding double quotes
+ if (data.front() == '"' && data.back() == '"') {
+ data.erase(0, 1); // first double quote
+ data.erase(data.size() - 1); // last double quote
+ }
+ return data;
+}
+
+std::string argumentData(Argument *argument) {
+ std::string data = "";
+ if (argument->type != NULL)
+ data = removeDoubleQuotes(argument->type.data());
+ else if (argument->name != NULL)
+ data = removeDoubleQuotes(argument->name.data());
+ return data;
+}
+
std::string functionSignature(MemberDef* md) {
std::string signature = md->name().data();
if(md->isFunction()){
@@ -175,9 +193,9 @@ std::string functionSignature(MemberDef* md) {
signature += "(";
Argument * argument = iterator.toFirst();
if(argument != NULL) {
- signature += argument->type.data();
- for(++iterator; (argument = iterator.current()) ;++iterator){
- signature += std::string(",") + argument->type.data();
+ signature += argumentData(argument);
+ for(++iterator; (argument = iterator.current()); ++iterator){
+ signature += std::string(",") + argumentData(argument);
}
}
signature += ")";
@@ -245,7 +263,7 @@ static void lookupSymbol(Definition *d) {
std::string signature = functionSignature(md);
printDefinition(type, signature, md->getDefLine());
if (md->protection() == Public) {
- printProtection("protection public");
+ printProtection("public");
}
if (md->isFunction()) {
functionInformation(md);
@@ -311,7 +329,10 @@ static void detectProgrammingLanguage(FileNameListIterator& fnli) {
checkLanguage(filename, ".cc") ||
checkLanguage(filename, ".cxx") ||
checkLanguage(filename, ".cpp") ||
- checkLanguage(filename, ".java")
+ checkLanguage(filename, ".java") ||
+ checkLanguage(filename, ".py") ||
+ checkLanguage(filename, ".pyw") ||
+ checkLanguage(filename, ".cs")
) {
is_c_code = false;
}