mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-25 04:52:32 +00:00
Define and use IMPLEMENTS const in roc_parse::keyword
This commit is contained in:
parent
9640fcb6d4
commit
e514d0cb83
12 changed files with 37 additions and 26 deletions
|
@ -138,7 +138,7 @@ fn loc_tag_pattern_arg<'a>(
|
|||
|
||||
let Loc { region, value } = loc_pat;
|
||||
|
||||
if stop_on_has_kw && matches!(value, Pattern::Identifier("implements")) {
|
||||
if stop_on_has_kw && matches!(value, Pattern::Identifier(crate::keyword::IMPLEMENTS)) {
|
||||
Err((NoProgress, EPattern::End(original_state.pos())))
|
||||
} else {
|
||||
Ok((
|
||||
|
@ -158,7 +158,10 @@ pub fn loc_implements_parser<'a>() -> impl Parser<'a, Loc<Implements<'a>>, EPatt
|
|||
then(
|
||||
loc_tag_pattern_arg(false),
|
||||
|_arena, state, progress, pattern| {
|
||||
if matches!(pattern.value, Pattern::Identifier("implements")) {
|
||||
if matches!(
|
||||
pattern.value,
|
||||
Pattern::Identifier(crate::keyword::IMPLEMENTS)
|
||||
) {
|
||||
Ok((
|
||||
progress,
|
||||
Loc::at(pattern.region, Implements::Implements),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue