Permalink
Browse files

Parse C++11 enums with type specifier

Part of #3578557.
  • Loading branch information...
1 parent a77785e commit f2f22d34ab9063852279bc6c5a45c8d3cfafdc0a @b4n b4n committed Oct 22, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 tagmanager/ctags/c.c
@@ -2625,6 +2625,15 @@ static void processColon (statementInfo *const st)
else if (c == ';')
setToken (st, TOKEN_SEMICOLON);
}
+ else if (isLanguage (Lang_cpp) && st->declaration == DECL_ENUM)
+ {
+ /* skip enum's base type */
+ c = skipToOneOf ("{;");
+ if (c == '{')
+ setToken (st, TOKEN_BRACE_OPEN);
+ else if (c == ';')
+ setToken (st, TOKEN_SEMICOLON);
+ }
else
{
const tokenInfo *const prev = prevToken (st, 1);

0 comments on commit f2f22d3

Please sign in to comment.