parent
b5db97b354
commit
0d6dafa51f
@ -3511,6 +3511,18 @@ of a condition expression it expects a refutable let statement. If the value of
|
||||
expression on the right hand side of the let statement matches the pattern, the corresponding
|
||||
block will execute, otherwise flow proceeds to the first `else` block that follows.
|
||||
|
||||
### While let loops
|
||||
|
||||
```{.ebnf .gram}
|
||||
while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
|
||||
```
|
||||
|
||||
A `while let` loop is semantically identical to a `while` loop but in place of a
|
||||
condition expression it expects a refutable let statement. If the value of the
|
||||
expression on the right hand side of the let statement matches the pattern, the
|
||||
loop body block executes and control returns to the pattern matching statement.
|
||||
Otherwise, the while expression completes.
|
||||
|
||||
### Return expressions
|
||||
|
||||
```{.ebnf .gram}
|
||||
|
Loading…
x
Reference in New Issue
Block a user