don't ignore parsing errors in eval() and on the command line

to optimally support cumulative mode, the parser will happily return a
bytecode object even when parsing failed, so errors must be treated
later.

Change-Id: I1a5c0ca9bf46a93d7359f590f0dd0ddc96baba0a
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:56:28 +02:00
parent 160e608f5a
commit bb063b35f4
2 changed files with 16 additions and 10 deletions

View File

@@ -1128,9 +1128,11 @@ void QMakeEvaluator::visitCmdLine(const QString &cmds)
{
if (!cmds.isEmpty()) {
if (ProFile *pro = m_parser->parsedProBlock(fL1S("(command line)"), cmds)) {
m_locationStack.push(m_current);
visitProBlock(pro, pro->tokPtr());
m_current = m_locationStack.pop();
if (pro->isOk()) {
m_locationStack.push(m_current);
visitProBlock(pro, pro->tokPtr());
m_current = m_locationStack.pop();
}
pro->deref();
}
}