Introduced skipActualArguments().

This commit is contained in:
Roberto Raggi
2009-03-03 16:59:55 +01:00
parent 1d75990667
commit 7327a8ea4d
2 changed files with 19 additions and 12 deletions

View File

@@ -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)

View File

@@ -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,