Skip to content

Conversation

Hackerpilot
Copy link
Contributor

https://issues.dlang.org/show_bug.cgi?id=10285

This cleans up the enum declaration grammar and makes it more closely match DMD's implementation. Some rules that consisted of a single token were removed, and a new AnonymousEnumDeclaration rule was added to ensure that the "type identifer = assignExpression" syntax cannot appear in non-anonymous or typed enums.

@dnadlinger
Copy link
Contributor

Seems reasonable but @9rnsr should probably have a look at it too.


$(GNAME EnumBaseType):
$(GLINK2 declaration, Type)
$(GLINK Type)
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will disconnect the link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@9rnsr
Copy link
Contributor

9rnsr commented Jan 17, 2015

Additional advice: If you hope to create a detailed Pull Request, you can change the grammar step by step by using multiple commits. For example:

1st commit: Remove EnumTag rule.
2nd commit: Remove EmptyEnumBody rule
3rd commit: Remove EnumMembersBody body to separate cases for named/anonymous enum
4th commit: Add AnonymousXXX rules for issue 10285

The stepped commit log would be much easier to review the correctness of the PR.

@9rnsr
Copy link
Contributor

9rnsr commented Jan 18, 2015

LGTM.

9rnsr added a commit that referenced this pull request Jan 18, 2015
Issue 10285 - Enum grammar documentation is incorrect
@9rnsr 9rnsr merged commit d054391 into dlang:master Jan 18, 2015
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.

3 participants