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 a couple of formatter issues #7605

Merged
merged 2 commits into from
Mar 30, 2019

Conversation

asterite
Copy link
Member

Fixes #7599
Fixes #7600

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter labels Mar 30, 2019
@@ -2058,9 +2061,16 @@ module Crystal

# This is the case of an enum member
if node.name[0].ascii_uppercase? && @token.type == :","
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

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)

@bcardiff
Copy link
Member

Dropping the comma from the formatter and from the parser can be done in another PR

@asterite asterite added this to the 0.28.0 milestone Mar 30, 2019
@asterite asterite merged commit 779e744 into crystal-lang:master Mar 30, 2019
@asterite asterite deleted the bug/formatter-stuff branch March 30, 2019 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants