-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 a couple of formatter issues #7605
Conversation
@@ -2058,9 +2061,16 @@ module Crystal | |||
|
|||
# This is the case of an enum member | |||
if node.name[0].ascii_uppercase? && @token.type == :"," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any advantage of supporting both the comma and space as member delimiters in enums?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That space is supported is a bug. Only comma or newline should be supported. Please open a bug for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluding the comma, why supporting both the comma and new line (and therefore the semicolon)?
enum E
A; B; C
D, E, F
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the comma from C#. I wouldn't mind dropping it, but it's a breaking change (I don't mind either)
Dropping the comma from the formatter and from the parser can be done in another PR |
Fixes #7599
Fixes #7600