mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
updated CppParser
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Parser.cpp
|
||||
//
|
||||
// $Id: //poco/1.3/CppParser/src/Parser.cpp#7 $
|
||||
// $Id: //poco/1.4/CppParser/src/Parser.cpp#1 $
|
||||
//
|
||||
// Library: CppParser
|
||||
// Package: CppParser
|
||||
@@ -682,13 +682,18 @@ const Token* Parser::parseParameters(const Token* pNext, Function* pFunc)
|
||||
{
|
||||
std::string decl;
|
||||
int depth = 0;
|
||||
while ((depth > 0 || (!isOperator(pNext, OperatorToken::OP_CLOSPARENT) && !isOperator(pNext, OperatorToken::OP_COMMA))) && !isEOF(pNext))
|
||||
int tdepth = 0;
|
||||
while ((depth > 0 || tdepth > 0 || (!isOperator(pNext, OperatorToken::OP_CLOSPARENT) && !isOperator(pNext, OperatorToken::OP_COMMA))) && !isEOF(pNext))
|
||||
{
|
||||
append(decl, pNext);
|
||||
if (isOperator(pNext, OperatorToken::OP_OPENPARENT))
|
||||
++depth;
|
||||
else if (isOperator(pNext, OperatorToken::OP_CLOSPARENT))
|
||||
--depth;
|
||||
else if (isOperator(pNext, OperatorToken::OP_LT))
|
||||
++tdepth;
|
||||
else if (isOperator(pNext, OperatorToken::OP_GT))
|
||||
--tdepth;
|
||||
pNext = next();
|
||||
}
|
||||
if (isOperator(pNext, OperatorToken::OP_COMMA))
|
||||
|
||||
Reference in New Issue
Block a user