Skip to content

Commit 287f3d0

Browse files
ramseynikic
authored andcommitted
Indicate space is allowed between "endswitch" and ";"
1 parent a1e3e4f commit 287f3d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/11-statements.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ else // this else does go with the outer if
314314
<!-- GRAMMAR
315315
switch-statement:
316316
'switch' '(' expression ')' '{' case-statements? '}'
317-
'switch' '(' expression ')' ':' case-statements? 'endswitch;'
317+
'switch' '(' expression ')' ':' case-statements? 'endswitch' ';'
318318
319319
case-statements:
320320
case-statement case-statements?
@@ -334,7 +334,7 @@ case-default-label-terminator:
334334
<pre>
335335
<i id="grammar-switch-statement">switch-statement:</i>
336336
switch ( <i><a href="10-expressions.md#grammar-expression">expression</a></i> ) { <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> }
337-
switch ( <i><a href="10-expressions.md#grammar-expression">expression</a></i> ) : <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> endswitch;
337+
switch ( <i><a href="10-expressions.md#grammar-expression">expression</a></i> ) : <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> endswitch ;
338338

339339
<i id="grammar-case-statements">case-statements:</i>
340340
<i><a href="#grammar-case-statement">case-statement</a></i> <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub>

spec/19-grammar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ The grammar notation is described in [Grammars section](09-lexical-structure.md#
783783

784784
<i id="grammar-switch-statement">switch-statement:</i>
785785
switch ( <i><a href="#grammar-expression">expression</a></i> ) { <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> }
786-
switch ( <i><a href="#grammar-expression">expression</a></i> ) : <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> endswitch;
786+
switch ( <i><a href="#grammar-expression">expression</a></i> ) : <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub> endswitch ;
787787

788788
<i id="grammar-case-statements">case-statements:</i>
789789
<i><a href="#grammar-case-statement">case-statement</a></i> <i><a href="#grammar-case-statements">case-statements</a></i><sub>opt</sub>

0 commit comments

Comments
 (0)