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

Entire refactoring of BinOp/UnaryOp/Compare/BoolOp #92

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

odashi
Copy link
Collaborator

@odashi odashi commented Nov 12, 2022

Overview

This change contains:

  • Support all operators.
  • Consider operator precedences in UnaryOp/Compare/BoolOp as well as BinOp.
  • Some minor refactoring.

Details

This change introduces the operator precedences corresponding to all operator types, and removes extra parentheses appeared in several results. I believe this change introduces almost complete codegen for all operators.

The not operator is treated to have a higher precedence than the Python's syntax because the LaTeX counterpart ( $\lnot$ ) looks to have the same precedence with other unary operators.

References

NA

Blocked by

NA

Copy link
Collaborator

@ShigekiKarita ShigekiKarita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@odashi odashi merged commit 6a43f2b into main Nov 13, 2022
@odashi odashi deleted the refactoring-operators branch November 13, 2022 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants