File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3496,6 +3496,18 @@ of a condition expression it expects a refutable let statement. If the value of
3496
3496
expression on the right hand side of the let statement matches the pattern, the corresponding
3497
3497
block will execute, otherwise flow proceeds to the first ` else ` block that follows.
3498
3498
3499
+ ### While let loops
3500
+
3501
+ ``` {.ebnf .gram}
3502
+ while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
3503
+ ```
3504
+
3505
+ A ` while let ` loop is semantically identical to a ` while ` loop but in place of a
3506
+ condition expression it expects a refutable let statement. If the value of the
3507
+ expression on the right hand side of the let statement matches the pattern, the
3508
+ loop body block executes and control returns to the pattern matching statement.
3509
+ Otherwise, the while expression completes.
3510
+
3499
3511
### Return expressions
3500
3512
3501
3513
``` {.ebnf .gram}
You can’t perform that action at this time.
0 commit comments