mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-23 23:16:39 +01:00
CppParser: merge changes from internal repository
This commit is contained in:
parent
7f720ee6e1
commit
a1a228ff68
@ -810,7 +810,7 @@ const Token* Parser::parseEnum(const Token* pNext)
|
|||||||
int line = _istr.getCurrentLineNumber();
|
int line = _istr.getCurrentLineNumber();
|
||||||
pNext = next();
|
pNext = next();
|
||||||
|
|
||||||
if (isKeyword(pNext, IdentifierToken::KW_CLASS))
|
if (isKeyword(pNext, IdentifierToken::KW_CLASS) || isKeyword(pNext, IdentifierToken::KW_STRUCT))
|
||||||
{
|
{
|
||||||
flags = Enum::ENUM_IS_CLASS;
|
flags = Enum::ENUM_IS_CLASS;
|
||||||
pNext = next();
|
pNext = next();
|
||||||
@ -826,7 +826,19 @@ const Token* Parser::parseEnum(const Token* pNext)
|
|||||||
if (isOperator(pNext, OperatorToken::OP_COLON))
|
if (isOperator(pNext, OperatorToken::OP_COLON))
|
||||||
{
|
{
|
||||||
pNext = next();
|
pNext = next();
|
||||||
pNext = parseIdentifier(pNext, baseType);
|
if (pNext->is(Token::KEYWORD_TOKEN))
|
||||||
|
{
|
||||||
|
while (pNext->is(Token::KEYWORD_TOKEN)) // int, unsigned int, etc.
|
||||||
|
{
|
||||||
|
if (!baseType.empty()) baseType += ' ';
|
||||||
|
baseType += pNext->tokenString();
|
||||||
|
pNext = next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNext = parseIdentifier(pNext, baseType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expectOperator(pNext, OperatorToken::OP_OPENBRACE, "{");
|
expectOperator(pNext, OperatorToken::OP_OPENBRACE, "{");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user