Commit 0be80466 authored by Roberto Raggi's avatar Roberto Raggi

Save/Restore the if-level.

parent 3ab0a28c
......@@ -757,6 +757,8 @@ bool Preprocessor::markGeneratedTokens(bool markGeneratedTokens,
void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
QByteArray *result)
{
const int previousIfLevel = iflevel;
QByteArray *previousResult = _result;
_result = result;
......@@ -889,6 +891,8 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
env->currentFile = previousFileName;
env->currentLine = previousCurrentLine;
_result = previousResult;
iflevel = previousIfLevel;
}
void Preprocessor::collectActualArguments(QVector<MacroArgumentReference> *actuals)
......
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