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

Support switch-case with fall throughs #68

Merged
merged 7 commits into from
Jan 23, 2024

Conversation

czgdp1807
Copy link
Collaborator

Closes #46

@czgdp1807 czgdp1807 marked this pull request as ready for review January 22, 2024 22:18
Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

This is great. In subsequent PR can you please add a verify check to ensure that if enable_fall_through=false, then all fall_through=false? I think that's the only requirement at the ASR level.

@czgdp1807 czgdp1807 enabled auto-merge January 23, 2024 11:31
@czgdp1807 czgdp1807 merged commit ded59c9 into lcompilers:main Jan 23, 2024
2 checks passed
@czgdp1807 czgdp1807 deleted the switch_case_01 branch January 23, 2024 11:42
}
require(fall_through == x.m_enable_fall_through,
"Select_t::m_enable_fall_through should be " +
std::to_string(x.m_enable_fall_through));
Copy link
Contributor

@certik certik Jan 23, 2024

Choose a reason for hiding this comment

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

That's an even stronger requirement, which is fine. It's always good to start strong, and relax later if needed, than the other way round.

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.

Implementing switch-case in LC
2 participants