catch missing closing braces outside any scope as well
it doesn't make a whole lot of sense, but it's possible to create braced blocks which have no semantic meaning. Change-Id: Id55dfdee1aa3fade507cbd1eb34bdffcd7eb6bff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
b7e839fbbd
commit
9113e5677c
@ -841,7 +841,7 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
|
||||
}
|
||||
|
||||
flushScopes(tokPtr);
|
||||
if (m_blockstack.size() > 1)
|
||||
if (m_blockstack.size() > 1 || m_blockstack.top().braceLevel)
|
||||
parseError(fL1S("Missing closing brace(s)."));
|
||||
while (m_blockstack.size())
|
||||
leaveScope(tokPtr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user