summaryrefslogtreecommitdiffstats
path: root/src/linguist/shared/qmakeparser.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-18 17:32:34 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-12-18 14:43:41 +0000
commit0264b75c012ab271ebb76d9fb2165f9dcaad147e (patch)
tree0e2627162f7e7be82c845e65094edee437a74239 /src/linguist/shared/qmakeparser.cpp
parent2bd57bc160c958fc2398bf392019b58eecd224b9 (diff)
make all parse errors invalidate the parse result
they have been semi-warnings for a long enough time now. Change-Id: I3fffd63f7b44b30d2dc18cdcd74221c10e98399d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> (cherry picked from qtbase/704aec46230bf7ce29927bae03902e86454aecec)
Diffstat (limited to 'src/linguist/shared/qmakeparser.cpp')
-rw-r--r--src/linguist/shared/qmakeparser.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp
index 557a048b5..358faaf0b 100644
--- a/src/linguist/shared/qmakeparser.cpp
+++ b/src/linguist/shared/qmakeparser.cpp
@@ -577,7 +577,6 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
parseError(fL1S("Missing %1 terminator [found %2]")
.arg(QChar(term))
.arg(c ? QString(c) : QString::fromLatin1("end-of-line")));
- pro->setOk(false);
m_inError = true;
// Just parse on, as if there was a terminator ...
} else {
@@ -661,7 +660,6 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
parseError(fL1S("Extra characters after test expression."));
else
parseError(fL1S("Opening parenthesis without prior test name."));
- pro->setOk(false);
ptr = buf; // Put empty function name
}
*ptr++ = TokTestCall;
@@ -693,10 +691,8 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
finalizeCond(tokPtr, buf, ptr, wordCount);
flushCond(tokPtr);
++m_blockstack.top().braceLevel;
- if (grammar == TestGrammar) {
+ if (grammar == TestGrammar)
parseError(fL1S("Opening scope not permitted in this context."));
- pro->setOk(false);
- }
goto nextItem;
} else if (c == '}') {
FLUSH_LHS_LITERAL();
@@ -738,10 +734,8 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
putLineMarker(tokPtr);
if (grammar == TestGrammar) {
parseError(fL1S("Assignment not permitted in this context."));
- pro->setOk(false);
} else if (wordCount != 1) {
parseError(fL1S("Assignment needs exactly one word on the left hand side."));
- pro->setOk(false);
// Put empty variable name.
} else {
putBlock(tokPtr, buf, ptr - buf);
@@ -836,10 +830,8 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
}
flushScopes(tokPtr);
- if (m_blockstack.size() > 1) {
+ if (m_blockstack.size() > 1)
parseError(fL1S("Missing closing brace(s)."));
- pro->setOk(false);
- }
while (m_blockstack.size())
leaveScope(tokPtr);
tokBuff.resize(tokPtr - (ushort *)tokBuff.constData()); // Reserved capacity stays
@@ -939,7 +931,6 @@ void QMakeParser::bogusTest(ushort *&tokPtr)
m_invert = false;
m_state = StCond;
m_canElse = true;
- m_proFile->setOk(false);
}
void QMakeParser::finalizeCond(ushort *&tokPtr, ushort *uc, ushort *ptr, int wordCount)