From ead9c0b1b894505097f4de0039c9b55dd799cf3c Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 1 Nov 2018 16:12:21 +0100 Subject: [PATCH] pro2cmake: Handle Statements before Scopes This fixes among other things the unit tests. Change-Id: If9e23735d1d52cf49dc1f03749129fd726e8dea5 Reviewed-by: Simon Hausmann --- util/cmake/pro2cmake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 353d22762d2..6471f3ff5f0 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -331,7 +331,7 @@ class QmakeParser: Statement = pp.Group(Load | Include | Option | DefineTest | FunctionCall | Operation) StatementLine = Statement + EOL - StatementGroup = pp.ZeroOrMore(Scope | EOL | StatementLine) + StatementGroup = pp.ZeroOrMore(StatementLine | Scope | EOL) Block = pp.Suppress('{') + pp.Optional(EOL) \ + pp.ZeroOrMore(EOL | Statement + EOL | Scope) \