C#: Correctly parse enums with a base type specifier

See CSharp Language Specification 14.1.
This commit is contained in:
Colomban Wendling 2013-07-14 03:00:34 +02:00
parent d91c532f95
commit af5dfba9d8
2 changed files with 5 additions and 4 deletions

View File

@ -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 ("{;");

View File

@ -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