CppParser: Support for return values in global ns

If a return value of a member function is specified to be in the global
namespace using leading double colons (e.g. ::MyClass) the parser is now
recognizing it as valid c++ code instead of aborting with an exception.
This commit is contained in:
Thomas Kopp
2022-04-25 13:48:33 +02:00
parent 9d1c428c86
commit 507d13ede7

View File

@@ -379,7 +379,7 @@ const Token* Parser::parseClassMembers(const Token* pNext, Struct* /*pClass*/)
poco_assert (isOperator(pNext, OperatorToken::OP_OPENBRACE)); poco_assert (isOperator(pNext, OperatorToken::OP_OPENBRACE));
pNext = next(); pNext = next();
while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN) || isOperator(pNext, OperatorToken::OP_COMPL)) while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN) || isOperator(pNext, OperatorToken::OP_COMPL) || isOperator(pNext, OperatorToken::OP_DBL_COLON))
{ {
switch (pNext->asInteger()) switch (pNext->asInteger())
{ {