Skip to content

Commit a7fa544

Browse files
committed
Fix rule name for while syntax
The grammar rule names should be called `.syntax`. This also removes the existing `expr.loop.while.syntax` rule since it would otherwise be a duplicate rule name. Repeating the syntax in English doesn't really add much here, and we have been leaning towards not having these kinds of rules.
1 parent 575dffa commit a7fa544

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/expressions/loop-expr.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,14 @@ A `loop` expression containing associated [`break` expression(s)](#break-express
4949
r[expr.loop.while]
5050
## Predicate loops
5151

52-
r[expr.loop.while.grammar]
52+
r[expr.loop.while.syntax]
5353
```grammar,expressions
5454
PredicateLoopExpression -> `while` Conditions BlockExpression
5555
```
5656

5757
r[expr.loop.while.intro]
5858
A `while` loop expression allows repeating the evaluation of a block while a set of conditions remain true.
5959

60-
r[expr.loop.while.syntax]
61-
The syntax of a `while` expression is a sequence of one or more condition operands separated by `&&`, followed by a [BlockExpression].
62-
6360
r[expr.loop.while.condition]
6461
Condition operands must be either an [Expression] with a [boolean type] or a conditional `let` match. If all of the condition operands evaluate to `true` and all of the `let` patterns successfully match their [scrutinee]s, then the loop body block executes.
6562

0 commit comments

Comments
 (0)