[geany/geany] af5dfb: C#: Correctly parse enums with a base type specifier

Colomban Wendling git-noreply at xxxxx
Sun Jul 14 01:12:22 UTC 2013


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 14 Jul 2013 01:12:22 UTC
Commit:      af5dfba9d8ab0f6af737f7ac17ad1df675e550ba
             https://github.com/geany/geany/commit/af5dfba9d8ab0f6af737f7ac17ad1df675e550ba

Log Message:
-----------
C#: Correctly parse enums with a base type specifier

See CSharp Language Specification 14.1.


Modified Paths:
--------------
    tagmanager/ctags/c.c
    tests/ctags/bug1515910.cs.tags

Modified: tagmanager/ctags/c.c
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -2637,7 +2637,8 @@ static void processColon (statementInfo *const st)
 			else if (c == ';')
 				setToken (st, TOKEN_SEMICOLON);
 		}
-		else if (isLanguage (Lang_cpp) && st->declaration == DECL_ENUM)
+		else if ((isLanguage (Lang_cpp) || isLanguage (Lang_csharp)) &&
+				 st->declaration == DECL_ENUM)
 		{
 			/* skip enum's base type */
 			c = skipToOneOf ("{;");


Modified: tests/ctags/bug1515910.cs.tags
6 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1,9 +1,9 @@
 # format=tagmanager
 C�1�0
+Enum1�2�0
 MyGenericClass1�1�0
-Value1�4�byte�0
-Values�4�byte�0
-byte�2�0
+Value1�4�Enum1�0
+Values�4�Enum1�0
 int1�8�C�0�int
 str1�8�C�0
 str2�8�C�0



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list