mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
comment
-> spaces_middle
This commit is contained in:
parent
125990855f
commit
91fdd903e7
35 changed files with 56 additions and 56 deletions
|
@ -450,13 +450,13 @@ impl<'a> Formattable for ValueDef<'a> {
|
|||
AnnotatedBody {
|
||||
ann_pattern,
|
||||
ann_type,
|
||||
comment,
|
||||
spaces_middle,
|
||||
body_pattern,
|
||||
body_expr,
|
||||
} => {
|
||||
fmt_general_def(ann_pattern, buf, indent, ":", &ann_type.value, newlines);
|
||||
|
||||
fmt_annotated_body_comment(buf, indent, comment);
|
||||
fmt_annotated_body_comment(buf, indent, spaces_middle);
|
||||
|
||||
buf.newline();
|
||||
fmt_body(buf, &body_pattern.value, &body_expr.value, indent);
|
||||
|
@ -585,9 +585,9 @@ pub fn fmt_defs(buf: &mut Buf, defs: &Defs, indent: u16) {
|
|||
pub fn fmt_annotated_body_comment<'a>(
|
||||
buf: &mut Buf,
|
||||
indent: u16,
|
||||
comment: &'a [roc_parse::ast::CommentOrNewline<'a>],
|
||||
spaces_middle: &'a [roc_parse::ast::CommentOrNewline<'a>],
|
||||
) {
|
||||
let mut comment_iter = comment.iter();
|
||||
let mut comment_iter = spaces_middle.iter();
|
||||
if let Some(comment_first) = comment_iter.next() {
|
||||
match comment_first {
|
||||
roc_parse::ast::CommentOrNewline::Newline => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue