mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Fix as indentation
This commit is contained in:
parent
7b9aa59d64
commit
f7baa878f2
6 changed files with 72 additions and 4 deletions
|
@ -365,18 +365,24 @@ fn fmt_ty_ann(
|
|||
buf.push('(')
|
||||
}
|
||||
|
||||
buf.indent(indent);
|
||||
let lhs_indent = buf.cur_line_indent();
|
||||
lhs.value
|
||||
.format_with_options(buf, Parens::InAsPattern, Newlines::No, indent);
|
||||
buf.spaces(1);
|
||||
format_spaces(buf, spaces, newlines, indent);
|
||||
buf.indent(indent);
|
||||
buf.indent(lhs_indent + INDENT);
|
||||
buf.push_str("as");
|
||||
buf.spaces(1);
|
||||
buf.push_str(name.value);
|
||||
for var in *vars {
|
||||
buf.spaces(1);
|
||||
var.value
|
||||
.format_with_options(buf, Parens::NotNeeded, Newlines::No, indent);
|
||||
var.value.format_with_options(
|
||||
buf,
|
||||
Parens::NotNeeded,
|
||||
Newlines::No,
|
||||
lhs_indent + INDENT,
|
||||
);
|
||||
}
|
||||
|
||||
if write_parens {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue