Skip to content

Commit

Permalink
Separate _ExpressionStatement_.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Oct 20, 2018
1 parent 49f5c9a commit 3512dc8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
>       `;`\
>    | [_Item_]\
>    | [_LetStatement_]\
>    | [_ExpressionWithoutBlock_][expression] `;`\
>    | [_ExpressionWithBlock_][expression]
>    | [_ExpressionStatement_]

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

## Expression statements

> **<sup>Syntax</sup>**\
> _ExpressionStatement_ :\
> &nbsp;&nbsp; &nbsp;&nbsp; [_ExpressionWithoutBlock_][expression] `;`\
> &nbsp;&nbsp; | [_ExpressionWithBlock_][expression]
An *expression statement* is one that evaluates an [expression] and ignores its
result. As a rule, an expression statement's purpose is to trigger the effects
of evaluating its expression.
Expand Down Expand Up @@ -122,6 +126,7 @@ statement are [`cfg`], and [the lint check attributes].
[`cfg`]: conditional-compilation.html
[the lint check attributes]: attributes.html#lint-check-attributes
[pattern]: patterns.html
[_ExpressionStatement_]: #expression-statements
[_Expression_]: expressions.html
[_Item_]: items.html
[_LetStatement_]: #let-statements
Expand Down

0 comments on commit 3512dc8

Please sign in to comment.