Skip to content

Commit

Permalink
Add EnumShapeMember, move TraitStatements grammar (#1792)
Browse files Browse the repository at this point in the history
Adds an EnumShapeMember production to the grammar for consistency
with ShapeMember, and moves TraitStatements from EnumShapeMembers
and ShapeMembers into EnumShapeMember and ShapeMember respectively.
  • Loading branch information
milesziemer authored May 25, 2023
1 parent 4784858 commit f2a93bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/source-2.0/spec/idl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,14 @@ string support defined in :rfc:`7405`.
Mixins :[`SP`] %s"with" [`WS`] "[" [`WS`] 1*(`ShapeId` [`WS`]) "]"
EnumShape :`EnumTypeName` `SP` `Identifier` [`Mixins`] [`WS`] `EnumShapeMembers`
EnumTypeName :%s"enum" / %s"intEnum"
EnumShapeMembers :"{" [`WS`] 1*(`TraitStatements` `Identifier` [`ValueAssignment`] [`WS`]) "}"
EnumShapeMembers :"{" [`WS`] 1*(`EnumShapeMember` [`WS`]) "}"
EnumShapeMember :`TraitStatements` `Identifier` [`ValueAssignment`]
ValueAssignment :[`SP`] "=" [`SP`] `NodeValue` [`SP`] [`Comma`] `BR`
AggregateShape :`AggregateTypeName` `SP` `Identifier` [`ForResource`] [`Mixins`] [`WS`] `ShapeMembers`
AggregateTypeName :%s"list" / %s"map" / %s"union" / %s"structure"
ForResource :`SP` %s"for" `SP` `ShapeId`
ShapeMembers :"{" [`WS`] *(`TraitStatements` `ShapeMember` [`WS`]) "}"
ShapeMember :(`ExplicitShapeMember` / `ElidedShapeMember`) [`ValueAssignment`]
ShapeMembers :"{" [`WS`] *(`ShapeMember` [`WS`]) "}"
ShapeMember :`TraitStatements` (`ExplicitShapeMember` / `ElidedShapeMember`) [`ValueAssignment`]
ExplicitShapeMember :`Identifier` [`SP`] ":" [`SP`] `ShapeId`
ElidedShapeMember :"$" `Identifier`
EntityShape :`EntityTypeName` `SP` `Identifier` [`Mixins`] [`WS`] `NodeObject`
Expand Down

0 comments on commit f2a93bc

Please sign in to comment.