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 @@ -3511,6 +3511,18 @@ of a condition expression it expects a refutable let statement. If the value of
35113511expression on the right hand side of the let statement matches the pattern, the corresponding
35123512block will execute, otherwise flow proceeds to the first ` else ` block that follows.
35133513
3514+ ### While let loops
3515+
3516+ ``` {.ebnf .gram}
3517+ while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
3518+ ```
3519+
3520+ A ` while let ` loop is semantically identical to a ` while ` loop but in place of a
3521+ condition expression it expects a refutable let statement. If the value of the
3522+ expression on the right hand side of the let statement matches the pattern, the
3523+ loop body block executes and control returns to the pattern matching statement.
3524+ Otherwise, the while expression completes.
3525+
35143526### Return expressions
35153527
35163528``` {.ebnf .gram}
You can’t perform that action at this time.
0 commit comments