From f062389ccc49ca239be428dd2824a1a9222a9958 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Tue, 27 Oct 2026 12:39:34 +0100 Subject: [PATCH] docs: allow concise bodies after multiline guards --- docs/style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/style.md b/docs/style.md index 1e8c486..4353097 100644 --- a/docs/style.md +++ b/docs/style.md @@ -21,7 +21,7 @@ these guidelines apply to Honey programs, the compiler, and the standard library - use single-line bodies for simple operations. use braces for multiple statements or nested control flow. - break long parameter lists and aggregate initializers across lines, with a trailing comma on the last item. - when breaking boolean or arithmetic expressions across lines, put continuation operators at the start of each continued line. inner groups may keep opening parentheses beside their first operand and combine closing parentheses to avoid staircase indentation. -- wrap multiline `if` and `while` guards in parentheses. put the outer guard's operands on following lines, indented one level, and its closing `)` on its own line, followed by any opening body brace. +- wrap multiline `if` and `while` guards in parentheses. put the outer guard's operands on following lines, indented one level, and its closing `)` on a separate line. a simple single-statement body may follow `)` on that same line without braces; otherwise put the opening body brace there. ```hon debug.assert(