mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Remove private tags from idents
This commit is contained in:
parent
7ea4d7171b
commit
67eb4b9faa
11 changed files with 11 additions and 185 deletions
|
@ -240,14 +240,10 @@ fn loc_ident_pattern_help<'a>(
|
|||
Ok((MadeProgress, loc_tag, state))
|
||||
}
|
||||
}
|
||||
Ident::PrivateTag(name) | Ident::OpaqueRef(name) => {
|
||||
Ident::OpaqueRef(name) => {
|
||||
let loc_pat = Loc {
|
||||
region: loc_ident.region,
|
||||
value: if matches!(loc_ident.value, Ident::PrivateTag(..)) {
|
||||
Pattern::PrivateTag(name)
|
||||
} else {
|
||||
Pattern::OpaqueRef(name)
|
||||
},
|
||||
value: Pattern::OpaqueRef(name),
|
||||
};
|
||||
|
||||
// Make sure `@Foo Bar 1` is parsed as `@Foo (Bar) 1`, and not `@Foo (Bar 1)`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue