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 grammar issues, add Comma production #1783

Merged
merged 1 commit into from
May 23, 2023
Merged

Conversation

mtdowling
Copy link
Member

Replaced "EnumShapeStatement" rule with "EnumStatement" because other shape statements don't include the word "Shape".

Renamed "NodeKeywords" to "NodeKeyword" since grammar rules aren't generally plural like this.

Added "Comma" production, which is now used in WS and can be optionally used after defining an enum member.

Members that support value assignment can now have a trailing comma.

Fixed WS loop handling for several productions.

Fixed OperationErrors to actually support a list of ShapeId, rather than just a list of Identifier. Identifier implies that you can only use errors in the local namespace which isn't the case.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Replaced "EnumShapeStatement" rule with "EnumStatement" because other
shape statements don't include the word "Shape".

Renamed "NodeKeywords" to "NodeKeyword" since grammar rules aren't
generally plural like this.

Added "Comma" production, which is now used in WS and can be optionally
used after defining an enum member.

Members that support value assignment can now have a trailing comma.

Fixed WS loop handling for several productions.

Fixed OperationErrors to actually support a list of ShapeId, rather
than just a list of Identifier. Identifier implies that you can only
use errors in the local namespace which isn't the case.
@mtdowling mtdowling requested a review from a team as a code owner May 22, 2023 20:05
@@ -148,7 +148,7 @@ string support defined in `RFC 5234 <https://www.rfc-editor.org/rfc/rfc7405>`_.
Minus :%x2D ; -
Plus :%x2B ; +
Zero :%x30 ; 0
NodeKeywords :%s"true" / %s"false" / %s"null"
NodeKeyword :%s"true" / %s"false" / %s"null"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, missing space to align the colon as the rest of the productions.

@mtdowling mtdowling merged commit 5636d15 into main May 23, 2023
milesziemer added a commit to milesziemer/smithy that referenced this pull request May 24, 2023
milesziemer added a commit that referenced this pull request May 24, 2023
@mtdowling mtdowling deleted the fix-grammar-issues branch June 2, 2023 19:55
syall pushed a commit to Xtansia/smithy that referenced this pull request Aug 11, 2023
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