Revision: 5227 http://geany.svn.sourceforge.net/geany/?rev=5227&view=rev Author: ntrel Date: 2010-09-14 11:57:38 +0000 (Tue, 14 Sep 2010)
Log Message: ----------- Parse D function template names.
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/c.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-14 11:29:42 UTC (rev 5226) +++ trunk/ChangeLog 2010-09-14 11:57:38 UTC (rev 5227) @@ -3,6 +3,8 @@ * src/main.c: Ignore directories passed on the command-line (based on patch by Erik de Castro Lopo, thanks). + * tagmanager/c.c: + Parse D function template names.
2010-09-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/tagmanager/c.c =================================================================== --- trunk/tagmanager/c.c 2010-09-14 11:29:42 UTC (rev 5226) +++ trunk/tagmanager/c.c 2010-09-14 11:57:38 UTC (rev 5227) @@ -144,6 +144,7 @@ DECL_EVENT, DECL_SIGNAL, DECL_FUNCTION, + DECL_FUNCTION_TEMPLATE, DECL_IGNORE, /* non-taggable "declaration" */ DECL_INTERFACE, DECL_MODULE, @@ -1155,6 +1156,7 @@ case DECL_CLASS: type = TAG_CLASS; break; case DECL_ENUM: type = TAG_ENUM; break; case DECL_FUNCTION: type = TAG_FUNCTION; break; + case DECL_FUNCTION_TEMPLATE: type = TAG_FUNCTION; break; case DECL_INTERFACE:type = TAG_INTERFACE; break; case DECL_NAMESPACE:type = TAG_NAMESPACE; break; case DECL_STRUCT: type = TAG_STRUCT; break; @@ -2498,6 +2500,10 @@ token->type = TOKEN_NAME; processName (st); st->gotParenName = TRUE; + if (isLanguage(Lang_d) && c == '(' && isType (prev, TOKEN_NAME)) { + st->declaration = DECL_FUNCTION_TEMPLATE; + copyToken (st->blockName, prev); + } } else if (! st->gotArgs && info.isParamList) { @@ -2853,7 +2859,9 @@ { if (isType (prev, TOKEN_ARGS)) { - if (st->haveQualifyingName) + if (st->declaration == DECL_FUNCTION_TEMPLATE) + qualifyFunctionTag (st, st->blockName); + else if (st->haveQualifyingName) { st->declaration = DECL_FUNCTION; if (isType (prev2, TOKEN_NAME))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.