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

Fix irregular switch labels so ordering is consecutive #183

Open
zbanks opened this issue Nov 30, 2021 · 2 comments
Open

Fix irregular switch labels so ordering is consecutive #183

zbanks opened this issue Nov 30, 2021 · 2 comments

Comments

@zbanks
Copy link
Collaborator

zbanks commented Nov 30, 2021

Would be nice to clean this up so ordering is consecutive, but it seems like low priority.

Originally posted by @simonlindholm in #180 (comment)

Also fix the issue where one switch may have index 0 (and therefore no comment) even if other switches are detected later.

@NWPlayer123
Copy link

If this is implemented, it should be a toggle. The ordering of switch cases will change codegen, the "correct" ordering is going by what's in the body of the switch and then outputting which cases reach that part of the body.

@simonlindholm
Copy link
Collaborator

This issue isn't about reordering switch cases (that would be very dangerous indeed, and we haven't found a compiler for which we need to do that), but rather about the indexing of // switch N comments, so that it goes N = 0, 1, ... and doesn't skip numbers.

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

No branches or pull requests

3 participants