mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-22 19:42:31 +00:00
ast::Has -> ast::Implements
This commit is contained in:
parent
d2fed03cb1
commit
64c34a5c6d
4 changed files with 31 additions and 26 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::ast::{Has, Pattern, PatternAs, Spaceable};
|
||||
use crate::ast::{Implements, Pattern, PatternAs, Spaceable};
|
||||
use crate::blankspace::{space0_e, spaces, spaces_before};
|
||||
use crate::ident::{lowercase_ident, parse_ident, Accessor, Ident};
|
||||
use crate::keyword;
|
||||
|
@ -154,12 +154,16 @@ fn loc_tag_pattern_arg<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn loc_has_parser<'a>() -> impl Parser<'a, Loc<Has<'a>>, EPattern<'a>> {
|
||||
pub fn loc_has_parser<'a>() -> impl Parser<'a, Loc<Implements<'a>>, EPattern<'a>> {
|
||||
then(
|
||||
loc_tag_pattern_arg(false),
|
||||
|_arena, state, progress, pattern| {
|
||||
if matches!(pattern.value, Pattern::Identifier("has")) {
|
||||
Ok((progress, Loc::at(pattern.region, Has::Has), state))
|
||||
Ok((
|
||||
progress,
|
||||
Loc::at(pattern.region, Implements::Implements),
|
||||
state,
|
||||
))
|
||||
} else {
|
||||
Err((progress, EPattern::End(state.pos())))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue