From a7fa544c62e5b1be5dbf2bb62eaa7628228b2626 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 16 Feb 2026 12:29:25 -0800 Subject: [PATCH] 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. --- src/expressions/loop-expr.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/expressions/loop-expr.md b/src/expressions/loop-expr.md index 00e40ce1dd..8e67295482 100644 --- a/src/expressions/loop-expr.md +++ b/src/expressions/loop-expr.md @@ -49,7 +49,7 @@ A `loop` expression containing associated [`break` expression(s)](#break-express r[expr.loop.while] ## Predicate loops -r[expr.loop.while.grammar] +r[expr.loop.while.syntax] ```grammar,expressions PredicateLoopExpression -> `while` Conditions BlockExpression ``` @@ -57,9 +57,6 @@ PredicateLoopExpression -> `while` Conditions BlockExpression r[expr.loop.while.intro] A `while` loop expression allows repeating the evaluation of a block while a set of conditions remain true. -r[expr.loop.while.syntax] -The syntax of a `while` expression is a sequence of one or more condition operands separated by `&&`, followed by a [BlockExpression]. - r[expr.loop.while.condition] 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.