diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-15 20:32:17 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-15 20:33:02 -0400 |
| commit | 45d640d3f3c8c7970aa3101af6cd12f1fe857cd0 (patch) | |
| tree | 88e498bc2d92a3b434498f5c69d3eef090394671 /src | |
| parent | 34e3bad043b1a98534863d66233f2e7411c51a6a (diff) | |
Fix issue formatting when statements with allman style braces
Diffstat (limited to 'src')
| -rw-r--r-- | src/odin/printer/visit.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index 0f3f691..55835f1 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -1247,7 +1247,9 @@ visit_stmt :: proc( case ^When_Stmt: document = cons(document, cons_with_nopl(text("when"), visit_expr(p, v.cond))) + set_source_position(p, v.body.pos) document = cons_with_nopl(document, visit_stmt(p, v.body)) + set_source_position(p, v.body.end) if v.else_stmt != nil { if p.config.brace_style == .Allman { |