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

Rename precedence to resolve confusion #54

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

Lai-YT
Copy link
Collaborator

@Lai-YT Lai-YT commented Nov 30, 2023

The precedence had the same name as the token, while the former one is used as a placeholder for the precedence. Therefore, it's better for them to use different names to avoid possible confusion.
The %prec IF_WITHOUT_ELSE simply instructs Bison that the rule IF '(' expr ')' stmt has the same precedence as IF_WITHOUT_ELSE.

Please let me know if you have any advice or suggestions on the naming! 😄

The precedence had the same name as the token, while the former one is
used as a placeholder for the precedence. Therefore, it's better for
them to use different names to avoid possible confusion.
The `%prec IF_WITHOUT_ELSE` simply instructs Bison that the rule `IF
'(' expr ')' stmt` has the same precedence as `IF_WITHOUT_ELSE`.
@Lai-YT Lai-YT requested a review from leewei05 November 30, 2023 16:55
@Lai-YT Lai-YT self-assigned this Nov 30, 2023
Copy link
Contributor

@leewei05 leewei05 left a comment

Choose a reason for hiding this comment

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

LGTM! 😄

@leewei05 leewei05 merged commit e8a611a into fruits-lab:main Nov 30, 2023
3 checks passed
@Lai-YT Lai-YT deleted the rename-precedence branch November 30, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants