Skip to content

Commit 936751b

Browse files
milesziemerSteven Yuan
authored and
Steven Yuan
committed
Fix grammar rendering (smithy-lang#1815)
Fixes issue with recent grammar changes where when rendered, productions would extend past the margin.
1 parent 9c9d949 commit 936751b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/source-2.0/spec/idl.rst

+14-6
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ string support defined in :rfc:`7405`.
108108
.. rubric:: Comments
109109

110110
.. productionlist:: smithy
111-
Comment : `DocumentationComment` / `LineComment`
111+
Comment :`DocumentationComment` / `LineComment`
112112
DocumentationComment :"///" *`NotNL` `NL`
113-
LineComment : "//" [(%x09 / %x20-2E / %x30-10FFF) *`NotNL`] `NL` ; First character after "//" can't be "/"
113+
LineComment :"//" [(%x09 / %x20-2E / %x30-10FFF) *`NotNL`] `NL`
114+
: ; First character after "//" can't be "/"
114115
115116
.. rubric:: Control
116117

@@ -175,7 +176,11 @@ string support defined in :rfc:`7405`.
175176
ShapeStatements :`ShapeOrApplyStatement` *(`BR` `ShapeOrApplyStatement`)
176177
ShapeOrApplyStatement :`ShapeStatement` / `ApplyStatement`
177178
ShapeStatement :`TraitStatements` `Shape`
178-
Shape :`SimpleShape` / `EnumShape` / `AggregateShape` / `EntityShape` / `OperationShape`
179+
Shape :`SimpleShape`
180+
:/ `EnumShape`
181+
:/ `AggregateShape`
182+
:/ `EntityShape`
183+
:/ `OperationShape`
179184
SimpleShape :`SimpleTypeName` `SP` `Identifier` [`Mixins`]
180185
SimpleTypeName :%s"blob" / %s"boolean" / %s"document" / %s"string"
181186
:/ %s"byte" / %s"short" / %s"integer" / %s"long"
@@ -187,11 +192,13 @@ string support defined in :rfc:`7405`.
187192
EnumShapeMembers :"{" [`WS`] 1*(`EnumShapeMember` [`WS`]) "}"
188193
EnumShapeMember :`TraitStatements` `Identifier` [`ValueAssignment`]
189194
ValueAssignment :[`SP`] "=" [`SP`] `NodeValue` [`SP`] [`Comma`] `BR`
190-
AggregateShape :`AggregateTypeName` `SP` `Identifier` [`ForResource`] [`Mixins`] [`WS`] `ShapeMembers`
195+
AggregateShape :`AggregateTypeName` `SP` `Identifier` [`ForResource`] [`Mixins`]
196+
: [`WS`] `ShapeMembers`
191197
AggregateTypeName :%s"list" / %s"map" / %s"union" / %s"structure"
192198
ForResource :`SP` %s"for" `SP` `ShapeId`
193199
ShapeMembers :"{" [`WS`] *(`ShapeMember` [`WS`]) "}"
194-
ShapeMember :`TraitStatements` (`ExplicitShapeMember` / `ElidedShapeMember`) [`ValueAssignment`]
200+
ShapeMember :`TraitStatements` (`ExplicitShapeMember` / `ElidedShapeMember`)
201+
: [`ValueAssignment`]
195202
ExplicitShapeMember :`Identifier` [`SP`] ":" [`SP`] `ShapeId`
196203
ElidedShapeMember :"$" `Identifier`
197204
EntityShape :`EntityTypeName` `SP` `Identifier` [`Mixins`] [`WS`] `NodeObject`
@@ -202,7 +209,8 @@ string support defined in :rfc:`7405`.
202209
OperationInput :%s"input" [`WS`] (`InlineAggregateShape` / (":" [`WS`] `ShapeId`))
203210
OperationOutput :%s"output" [`WS`] (`InlineAggregateShape` / (":" [`WS`] `ShapeId`))
204211
OperationErrors :%s"errors" [`WS`] ":" [`WS`] "[" [`WS`] *(`ShapeId` [`WS`]) "]"
205-
InlineAggregateShape :":=" [`WS`] `TraitStatements` [`ForResource`] [`Mixins`] [`WS`] `ShapeMembers`
212+
InlineAggregateShape :":=" [`WS`] `TraitStatements` [`ForResource`] [`Mixins`]
213+
: [`WS`] `ShapeMembers`
206214
207215
.. rubric:: Traits
208216

0 commit comments

Comments
 (0)