Commit 13148ede authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

factor out putOperator()



Change-Id: I1b01e36e15dc93fc4e37597b66841d7102fa6b0d
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
(cherry picked from qtbase/bb26d1da0028d61e7f72fff3643af0c4601ab63e)
parent 6d348a2d
......@@ -928,14 +928,19 @@ void QMakeParser::flushCond(ushort *&tokPtr)
}
}
void QMakeParser::finalizeTest(ushort *&tokPtr)
void QMakeParser::putOperator(ushort *&tokPtr)
{
flushScopes(tokPtr);
putLineMarker(tokPtr);
if (m_operator != NoOperator) {
putTok(tokPtr, (m_operator == AndOperator) ? TokAnd : TokOr);
m_operator = NoOperator;
}
}
void QMakeParser::finalizeTest(ushort *&tokPtr)
{
flushScopes(tokPtr);
putLineMarker(tokPtr);
putOperator(tokPtr);
if (m_invert) {
putTok(tokPtr, TokNot);
m_invert = false;
......@@ -1079,10 +1084,7 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg
if (*uce == (TokLiteral|TokNewStr)) {
uint nlen = uce[1];
if (uce[nlen + 2] == TokFuncTerminator) {
if (m_operator != NoOperator) {
putTok(tokPtr, (m_operator == AndOperator) ? TokAnd : TokOr);
m_operator = NoOperator;
}
putOperator(tokPtr);
putTok(tokPtr, defType);
putHashStr(tokPtr, uce + 2, nlen);
enterScope(tokPtr, true, StCtrl);
......
......@@ -141,6 +141,7 @@ private:
const ushort *cur, const QString &in);
void finalizeCond(ushort *&tokPtr, ushort *uc, ushort *ptr, int wordCount);
void finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int argc);
void putOperator(ushort *&tokPtr);
void finalizeTest(ushort *&tokPtr);
void bogusTest(ushort *&tokPtr, const QString &msg);
void enterScope(ushort *&tokPtr, bool special, ScopeState state);
......
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