mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Format impls blocks
This commit is contained in:
parent
85599e3a9a
commit
3ada644544
2 changed files with 54 additions and 6 deletions
|
@ -4,7 +4,7 @@ use roc_module::called_via::{BinOp, UnaryOp};
|
|||
use roc_parse::{
|
||||
ast::{
|
||||
AbilityMember, AssignedField, Collection, CommentOrNewline, Defs, Expr, Has, HasAbilities,
|
||||
HasAbility, HasClause, Module, Pattern, Spaced, StrLiteral, StrSegment, Tag,
|
||||
HasAbility, HasClause, HasImpls, Module, Pattern, Spaced, StrLiteral, StrSegment, Tag,
|
||||
TypeAnnotation, TypeDef, TypeHeader, ValueDef, WhenBranch,
|
||||
},
|
||||
header::{
|
||||
|
@ -801,6 +801,17 @@ impl<'a> RemoveSpaces<'a> for Tag<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> RemoveSpaces<'a> for HasImpls<'a> {
|
||||
fn remove_spaces(&self, arena: &'a Bump) -> Self {
|
||||
match *self {
|
||||
HasImpls::HasImpls(impls) => HasImpls::HasImpls(impls.remove_spaces(arena)),
|
||||
HasImpls::SpaceBefore(has, _) | HasImpls::SpaceAfter(has, _) => {
|
||||
has.remove_spaces(arena)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> RemoveSpaces<'a> for HasAbility<'a> {
|
||||
fn remove_spaces(&self, arena: &'a Bump) -> Self {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue