fixed a bug of not marking idents as used

This commit is contained in:
Jakub Doka 2024-11-17 18:44:24 +01:00
parent 8892dd729a
commit fe5a8631f6
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -249,7 +249,10 @@ impl<'a, 'b> Parser<'a, 'b> {
.enumerate() .enumerate()
.rfind(|(_, elem)| self.lexer.slice(elem.ident.range()) == name) .rfind(|(_, elem)| self.lexer.slice(elem.ident.range()) == name)
{ {
Some((i, elem)) => (i, elem, false), Some((i, elem)) => {
elem.used = true;
(i, elem, false)
}
None => { None => {
let ident = match Ident::new(token.start, name.len() as _) { let ident = match Ident::new(token.start, name.len() as _) {
None => { None => {