resolveLocal method
Implementation
int resolveLocal(Expr.Expr expr, Token name) {
for (int i = scopes.length - 1; i >= 0; i--) {
if (scopes.get(i).containsKey(name.lexeme)) {
interpreter.resolve(expr, scopes.length - 1 - i);
return scopes.length - 1 - i;
}
}
return -1;
}