Skip to content

Commit 3512dc8

Browse files
committed
Separate _ExpressionStatement_.
1 parent 49f5c9a commit 3512dc8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/statements.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
>       `;`\
66
>    | [_Item_]\
77
>    | [_LetStatement_]\
8-
>    | [_ExpressionWithoutBlock_][expression] `;`\
9-
>    | [_ExpressionWithBlock_][expression]
8+
>    | [_ExpressionStatement_]
109
1110

1211
A *statement* is a component of a [block], which is in turn a component of an
@@ -66,6 +65,11 @@ enclosing block scope.
6665

6766
## Expression statements
6867

68+
> **<sup>Syntax</sup>**\
69+
> _ExpressionStatement_ :\
70+
> &nbsp;&nbsp; &nbsp;&nbsp; [_ExpressionWithoutBlock_][expression] `;`\
71+
> &nbsp;&nbsp; | [_ExpressionWithBlock_][expression]
72+
6973
An *expression statement* is one that evaluates an [expression] and ignores its
7074
result. As a rule, an expression statement's purpose is to trigger the effects
7175
of evaluating its expression.
@@ -122,6 +126,7 @@ statement are [`cfg`], and [the lint check attributes].
122126
[`cfg`]: conditional-compilation.html
123127
[the lint check attributes]: attributes.html#lint-check-attributes
124128
[pattern]: patterns.html
129+
[_ExpressionStatement_]: #expression-statements
125130
[_Expression_]: expressions.html
126131
[_Item_]: items.html
127132
[_LetStatement_]: #let-statements

0 commit comments

Comments
 (0)