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

Better enum handling #28

Open
grigorescu opened this issue May 18, 2022 · 1 comment
Open

Better enum handling #28

grigorescu opened this issue May 18, 2022 · 1 comment
Labels
good first issue Good for newcomers style tweak A suggestion to style things differently

Comments

@grigorescu
Copy link

-type my_other_enum: enum {
-       ZERO = 0,
-       ONE = 1 &deprecated="one warning",
-       TWO = 2 &deprecated="two warning",
-};
+type my_other_enum: enum { ZERO = 0, ONE = 1 &deprecated ="one warning" , TWO = 2 &deprecated ="two warning" , };
@ckreibich
Copy link
Member

Oh yeah, good one. This works nicely on top of the recent updates to enum handling in 6e60890: this class needs logic to also register the presence of attributes as a reason to linebreak the whole sequence. If we change it at the ComplexSequenceFormatterMixin level, it'll affect other sequences too (e.g. expression lists); if we do it one inheritance level down at ComplexBlockFormatterMixin it's specific to { ... } blocks.

@ckreibich ckreibich added good first issue Good for newcomers style tweak A suggestion to style things differently labels May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers style tweak A suggestion to style things differently
Projects
None yet
Development

No branches or pull requests

2 participants