mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
ast::ImplementsAbilities::Has ->
ast::ImplementsAbilities::Implements
This commit is contained in:
parent
4b90948fcf
commit
10d92bf0f3
4 changed files with 10 additions and 8 deletions
|
@ -570,7 +570,7 @@ pub enum ImplementsAbility<'a> {
|
|||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub enum ImplementsAbilities<'a> {
|
||||
/// `has [Eq { eq: myEq }, Hash]`
|
||||
Has(Collection<'a, Loc<ImplementsAbility<'a>>>),
|
||||
Implements(Collection<'a, Loc<ImplementsAbility<'a>>>),
|
||||
|
||||
// We preserve this for the formatter; canonicalization ignores it.
|
||||
SpaceBefore(&'a ImplementsAbilities<'a>, &'a [CommentOrNewline<'a>]),
|
||||
|
@ -585,7 +585,7 @@ impl ImplementsAbilities<'_> {
|
|||
Self::SpaceBefore(inner, _) | Self::SpaceAfter(inner, _) => {
|
||||
it = inner;
|
||||
}
|
||||
Self::Has(collection) => return collection,
|
||||
Self::Implements(collection) => return collection,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1723,7 +1723,7 @@ impl<'a> Malformed for ImplementsAbility<'a> {
|
|||
impl<'a> Malformed for ImplementsAbilities<'a> {
|
||||
fn is_malformed(&self) -> bool {
|
||||
match self {
|
||||
ImplementsAbilities::Has(abilities) => {
|
||||
ImplementsAbilities::Implements(abilities) => {
|
||||
abilities.iter().any(|ability| ability.is_malformed())
|
||||
}
|
||||
ImplementsAbilities::SpaceBefore(has, _) | ImplementsAbilities::SpaceAfter(has, _) => {
|
||||
|
|
|
@ -547,7 +547,7 @@ pub fn implements_abilities<'a>() -> impl Parser<'a, Loc<ImplementsAbilities<'a>
|
|||
word1(b']', EType::TEnd),
|
||||
ImplementsAbility::SpaceBefore
|
||||
),
|
||||
ImplementsAbilities::Has
|
||||
ImplementsAbilities::Implements
|
||||
)),
|
||||
EType::TIndentEnd,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue