Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] Parse Tuple in the Expression #507

Closed
Thirumalai-Shaktivel opened this issue May 18, 2022 · 1 comment · Fixed by #834
Closed

[New] Parse Tuple in the Expression #507

Thirumalai-Shaktivel opened this issue May 18, 2022 · 1 comment · Fixed by #834
Labels
Parser Issues or improvements related to parser

Comments

@Thirumalai-Shaktivel
Copy link
Collaborator

Thirumalai-Shaktivel commented May 18, 2022

Example:

print("%s%s%s" % (10 + x, y, z + 20))

Error:

$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token ',' is unexpected here
 --> examples/expr2.py:2:25
  |
2 | print("%s%s%s" % (10 + x, y, z + 20))
  |                         ^ 


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).
@Thirumalai-Shaktivel Thirumalai-Shaktivel added the Parser Issues or improvements related to parser label May 18, 2022
@Thirumalai-Shaktivel
Copy link
Collaborator Author

Thirumalai-Shaktivel commented Jul 19, 2022

Other examples:

if sys.version_info >= (3, 9):
    pass

NDArray = _GenericAlias(np.ndarray, (Any, _DType))

@pytest.mark.parametrize("shape", [(5), (3, 3, 3)])
def test():
    pass

_promotion_table = { (int8, int8): int8 }

@Thirumalai-Shaktivel Thirumalai-Shaktivel changed the title [New] Parse Tuple List in the Expression [New] Parse Tuple in the Expression Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Parser Issues or improvements related to parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant