mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Further relax indentation of implements ability chains
This commit is contained in:
parent
7a1b3b8257
commit
0471993428
7 changed files with 165 additions and 22 deletions
|
@ -2024,6 +2024,26 @@ pub trait Spaceable<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn maybe_around_loc(
|
||||
mut me: Loc<Self>,
|
||||
arena: &'a Bump,
|
||||
before: &'a [CommentOrNewline<'a>],
|
||||
after: &'a [CommentOrNewline<'a>],
|
||||
) -> Loc<Self>
|
||||
where
|
||||
Self: Sized + 'a,
|
||||
{
|
||||
if !after.is_empty() {
|
||||
me.value = arena.alloc(me.value).after(after);
|
||||
}
|
||||
|
||||
if !before.is_empty() {
|
||||
me.value = arena.alloc(me.value).before(before);
|
||||
}
|
||||
|
||||
me
|
||||
}
|
||||
|
||||
fn with_spaces_before(&'a self, spaces: &'a [CommentOrNewline<'a>], region: Region) -> Loc<Self>
|
||||
where
|
||||
Self: Sized,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue