forked from AbleOS/holey-bytes
fixed a bug of not marking idents as used
This commit is contained in:
parent
8892dd729a
commit
fe5a8631f6
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in a new issue