Commit 7327a8ea authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Introduced skipActualArguments().

parent 1d759906
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment