[anjuta] anjuta-tags: bgo #616780 - Wrong return type recognition
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] anjuta-tags: bgo #616780 - Wrong return type recognition
- Date: Sun, 2 May 2010 21:31:11 +0000 (UTC)
commit efe59ca59f3124a4af4009abc3b4fa0fcffedc9d
Author: Massimo Corà <mcora src gnome org>
Date: Sun May 2 21:04:08 2010 +0200
anjuta-tags: bgo #616780 - Wrong return type recognition
plugins/symbol-db/anjuta-tags/c.c | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
---
diff --git a/plugins/symbol-db/anjuta-tags/c.c b/plugins/symbol-db/anjuta-tags/c.c
index 71a7067..9ae5f4f 100644
--- a/plugins/symbol-db/anjuta-tags/c.c
+++ b/plugins/symbol-db/anjuta-tags/c.c
@@ -2135,9 +2135,24 @@ static void parseReturnType (statementInfo *const st)
return;
finding_tok = prevToken (st, 2);
-
+
if (finding_tok->type == TOKEN_DOUBLE_COLON)
- lower_bound = 3;
+ {
+ /* get the total number of double colons */
+ int j;
+ int num_colons = 0;
+
+ for (j = 0; j < NumTokens; j++)
+ {
+ tokenInfo *curr_tok;
+ curr_tok = prevToken (st, j);
+ if (curr_tok->type == TOKEN_DOUBLE_COLON)
+ num_colons++;
+ }
+
+ /*printf ("FOUND colons %d\n", num_colons);*/
+ lower_bound = 2 * num_colons + 1;
+ }
else
lower_bound = 1;
@@ -2169,7 +2184,8 @@ static void parseReturnType (statementInfo *const st)
break;
case TOKEN_KEYWORD:
- vStringPut (ReturnType, ' ');
+ vStringPut (ReturnType, ' ');
+
default:
vStringCat (ReturnType, curr_tok->name);
break;
@@ -2188,6 +2204,7 @@ static void parseReturnType (statementInfo *const st)
/*/
printf ("~~~~~ statement ---->\n");
ps (st);
+ printf ("NumTokens: %d\n", NumTokens);
printf ("FOUND ReturnType: %s\n", vStringValue (ReturnType));
printf ("<~~~~~\n");
//*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]