qt6-bb10/util/cmake/tests
Alexandru Croitor 76f5b784ce Fix the fix to correctly handle comments in multi-line assignments
The previous fix where the Grammar comment style was changed to
remove the newlines was incorrect, because if you have

 foo=1#comment
 bar=2

after the Grammar comment ignoring, it would transform into

 foo=1bar=2

which will clearly fail to parse, so the new line has to stay.

But we would still have the following case which would fail:
 foo=a \
 # comment
 b

Apparently qmake things that's the equivalent of
foo=a b

but the grammar parses it as
 foo=a \
 \n (newline)
 b

Thus the parsing fails because there's a newline and then some
weird 'b' token which the grammar does not expect.

The best fix I found is to preprocess the source, to remove
completely commented out lines.

So:
 foo=a \
 # comment
 b

gets transformed into

 foo=a \
 b

Change-Id: I2487a0dbf94a6ad4d917d0a0ce05247341e9b7da
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 13:18:11 +00:00
..
data Fix the fix to correctly handle comments in multi-line assignments 2019-05-20 13:18:11 +00:00
__init__.py
test_lc_fixup.py CMake: pro2cmake.py: Warn and fix broken line continuation 2019-02-28 08:06:41 +00:00
test_logic_mapping.py CMake: pro2cmake.py: Improve condition simplification code 2019-02-27 16:02:58 +00:00
test_operations.py CMake: Fix test_operations 2019-05-17 13:26:26 +00:00
test_parsing.py Fix the fix to correctly handle comments in multi-line assignments 2019-05-20 13:18:11 +00:00
test_scope_handling.py CMake: Fix test_scope_handling 2019-05-17 13:26:29 +00:00