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:
Oswald Buddenhagen 2015-02-19 14:05:27 +01:00
parent b7e839fbbd
commit 9113e5677c

View File

@ -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);