[anjuta] anjuta-tags: bgo #616780. Handle more cases.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] anjuta-tags: bgo #616780. Handle more cases.
- Date: Sun, 2 May 2010 21:31:16 +0000 (UTC)
commit 38dfa9f40752b473156a478526c566f7cdc0c188
Author: Massimo Corà <mcora src gnome org>
Date: Sun May 2 23:27:55 2010 +0200
anjuta-tags: bgo #616780. Handle more cases.
Now anjuta-tags works good with results like
H::L A::B::D::f()
{
}
plugins/symbol-db/anjuta-tags/c.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/symbol-db/anjuta-tags/c.c b/plugins/symbol-db/anjuta-tags/c.c
index 9ae5f4f..ccca3a4 100644
--- a/plugins/symbol-db/anjuta-tags/c.c
+++ b/plugins/symbol-db/anjuta-tags/c.c
@@ -48,7 +48,7 @@
* DATA DECLARATIONS
*/
-enum { NumTokens = 7 };
+enum { NumTokens = 15 };
typedef enum eException {
ExceptionNone, ExceptionEOF, ExceptionFormattingError,
@@ -2141,13 +2141,17 @@ static void parseReturnType (statementInfo *const st)
/* get the total number of double colons */
int j;
int num_colons = 0;
-
- for (j = 0; j < NumTokens; j++)
+
+ /* we already are at 2nd token */
+ /* the +=2 means that colons are usually found at even places */
+ for (j = 2; j < NumTokens; j+=2)
{
tokenInfo *curr_tok;
curr_tok = prevToken (st, j);
if (curr_tok->type == TOKEN_DOUBLE_COLON)
num_colons++;
+ else
+ break;
}
/*printf ("FOUND colons %d\n", num_colons);*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]