Resolve a local variable by name, return its index and depth.
(&mut self, name: &str)
| 1657 | |
| 1658 | // Resolve a local variable by name, return its index and depth. |
| 1659 | fn resolve_local(&mut self, name: &str) -> Option<(u8, isize, Mutability)> { |
| 1660 | (0..self.local_count) |
| 1661 | .rev() |
| 1662 | .find(|&i| self.locals[i].name.lexeme == name) |
| 1663 | .map(|i| (i as u8, self.locals[i].depth, self.locals[i].mutability)) |
| 1664 | } |
| 1665 | |
| 1666 | fn resolve_upvalue( |
| 1667 | &mut self, |
no outgoing calls
no test coverage detected