make visitProBlock() return the last condition's state

will need it later.

eval() needs to be taught to ignore the return code, as qmake stupidly
does. as a side effect, flow control statements inside eval() don't have
an effect outside eval() any more, which is only sane.

Change-Id: I924e9d687f693a224dd7fa73af4a9bc69247e2df
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-07-27 19:49:43 +02:00
parent 3d629b1a2b
commit 160e608f5a
2 changed files with 5 additions and 5 deletions

View File

@@ -1017,10 +1017,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
if (!pro)
return ReturnFalse;
m_locationStack.push(m_current);
VisitReturn ret = visitProBlock(pro, pro->tokPtr());
visitProBlock(pro, pro->tokPtr());
m_current = m_locationStack.pop();
pro->deref();
return ret;
return ReturnTrue; // This return value is not too useful, but that's qmake
}
case T_BREAK:
if (m_skipLevel)