aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/proparser
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-18 11:17:06 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-28 13:01:08 +0000
commit8a1e9e7313c0f7bbcea3f0c50e24f8ce8bc7aa1a (patch)
tree172ef660102f880af2a4c1cfdb460139d16296aa /src/shared/proparser
parent76469295b59b4f79a7cfb1bb20a9d519663297e7 (diff)
always flush scopes on closing brace
without that, both the lines cond1 { cond2: VAR = val } and cond1 { cond2: else: cond3 } would yield two bogus errors: first an excess brace, and then a missing one. Change-Id: I8609106c1ad387577deec2077e2ce13507ac4d3f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> (cherry picked from qtbase/962c7ab6f8705a8fb7b60c3544d4189503c1ec17)
Diffstat (limited to 'src/shared/proparser')
-rw-r--r--src/shared/proparser/qmakeparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/proparser/qmakeparser.cpp b/src/shared/proparser/qmakeparser.cpp
index e10ebb185b6..d3b057f22aa 100644
--- a/src/shared/proparser/qmakeparser.cpp
+++ b/src/shared/proparser/qmakeparser.cpp
@@ -721,8 +721,9 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
} else if (c == '}') {
FLUSH_LHS_LITERAL();
finalizeCond(tokPtr, buf, ptr, wordCount);
- flushScopes(tokPtr);
+ m_state = StNew; // De-facto newline
closeScope:
+ flushScopes(tokPtr);
if (!m_blockstack.top().braceLevel) {
parseError(fL1S("Excess closing brace."));
} else if (!--m_blockstack.top().braceLevel