mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Unify if/when condition formatting
This commit is contained in:
parent
cfec120b13
commit
4a0dce714b
5 changed files with 69 additions and 78 deletions
|
@ -0,0 +1,5 @@
|
|||
when
|
||||
n
|
||||
# s
|
||||
is
|
||||
O -> 1
|
|
@ -0,0 +1,27 @@
|
|||
When(
|
||||
@5-6 SpaceAfter(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
LineComment(
|
||||
"s",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@13-14 Tag(
|
||||
"O",
|
||||
),
|
||||
],
|
||||
value: @16-17 Num(
|
||||
"1",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
when n
|
||||
#s
|
||||
is O->1
|
|
@ -657,6 +657,7 @@ mod test_snapshots {
|
|||
pass/when_in_function_python_style_indent.expr,
|
||||
pass/when_in_parens.expr,
|
||||
pass/when_in_parens_indented.expr,
|
||||
pass/when_newline_after_condition.expr,
|
||||
pass/when_result_list.expr,
|
||||
pass/when_with_alternative_patterns.expr,
|
||||
pass/when_with_function_application.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue