Closed
Description
Example 1:
b = 6 if a == 2 else 8
Error:
$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token 'if' is unexpected here
--> examples/expr2.py:1:7
|
1 | b = 6 if a == 2 else 8
| ^^
Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that needs to be fixed).
Example 2:
i = [x.strip() for x in args.bench_compare.split(',')]
Error:
$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token 'for' is unexpected here
--> examples/expr2.py:1:16
|
1 | i = [x.strip() for x in args.bench_compare.split(',')]
| ^^^
Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that needs to be fixed).