forked from qt-creator/qt-creator
Introduced skipActualArguments().
This commit is contained in:
@@ -764,18 +764,7 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
while (_dot->isNot(T_EOF_SYMBOL)) {
|
||||
if (_dot->is(T_LPAREN))
|
||||
++count;
|
||||
|
||||
else if (_dot->is(T_RPAREN)) {
|
||||
if (! --count)
|
||||
break;
|
||||
}
|
||||
|
||||
++_dot;
|
||||
}
|
||||
skipActualArguments();
|
||||
|
||||
if (_dot->isNot(T_RPAREN))
|
||||
_result->append(spell);
|
||||
@@ -794,6 +783,22 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
|
||||
_result = previousResult;
|
||||
}
|
||||
|
||||
void Preprocessor::skipActualArguments()
|
||||
{
|
||||
int count = 0;
|
||||
while (_dot->isNot(T_EOF_SYMBOL)) {
|
||||
if (_dot->is(T_LPAREN))
|
||||
++count;
|
||||
|
||||
else if (_dot->is(T_RPAREN)) {
|
||||
if (! --count)
|
||||
break;
|
||||
}
|
||||
|
||||
++_dot;
|
||||
}
|
||||
}
|
||||
|
||||
Macro *Preprocessor::processObjectLikeMacro(TokenIterator identifierToken,
|
||||
const QByteArray &spell,
|
||||
Macro *m)
|
||||
|
||||
@@ -127,6 +127,8 @@ private:
|
||||
QByteArray tokenSpell(const CPlusPlus::Token &token) const;
|
||||
QByteArray tokenText(const CPlusPlus::Token &token) const; // does a deep copy
|
||||
|
||||
void skipActualArguments();
|
||||
|
||||
void processNewline();
|
||||
|
||||
void processSkippingBlocks(bool skippingBlocks,
|
||||
|
||||
Reference in New Issue
Block a user