Remove private tags from idents

This commit is contained in:
Ayaz Hafiz 2022-04-25 11:13:30 -04:00
parent 7ea4d7171b
commit 67eb4b9faa
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
11 changed files with 11 additions and 185 deletions

View file

@ -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)`