Skip to content

Add an all method to internal/enum for generating an iterator over all elements of the enum#417

Merged
mcy merged 4 commits intomainfrom
mcy/enum-all
Jan 21, 2025
Merged

Add an all method to internal/enum for generating an iterator over all elements of the enum#417
mcy merged 4 commits intomainfrom
mcy/enum-all

Conversation

@mcy
Copy link
Member

@mcy mcy commented Jan 8, 2025

This PR also refactors the codegen to move all of the tables after all of the functions, rather than interleaving them.

It also adds a predefined.All() function, which uses this feature.

@mcy mcy requested a review from jhump January 8, 2025 14:53
Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

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

Just one remark that I think must be addressed before merging. Otherwise LGTM.

@mcy mcy enabled auto-merge (squash) January 21, 2025 18:36
@mcy mcy merged commit dad65b0 into main Jan 21, 2025
8 checks passed
@mcy mcy deleted the mcy/enum-all branch January 21, 2025 18:40
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