@@ -138,7 +138,7 @@ static void printDefines() {
138
138
modules[current_module] = true ;
139
139
}
140
140
static void printDefinition (std::string type, std::string signature, int line) {
141
- printf (" - %s :\n " , signature.c_str ());
141
+ printf (" - \" %s \" :\n " , signature.c_str ());
142
142
printf (" type: %s\n " , type.c_str ());
143
143
printf (" line: %d\n " , line);
144
144
}
@@ -155,7 +155,7 @@ static void printUses() {
155
155
printf (" uses:\n " );
156
156
}
157
157
static void printReferenceTo (std::string type, std::string signature, std::string defined_in) {
158
- printf (" - %s :\n " , signature.c_str ());
158
+ printf (" - \" %s \" :\n " , signature.c_str ());
159
159
printf (" type: %s\n " , type.c_str ());
160
160
printf (" defined_in: %s\n " , defined_in.c_str ());
161
161
}
@@ -167,6 +167,24 @@ static int isPartOfCStruct(MemberDef * md) {
167
167
return is_c_code && md->getClassDef () != NULL ;
168
168
}
169
169
170
+ std::string removeDoubleQuotes (std::string data) {
171
+ // remove surrounding double quotes
172
+ if (data.front () == ' "' && data.back () == ' "' ) {
173
+ data.erase (0 , 1 ); // first double quote
174
+ data.erase (data.size () - 1 ); // last double quote
175
+ }
176
+ return data;
177
+ }
178
+
179
+ std::string argumentData (Argument *argument) {
180
+ std::string data = " " ;
181
+ if (argument->type != NULL )
182
+ data = removeDoubleQuotes (argument->type .data ());
183
+ else if (argument->name != NULL )
184
+ data = removeDoubleQuotes (argument->name .data ());
185
+ return data;
186
+ }
187
+
170
188
std::string functionSignature (MemberDef* md) {
171
189
std::string signature = md->name ().data ();
172
190
if (md->isFunction ()){
@@ -175,9 +193,9 @@ std::string functionSignature(MemberDef* md) {
175
193
signature += " (" ;
176
194
Argument * argument = iterator.toFirst ();
177
195
if (argument != NULL ) {
178
- signature += argument-> type . data ( );
179
- for (++iterator; (argument = iterator.current ()) ; ++iterator){
180
- signature += std::string (" ," ) + argument-> type . data ( );
196
+ signature += argumentData (argument );
197
+ for (++iterator; (argument = iterator.current ()); ++iterator){
198
+ signature += std::string (" ," ) + argumentData (argument );
181
199
}
182
200
}
183
201
signature += " )" ;
@@ -245,7 +263,7 @@ static void lookupSymbol(Definition *d) {
245
263
std::string signature = functionSignature (md);
246
264
printDefinition (type, signature, md->getDefLine ());
247
265
if (md->protection () == Public) {
248
- printProtection (" protection public" );
266
+ printProtection (" public" );
249
267
}
250
268
if (md->isFunction ()) {
251
269
functionInformation (md);
@@ -311,7 +329,10 @@ static void detectProgrammingLanguage(FileNameListIterator& fnli) {
311
329
checkLanguage (filename, " .cc" ) ||
312
330
checkLanguage (filename, " .cxx" ) ||
313
331
checkLanguage (filename, " .cpp" ) ||
314
- checkLanguage (filename, " .java" )
332
+ checkLanguage (filename, " .java" ) ||
333
+ checkLanguage (filename, " .py" ) ||
334
+ checkLanguage (filename, " .pyw" ) ||
335
+ checkLanguage (filename, " .cs" )
315
336
) {
316
337
is_c_code = false ;
317
338
}
0 commit comments