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

Add support for operation precedance in expression #270

Open
taalexander opened this issue Feb 23, 2024 · 0 comments
Open

Add support for operation precedance in expression #270

taalexander opened this issue Feb 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@taalexander
Copy link
Collaborator

#263 adds support for binary/unary expressions on integers and floats to the compiler. However, currently these are evaluated with left-right infix ordering. This means that if parentheses aren't added expressions like a * b ** c will be evaluated as (a * b) ** c) which disobeys standard arithmetic operation precedence. The qe-qasm parser has a ASTOperatorPrecdeanceController that can be used to build the correct expressions.

@taalexander taalexander added the bug Something isn't working label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant