-
Notifications
You must be signed in to change notification settings - Fork 171
Closed
Labels
ParserIssues or improvements related to parserIssues or improvements related to parser
Description
Example 1:
print(f"{__file__} executed in {elapsed:0.2f} seconds.")
Error:
$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token '"{__file__} executed in {elapsed:0.2f} seconds."' (of type 'string') is unexpected here
--> examples/expr2.py:1:8
|
1 | print(f"{__file__} executed in {elapsed:0.2f} seconds.")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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:
b"I made it!"
Error:
$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token '"I made it!"' (of type 'string') is unexpected here
--> examples/expr2.py:1:2
|
1 | b"I made it!"
| ^^^^^^^^^^^^
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 3:
r"""
Text
"""
Error:
$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token '"""
Text
"""' (of type 'string') is unexpected here
--> examples/expr2.py:1:2 - 3:3
|
1 | r"""
| ^^^...
...
|
3 | """
| ...^^^
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).
Metadata
Metadata
Assignees
Labels
ParserIssues or improvements related to parserIssues or improvements related to parser