factor out putOperator()
Change-Id: I1b01e36e15dc93fc4e37597b66841d7102fa6b0d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
d800ac64d3
commit
bb26d1da00
@ -908,14 +908,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;
|
||||
@ -1059,10 +1064,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);
|
||||
|
@ -144,6 +144,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);
|
||||
|
Loading…
Reference in New Issue
Block a user