Skip to content

Commit

Permalink
Fixed slight syntax inconsistancies
Browse files Browse the repository at this point in the history
  • Loading branch information
AloeareV committed Jun 14, 2021
1 parent bd28587 commit 16c5a24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/expressions/if-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ assert_eq!(y, "Bigger");

> **<sup>Syntax</sup>**\
> _IfLetExpression_ :\
> &nbsp;&nbsp; `if` `let` [_Pattern_] `=` Scrutinee
> &nbsp;&nbsp; `if` `let` [_Pattern_] `=` _Scrutinee_
> [_BlockExpression_]\
> &nbsp;&nbsp; (`else` (
> [_BlockExpression_]
> | _IfExpression_
> | _IfLetExpression_ ) )<sup>\?</sup>
>
> _Scrutinee_:
> _Scrutinee_:\
> &nbsp;&nbsp; [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>
An `if let` expression is semantically similar to an `if` expression but in place of a condition operand it expects the keyword `let` followed by a pattern, an `=` and a [scrutinee] operand.
Expand Down
4 changes: 2 additions & 2 deletions src/expressions/loop-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ while i < 10 {

> **<sup>Syntax</sup>**\
> [_PredicatePatternLoopExpression_] :\
> &nbsp;&nbsp; `while` `let` [_Pattern_] `=` Scrutinee
> &nbsp;&nbsp; `while` `let` [_Pattern_] `=` _Scrutinee_
> [_BlockExpression_]
>
> _Scrutinee_:
> _Scrutinee_:\
> &nbsp;&nbsp; [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>

Expand Down
2 changes: 1 addition & 1 deletion src/expressions/match-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> **<sup>Syntax</sup>**\
> _MatchExpression_ :\
> &nbsp;&nbsp; `match` Scrutinee `{`\
> &nbsp;&nbsp; `match` _Scrutinee_ `{`\
> &nbsp;&nbsp; &nbsp;&nbsp; [_InnerAttribute_]<sup>\*</sup>\
> &nbsp;&nbsp; &nbsp;&nbsp; _MatchArms_<sup>?</sup>\
> &nbsp;&nbsp; `}`
Expand Down

0 comments on commit 16c5a24

Please sign in to comment.