[geany/geany] 7aa5d9: Parse D class, struct, interface template bodies

Nick Treleaven git-noreply at xxxxx
Thu Jul 26 00:02:43 UTC 2012


Branch:      refs/heads/document-messages
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Wed, 04 Jan 2012 16:09:48
Commit:      7aa5d9516d4d72dcc634aca14984b6ab0ced4b99
             https://github.com/geany/geany/commit/7aa5d9516d4d72dcc634aca14984b6ab0ced4b99

Log Message:
-----------
Parse D class, struct, interface template bodies

Previously they were parsed as functions.


Modified Paths:
--------------
    tagmanager/c.c

Modified: tagmanager/c.c
12 files changed, 10 insertions(+), 2 deletions(-)
===================================================================
@@ -2881,10 +2881,18 @@ static void tagCheck (statementInfo *const st)
 					qualifyFunctionTag (st, st->blockName);
 				else if (st->haveQualifyingName)
 				{
-					st->declaration = DECL_FUNCTION;
 					if (isType (prev2, TOKEN_NAME))
 						copyToken (st->blockName, prev2);
-					qualifyFunctionTag (st, prev2);
+					/* D structure templates */
+					if (isLanguage (Lang_d) &&
+						(st->declaration == DECL_CLASS || st->declaration == DECL_STRUCT ||
+						st->declaration == DECL_INTERFACE))
+						qualifyBlockTag (st, prev2);
+					else
+					{
+						st->declaration = DECL_FUNCTION;
+						qualifyFunctionTag (st, prev2);
+					}
 				}
 			}
 			else if (isContextualStatement (st))


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list