pro2cmake: Handle Statements before Scopes

This fixes among other things the unit tests.

Change-Id: If9e23735d1d52cf49dc1f03749129fd726e8dea5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2018-11-01 16:12:21 +01:00
parent 187c466d9a
commit ead9c0b1b8

View File

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